mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 16:10:14 +00:00
fix tmux and other stuff
This commit is contained in:
4
bin/reset_1p
Executable file
4
bin/reset_1p
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
security find-generic-password -s 1Password -w | op signin enterprise_console --output=raw > $HOME/.op_tmux_token_tmp
|
||||
|
12
bin/weather_cached
Executable file
12
bin/weather_cached
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
CACHE_FILE="$HOME/.tmux/.weather_cache"
|
||||
CACHE_TIME=$(stat -f %m $CACHE_FILE)
|
||||
NOW_TIME=$(date +%s)
|
||||
TIME_PASSED=$((NOW_TIME-CACHE_TIME))
|
||||
if [[ "$TIME_PASSED" -gt "1200" ]]
|
||||
then
|
||||
curl -m 2 -s wttr.in/\?format\="%c%t" > $CACHE_FILE
|
||||
fi
|
||||
cat $CACHE_FILE
|
||||
|
Reference in New Issue
Block a user