From 5c21608034987d09ac0c8b2b86901316e2db74e0 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 17 Jan 2018 13:14:20 -0600 Subject: [PATCH] Polybar: Re-add Arch update module It was just too useful to leave out --- .config/polybar/config | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.config/polybar/config b/.config/polybar/config index 7927d51d..7adcea28 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -71,7 +71,7 @@ font-4 = ${res/fonts.font-4} inherit = template/bar tray-position = right -modules-left = i3 cpu memory +modules-left = i3 cpu memory update-arch modules-center = xwindow modules-right = xbacklight volume battery wlan date @@ -210,6 +210,19 @@ label = %percentage_used%% label-padding = 2 label-background = ${res/colors.background} +[module/update-arch] +type = custom/script +exec = echo `checkupdates | wc -l` +exec-if = wget -q --spider http://www.startpage.com/ && uname -r | grep -q "ARCH" && [ `checkupdates | wc -l` != 0 ] +format-prefix =  +format-prefix-padding = 2 +format-prefix-foreground = ${res/colors.background} +format-prefix-background = ${res/colors.alert} +interval = 60 + +label-padding = 2 +label-background = ${res/colors.background} + [module/volume] type = internal/volume format-volume =