aboutsummaryrefslogtreecommitdiff
path: root/bspwm
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2020-09-20 22:20:50 +0200
committerbozo.kopic <bozo@kopic.xyz>2020-09-20 22:20:50 +0200
commit2dcb41cd467d47a4c867b91cf5b26a4158937e7d (patch)
tree5f39ac98cf1fb49bd9df0bf54962a71c854b4e77 /bspwm
parent348e59969cc4f875e8b89ef6959cd37a77280b92 (diff)
.
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