diff --git a/bin/polybar b/bin/polybar index 95d335f..4753bcb 100755 --- a/bin/polybar +++ b/bin/polybar @@ -7,6 +7,9 @@ MONITORS=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+*]*( PRIMARY=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+]?[*]([^ ]*).*/\2/p') PRIMARY=${PRIMARY:-${MONITORS%% *}} +awk 'BEGIN { i=0 } ($4 == "/" && $3 !~ /^0:/) {print "mount-"i" = "$5; i++}' /proc/self/mountinfo \ + > $XDG_RUNTIME_DIR/i3/polybar-filesystems.conf + case $(echo $MONITORS | wc -w) in 1) MONITOR=$PRIMARY polybar --reload alone & diff --git a/dotfiles/polybar.conf b/dotfiles/polybar.conf index e0c7d37..1fcd131 100644 --- a/dotfiles/polybar.conf +++ b/dotfiles/polybar.conf @@ -69,20 +69,15 @@ label-urgent-padding = 1 # This needs 3.6+ [module/disk] type = internal/fs -mount-0 = / -mount-1 = /home -mount-2 = /var -mount-3 = /tmp -mount-4 = /var/lib/systems -mount-5 = /boot -warn-percentage = 94 +warn-percentage = 80 fixed-values = true interval = 10 format-unmounted = format-mounted = format-warn = format-warn-foreground = ${colors.warning} -label-warn =  %mountpoint%: %percentage_used%% +label-warn = 🖴 %mountpoint%: %percentage_used%% +include-file = $XDG_RUNTIME_DIR/i3/polybar-filesystems.conf [module/brightness] type = internal/backlight