diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index b39d42e..76232eb 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -269,7 +269,7 @@ format-underline = ${colors.primary} [module/mail] type = custom/script exec = echo "$( [ $(systemctl --user --property=ActiveState show mbsync.timer) = 'ActiveState=active' ] && echo "" || echo "" ) $(notmuch count tag:inbox and tag:unread)" -exec-if = [ "$(notmuch count tag:inbox and tag:unread)" -gt 0 ] +exec-if = check-internet && [ "$(notmuch count tag:inbox and tag:unread)" -gt 0 ] click-right = systemctl --user start mbsync.timer click-left = systemctl --user stop mbsync.timer interval = 300.0 @@ -278,7 +278,7 @@ format-underline = ${colors.primary} [module/weather] type = custom/script exec = $XDG_CONFIG_HOME/polybar/scripts/poly-weather 'Copenhagen?m&format=%t+%C+(%p)' -exec-if = type $XDG_CONFIG_HOME/polybar/scripts/poly-weather +exec-if = type $XDG_CONFIG_HOME/polybar/scripts/poly-weather && check-internet interval = 60.0 ; format-background = ${colors.primary} ; format-foreground = ${colors.background} @@ -301,7 +301,7 @@ tail = true [module/archupdates] type = custom/script exec = $XDG_CONFIG_HOME/polybar/scripts/poly-archupdates -exec-if = type $XDG_CONFIG_HOME/polybar/scripts/poly-archupdates +exec-if = type $XDG_CONFIG_HOME/polybar/scripts/poly-archupdates && check-internet interval = 600 format =