mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
Added docker count to Polybar
This commit is contained in:
parent
a26bd5133a
commit
f63b278aef
@ -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
|
||||
|
9
polybar/.local/bin/dockerstatus
Executable file
9
polybar/.local/bin/dockerstatus
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
count=$(docker ps -q | wc -l)
|
||||
|
||||
if [ ! "$count" -eq 0 ]; then
|
||||
echo "$count"
|
||||
else
|
||||
echo ""
|
||||
fi
|
Loading…
Reference in New Issue
Block a user