aboutsummaryrefslogtreecommitdiffstats
path: root/tmux/date.sh
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-08-05 05:14:10 +0000
committerterminaldweller <thabogre@gmail.com>2021-08-05 05:14:10 +0000
commit5f596a3f401a0a40eefcc0f8b6c6b5083748cc1a (patch)
treea892e31077574f1c1a340af257bb6e27ae0ad89c /tmux/date.sh
parentupdate for neomutt (diff)
downloadscripts-5f596a3f401a0a40eefcc0f8b6c6b5083748cc1a.tar.gz
scripts-5f596a3f401a0a40eefcc0f8b6c6b5083748cc1a.zip
a lot of updates and fixes
Diffstat (limited to 'tmux/date.sh')
-rwxr-xr-xtmux/date.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/tmux/date.sh b/tmux/date.sh
index 1c08e47..c0f1bcf 100755
--- a/tmux/date.sh
+++ b/tmux/date.sh
@@ -9,8 +9,11 @@ RESULT=$(date +"%a %D %H:%M")
DAY="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $1}')
DATE="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $2}')
TIME="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $3}')
-UTC_TIME="#[fg=colour255 bg=colour75]"$(date -u +"%H:%I")
+UTC_TIME_RESULT=$(date -u +"%H:%M")
+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}')
+WEATHER_INFO=$(curl "https://api.openweathermap.org/data/2.5/weather?q=Tehran&appid=a2fab6f29fbe16083cf382306c2abee4&units=metric"|jq ".main.temp")
+WEATHER="#[fg=colour255 bg=colour32]"$(echo $WEATHER_INFO" C")
-echo "#[fg=colour29 bg=colour16]$SEPARATOR_LEFT_BOLD$JDATE #[fg=colour31 bg=colour29]$SEPARATOR_LEFT_BOLD$DAY $SEPARATOR_LEFT_THIN $DATE $SEPARATOR_LEFT_THIN $TIME #[fg=colour75 bg=colour31]$SEPARATOR_LEFT_BOLD$UTC_TIME "
+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 "