diff options
Diffstat (limited to 'dotconfig/polybar')
-rw-r--r-- | dotconfig/polybar/config | 2 | ||||
-rwxr-xr-x | dotconfig/polybar/launch.sh | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/dotconfig/polybar/config b/dotconfig/polybar/config index 6010c5c..9ad7de1 100644 --- a/dotconfig/polybar/config +++ b/dotconfig/polybar/config @@ -35,7 +35,7 @@ include-file = ~/.config/polybar/modules ; $ polybar -M | cut -d ':' -f 1 ; $ xrandr -q | grep " connected" | cut -d ' ' -f1 ; If no monitor is given, the primary monitor is used if it exists - monitor = + monitor = ${env:MONITOR} ; Tell the Window Manager not to configure the window. ; Use this to detach the bar if your WM is locking its size/position. diff --git a/dotconfig/polybar/launch.sh b/dotconfig/polybar/launch.sh index 829d7ac..f607575 100755 --- a/dotconfig/polybar/launch.sh +++ b/dotconfig/polybar/launch.sh @@ -11,5 +11,7 @@ NETWORK_TYPE="wired" # or `wireless` # Launch the bar echo "---" | tee -a /tmp/mypolybar.log -NETWORK_TYPE=$NETWORK_TYPE polybar main >> /tmp/mypolybar.log 2>&1 & disown +for m in $(polybar --list-monitors | cut -d":" -f1); do + MONITOR=$m NETWORK_TYPE=$NETWORK_TYPE polybar main >> /tmp/mypolybar.log 2>&1 & disown +done echo "Bar launched..." |