diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index a86ec7b..4628cce 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -48,7 +48,7 @@ monitor = ${env:MONITOR:eDP1} modules-left = bspwm modules-center = battery0 battery1 wlan bluetooth -modules-right = updates-arch-combined xbacklight volume memory cpu temperature filesystem mail rss github date +modules-right = updates-arch-combined xbacklight volume memory cpu temperature filesystem docker mail rss github date tray-position = right @@ -58,7 +58,7 @@ monitor = ${env:MONITOR:DP-1} modules-left = bspwm modules-center = player-mpris-tail -modules-right = eth bluetooth updates-arch-combined volume memory cpu temperature filesystem mail rss github date +modules-right = eth bluetooth updates-arch-combined volume memory cpu temperature filesystem docker mail rss github date tray-position = right @@ -414,6 +414,12 @@ exec = /bin/sh ~/.local/bin/mailcount click-left = alacritty -e neomutt click-middle = mailsync & +[module/docker] +type = custom/script +exec = dockerstatus +interval = 1 +label =  %output% + [settings] screenchange-reload = true ;compositing-background = xor diff --git a/polybar/.local/bin/dockerstatus b/polybar/.local/bin/dockerstatus new file mode 100755 index 0000000..0cc1bd0 --- /dev/null +++ b/polybar/.local/bin/dockerstatus @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +count=$(docker ps -q | wc -l) + +if [ ! "$count" -eq 0 ]; then + echo "$count" +else + echo "" +fi