diff --git a/.config/xmobar/count-updates.sh b/.config/xmobar/count-updates.sh new file mode 100755 index 0000000..6c41f03 --- /dev/null +++ b/.config/xmobar/count-updates.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +count=$(yay -Qu | wc -l) + +echo $count \ No newline at end of file diff --git a/.config/xmobar/xmobarrc.hs b/.config/xmobar/xmobarrc.hs index ae022c0..6563fdf 100644 --- a/.config/xmobar/xmobarrc.hs +++ b/.config/xmobar/xmobarrc.hs @@ -13,7 +13,7 @@ Config { , sepChar = "%" -- delineator between plugin names and straight text , alignSep = "}{" -- separator between left-right alignment , template = " %UnsafeStdinReader% | %cpu% | %memory% | %dynnetwork% } \ - \{ %date% | %YPAD% | %battery% %trayerpad%" + \{ %date% | %updates% | %YPAD% | %battery% %trayerpad%" } -- general behavior @@ -114,6 +114,9 @@ Config { -- Runs a standard shell command 'uname -r' to get kernel version -- , Run Com "uname" ["-r"] "" 3600 + -- Runs a simple script that counts the number of system updates to apply + , Run Com "/home/solomon/.config/xmobar/count-updates.sh" [] "updates" 3600 + -- Script that dynamically adjusts xmobar padding depending on number of trayer icons. , Run Com "/home/solomon/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20 diff --git a/.config/xmobar/xmobarrc0 b/.config/xmobar/xmobarrc0 index e14f03a..ccec1b0 100755 --- a/.config/xmobar/xmobarrc0 +++ b/.config/xmobar/xmobarrc0 @@ -106,7 +106,10 @@ Config { -- Runs a standard shell command 'uname -r' to get kernel version , Run Com "uname" ["-r"] "" 3600 - -- Script that dynamically adjusts xmobar padding depending on number of trayer icons. + -- Runs a simple script that counts the number of system updates to apply + , Run Com "/home/solomon/.config/xmobar/count-updates.sh" [] "updates" 36000 + + -- Script that dynamically adjusts xmobar padding depending on nuf trayer icons. , Run Com "/home/solomon/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20 -- Prints out the left side items such as workspaces, layout, etc.