added updates count to xmobar

This commit is contained in:
Solomon Laing 2021-03-22 12:20:30 +00:00
parent e99e9cfa3e
commit 892be92c28
3 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,5 @@
#!/bin/sh
count=$(yay -Qu | wc -l)
echo $count

View File

@ -13,7 +13,7 @@ Config {
, sepChar = "%" -- delineator between plugin names and straight text , sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment , alignSep = "}{" -- separator between left-right alignment
, template = " <action=`xdotool key super+o`><icon=haskell_20.xpm/></action> %UnsafeStdinReader% <fc=#805a9b>|</fc> <fc=#f3617a>%cpu%</fc> <fc=#805a9b>|</fc> <fc=#b262cd>%memory%</fc> <fc=#805a9b>|</fc> <fc=#706bc2>%dynnetwork%</fc> } \ , template = " <action=`xdotool key super+o`><icon=haskell_20.xpm/></action> %UnsafeStdinReader% <fc=#805a9b>|</fc> <fc=#f3617a>%cpu%</fc> <fc=#805a9b>|</fc> <fc=#b262cd>%memory%</fc> <fc=#805a9b>|</fc> <fc=#706bc2>%dynnetwork%</fc> } \
\{ <fc=#ee9a00>%date%</fc> <fc=#805a9b>|</fc> <fc=#b55322>%YPAD%</fc> <fc=#805a9b>|</fc> <fc=#6e1a11>%battery%</fc> %trayerpad%" \{ <fc=#ee9a00>%date%</fc> <fc=#805a9b>|</fc> <fc=#fc7d28>%updates%</fc> <fc=#805a9b>|</fc> <fc=#b55322>%YPAD%</fc> <fc=#805a9b>|</fc> <fc=#6e1a11>%battery%</fc> %trayerpad%"
} }
-- general behavior -- general behavior
@ -114,6 +114,9 @@ Config {
-- Runs a standard shell command 'uname -r' to get kernel version -- Runs a standard shell command 'uname -r' to get kernel version
-- , Run Com "uname" ["-r"] "" 3600 -- , 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. -- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
, Run Com "/home/solomon/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20 , Run Com "/home/solomon/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20

View File

@ -106,7 +106,10 @@ Config {
-- Runs a standard shell command 'uname -r' to get kernel version -- Runs a standard shell command 'uname -r' to get kernel version
, Run Com "uname" ["-r"] "" 3600 , 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 , Run Com "/home/solomon/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
-- Prints out the left side items such as workspaces, layout, etc. -- Prints out the left side items such as workspaces, layout, etc.