From 16914d305c8d38bd94b99a732dfc51b1a008f973 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Fri, 4 Dec 2020 13:36:16 +0530 Subject: fixed datetime not changing --- XMonad/baraction | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'XMonad/baraction') diff --git a/XMonad/baraction b/XMonad/baraction index 21f7afa6..95d10f76 100755 --- a/XMonad/baraction +++ b/XMonad/baraction @@ -1,6 +1,9 @@ #!/bin/zsh -DATETIME=`date +"%d %b(%A) %H:%M"` +get_date_time() { + datetime=$(date +"%d %b(%A) %H:%M") + echo $datetime +} get_cpu_load() { read cpu a b c previdle rest < /proc/stat @@ -43,6 +46,6 @@ get_weather() { } while :; do - echo "%{B#FD3A69}%{F#232627} " $(get_disk_usage) "%{B-} %{B#FECD1A} " $(get_cpu_load) "%{B-} %{B#03C4A1}" $(get_cpu_temp) "%{B-} %{B#00BBF9}" $(get_mem_usage) "%{B-}%{F-}%{r}" $(get_mute_status) "%{B-}%{F-} %{B#9B5DE5}%{F#FCFCFC}" $(get_weather) "%{B-} %{B#892CDC}%{F#FCFCFC} " ${DATETIME} " %{F-}%{B-}" + echo "%{B#FD3A69}%{F#232627} " $(get_disk_usage) "%{B-} %{B#FECD1A} " $(get_cpu_load) "%{B-} %{B#03C4A1}" $(get_cpu_temp) "%{B-} %{B#00BBF9}" $(get_mem_usage) "%{B-}%{F-}%{r}" $(get_mute_status) "%{B-}%{F-} %{B#9B5DE5}%{F#FCFCFC}" $(get_weather) "%{B-} %{B#892CDC}%{F#FCFCFC} " $(get_date_time) " %{F-}%{B-}" sleep 3 done -- cgit v1.2.3