fix tmux and other stuff

This commit is contained in:
Noah Masur
2020-08-01 20:06:16 -04:00
parent a3026b91ba
commit fa5850db16
11 changed files with 117 additions and 103 deletions

4
bin/reset_1p Executable file
View 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
View 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