From 832c52157dc84719e05942ab5f1a7315603a6370 Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 22 Sep 2020 14:31:17 -0500 Subject: [PATCH] Polybar: Add service indicators for Ansible and backup jobs --- .config/polybar/config | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.config/polybar/config b/.config/polybar/config index 54484284..ad0b1c70 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -65,7 +65,7 @@ monitor = ${env:PB_MONITOR:eDP-1} inherit = template/bar border-top-size = ${res/config.border-size} tray-position = center -modules-left = i3 bspwm reboot-required +modules-left = i3 bspwm service-ansible service-backup reboot-required modules-right = backlight pulse battery | date #[bar/primary-2] @@ -246,6 +246,20 @@ exec = "echo Reboot required" exec-if = "[ -f /var/run/reboot-required ]" format-foreground = ${res/colors.yellow} +[module/service-ansible] +type = custom/script +interval = 5 +exec = "echo " +exec-if = "systemctl is-active --quiet ansible-pull.service" +format-foreground = ${res/colors.yellow} + +[module/service-backup] +type = custom/script +interval = 5 +exec = "echo " +exec-if = "systemctl is-active --quiet 9iron-backup.service" +format-foreground = ${res/colors.yellow} + [module/wlan-laptop] type = internal/network interface = wlp0s20f3