diff options
author | terminaldweller <thabogre@gmail.com> | 2022-01-02 19:09:50 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-01-02 19:09:50 +0000 |
commit | 3a129c99a6ea0187377deebe340568147efc444e (patch) | |
tree | 3b229594edbc9127071efb489c4c4e8fafaa57e5 /tmux | |
parent | searx and ipfs, plus local dns (diff) | |
download | scripts-3a129c99a6ea0187377deebe340568147efc444e.tar.gz scripts-3a129c99a6ea0187377deebe340568147efc444e.zip |
using good ole wttr.in
Diffstat (limited to 'tmux')
-rwxr-xr-x | tmux/date.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tmux/date.sh b/tmux/date.sh index c272d07..057108c 100755 --- a/tmux/date.sh +++ b/tmux/date.sh @@ -5,6 +5,7 @@ SEPARATOR_LEFT_BOLD="" SEPARATOR_LEFT_THIN="" RESULT=$(date +"%a %D %H:%M") +PROXY="proxychains4 -f /home/devi/proxies/ca/proxychains.conf" DAY="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $1}') DATE="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $2}') @@ -14,7 +15,8 @@ UTC_TIME="#[fg=colour255 bg=colour25]"$(echo GMT: $UTC_TIME_RESULT) # JDATE="#[fg=colour255 bg=colour29]"$(jdate | gawk '{print $2" "$3}') JDATE="#[fg=colour255 bg=colour29]"$(jdate | gawk '{print $2" "$3}') OPENWEATHERMAP_TOKEN=$(cat /home/devi/scripts/tmux/openweathermap.json|jq -r ".token") -WEATHER_INFO=$(sleep 120 && curl "https://api.openweathermap.org/data/2.5/weather?q=Tehran&appid=$OPENWEATHERMAP_TOKEN&units=metric"|jq ".main.temp") -WEATHER="#[fg=colour255 bg=colour32]"$(echo $WEATHER_INFO" C") +# WEATHER_INFO=$(sleep 120 && torsocks curl "https://api.openweathermap.org/data/2.5/weather?q=Tehran&appid=$OPENWEATHERMAP_TOKEN&units=metric"|jq ".main.temp") +WEATHER_INFO=$(curl 'wttr.in/tehran?T&format=%t/%f') +WEATHER="#[fg=colour255 bg=colour32]"$(echo $WEATHER_INFO) echo "#[fg=colour32 bg=colour16]$SEPARATOR_LEFT_BOLD$WEATHER#[fg=colour29 bg=colour32]$SEPARATOR_LEFT_BOLD$JDATE #[fg=colour31 bg=colour29]$SEPARATOR_LEFT_BOLD$DAY $SEPARATOR_LEFT_THIN $DATE $SEPARATOR_LEFT_THIN $TIME #[fg=colour25 bg=colour31]$SEPARATOR_LEFT_BOLD$UTC_TIME " |