diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2020-09-20 22:20:50 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2020-09-20 22:20:50 +0200 |
| commit | 2dcb41cd467d47a4c867b91cf5b26a4158937e7d (patch) | |
| tree | 5f39ac98cf1fb49bd9df0bf54962a71c854b4e77 /bspwm | |
| parent | 348e59969cc4f875e8b89ef6959cd37a77280b92 (diff) | |
.
Diffstat (limited to 'bspwm')
| -rwxr-xr-x | bspwm/bspwmrc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index 6afcdb6..26c534c 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -4,7 +4,17 @@ sxhkd -c ~/.config/sxhkd/sxhkdrc.bspwm & ~/.config/polybar/launch.sh & bspc monitor primary -d 1 2 3 4 term -bspc monitor ^2 -d a s d f + +python <<EOF +import subprocess +import sys +p = subprocess.run(['xrandr', '--listactivemonitors'], + capture_output=True, check=True) +count = int(p.stdout.decode('utf-8').split('\n')[0].split(':')[1]) +if count < 2: + sys.exit(1) +EOF +[ $? -eq 0 ] && bspc monitor primary#next -d a s d f bspc config border_width 4 bspc config window_gap 5 |
