From 103f9473459271ebf478eeebdeb30eabcb16e910 Mon Sep 17 00:00:00 2001 From: FriendlyNeighborhoodShane Date: Fri, 17 Jul 2020 20:09:26 +0530 Subject: [PATCH 1/2] Fix alarm function --- dwm_bar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwm_bar.sh b/dwm_bar.sh index b81c9d3..36f001c 100755 --- a/dwm_bar.sh +++ b/dwm_bar.sh @@ -46,6 +46,6 @@ export SEP2="]" # Update dwm status bar every second while true do - xsetroot -name "$(dwm_connman)$(dwm_countdown)$(dwm_alarm.sh)$(dwm_transmission)$(dwm_cmus)$(dwm_mpc)$(dwm_spotify)$(dwm_resources)$(dwm_battery)$(dwm_mail)$(dwm_backlight)$(dwm_alsa)$(dwm_pulse)$(dwm_weather)$(dwm_vpn)$(dwm_networkmanager)$(dwm_keyboard)$(dwm_ccurse)$(dwm_date)$(dwm_loadavg)" + xsetroot -name "$(dwm_connman)$(dwm_countdown)$(dwm_alarm)$(dwm_transmission)$(dwm_cmus)$(dwm_mpc)$(dwm_spotify)$(dwm_resources)$(dwm_battery)$(dwm_mail)$(dwm_backlight)$(dwm_alsa)$(dwm_pulse)$(dwm_weather)$(dwm_vpn)$(dwm_networkmanager)$(dwm_keyboard)$(dwm_ccurse)$(dwm_date)$(dwm_loadavg)" sleep 1 done From f63fabf36942bd74c0b1534cefdef9ef33b90a9b Mon Sep 17 00:00:00 2001 From: FriendlyNeighborhoodShane Date: Fri, 17 Jul 2020 20:12:08 +0530 Subject: [PATCH 2/2] Modularise string creation --- dwm_bar.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/dwm_bar.sh b/dwm_bar.sh index 36f001c..3efbc2e 100755 --- a/dwm_bar.sh +++ b/dwm_bar.sh @@ -46,6 +46,31 @@ export SEP2="]" # Update dwm status bar every second while true do - xsetroot -name "$(dwm_connman)$(dwm_countdown)$(dwm_alarm)$(dwm_transmission)$(dwm_cmus)$(dwm_mpc)$(dwm_spotify)$(dwm_resources)$(dwm_battery)$(dwm_mail)$(dwm_backlight)$(dwm_alsa)$(dwm_pulse)$(dwm_weather)$(dwm_vpn)$(dwm_networkmanager)$(dwm_keyboard)$(dwm_ccurse)$(dwm_date)$(dwm_loadavg)" + + # Append results of each func one by one to a string + dispstr="" + dispstr="$dispstr$(dwm_connman)" + dispstr="$dispstr$(dwm_countdown)" + dispstr="$dispstr$(dwm_alarm)" + dispstr="$dispstr$(dwm_transmission)" + dispstr="$dispstr$(dwm_cmus)" + dispstr="$dispstr$(dwm_mpc)" + dispstr="$dispstr$(dwm_spotify)" + dispstr="$dispstr$(dwm_resources)" + dispstr="$dispstr$(dwm_battery)" + dispstr="$dispstr$(dwm_mail)" + dispstr="$dispstr$(dwm_backlight)" + dispstr="$dispstr$(dwm_alsa)" + dispstr="$dispstr$(dwm_pulse)" + dispstr="$dispstr$(dwm_weather)" + dispstr="$dispstr$(dwm_vpn)" + dispstr="$dispstr$(dwm_networkmanager)" + dispstr="$dispstr$(dwm_keyboard)" + dispstr="$dispstr$(dwm_ccurse)" + dispstr="$dispstr$(dwm_date)" + dispstr="$dispstr$(dwm_loadavg)" + + xsetroot -name "$dispstr" sleep 1 + done