aboutsummaryrefslogtreecommitdiff
path: root/bspwm
diff options
context:
space:
mode:
Diffstat (limited to 'bspwm')
-rwxr-xr-xbspwm/bspwmrc12
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