aboutsummaryrefslogtreecommitdiff
path: root/bspwm/bspwmrc
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2020-10-14 23:57:21 +0200
committerbozo.kopic <bozo@kopic.xyz>2020-10-14 23:57:21 +0200
commita7f6bcbf2930fda0547136491bf1a67c3b337224 (patch)
treeac912071501f523741c2629a5ab99d07384f1ded /bspwm/bspwmrc
parent2dcb41cd467d47a4c867b91cf5b26a4158937e7d (diff)
.
Diffstat (limited to 'bspwm/bspwmrc')
-rwxr-xr-xbspwm/bspwmrc35
1 files changed, 12 insertions, 23 deletions
diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc
index 26c534c..f6d3a99 100755
--- a/bspwm/bspwmrc
+++ b/bspwm/bspwmrc
@@ -1,30 +1,19 @@
-#!/bin/bash
+#!/bin/sh
-sxhkd -c ~/.config/sxhkd/sxhkdrc.bspwm &
+sxhkd -c ~/.config/bspwm/sxhkdrc &
~/.config/polybar/launch.sh &
bspc monitor primary -d 1 2 3 4 term
-
-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
-
-bspc config focus_follows_pointer true
-bspc config pointer_follows_monitor true
-
-bspc config split_ratio 0.52
-bspc config borderless_monocle true
-bspc config gapless_monocle true
+[ $(xrandr --listactivemonitors | wc -l) -gt 2 ] && \
+ bspc monitor primary#next -d a s d f
+
+bspc config border_width 4
+bspc config window_gap 0
+bspc config focus_follows_pointer true
+bspc config pointer_follows_monitor true
+bspc config split_ratio 0.52
+bspc config borderless_monocle true
+bspc config gapless_monocle true
bspc rule -a *:tmux_term desktop=term