forked from extern/nix-config
polybar: Don't hardcode monitor to display on
Now polybar will show on all monitors by default, and we don't have to update the script every time those monitors change, useful when changing between computers that use HDMI and computers that use display port, for example.
This commit is contained in:
parent
cc9b8aed08
commit
80bfb36919
@ -17,7 +17,7 @@ modules-left = bspwm
|
||||
modules-center = window
|
||||
modules-right = cpu ram volume wifi date time battery
|
||||
|
||||
monitor = eDP
|
||||
monitor = ${env:MONITOR:}
|
||||
wm-restack = bspwm
|
||||
include-file = $HOME/.cache/polybar/config
|
||||
|
||||
|
@ -52,5 +52,7 @@ echo $BSPWM_TOP_PADDING > $HOME/.cache/polybar/bspwm_top_padding
|
||||
# Wait until there are no more polybar instances running
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Start polybar
|
||||
polybar main &
|
||||
# Start polybar programmatically on all monitors by default
|
||||
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
||||
MONITOR=$m polybar main &
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user