replace lemonbar with polybar and support two monitors

This commit is contained in:
2020-07-14 21:53:01 +02:00
parent 0aaad0a08f
commit 2248367d98
3 changed files with 64 additions and 67 deletions

View File

@ -1,10 +1,23 @@
#! /bin/sh
sxhkd &
~/.config/bspwm/panel &
xdo lower $(xdo id -a panel)
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
i=0
monitors=$(bspc query -M --names)
for monitor in $monitors; do
MONITOR="$monitor" polybar panel &
i=$((i + 1))
done
if [ $i -eq 1 ]; then
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
else
monitor1=$(echo $monitors | cut -d ' ' -f 1)
monitor2=$(echo $monitors | cut -d ' ' -f 2)
bspc monitor "$monitor2" -d 1 2 3 4 5 6 7 8 9
bspc monitor "$monitor1" -d 0
bspc monitor "$monitor1" -s "$monitor2"
bspc monitor "$monitor2" -f
fi
bspc config border_width 2
bspc config window_gap 12
@ -18,4 +31,7 @@ bspc config single_monocle true
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config pointer_follows_focus true
bspc config pointer_follows_monitor true
bspc rule -a Gimp desktop='^8' state=floating follow=on