summaryrefslogtreecommitdiff
path: root/.config/bspwm/bspwmrc
blob: f0703325e3536300a0c0b1b7ad059805c914a811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

# Checks if sxhkd is running, if not, run it.
# Also use setsid so it's appart from status bar
# and the kill doesn't ruin it.
pgrep -x sxhkd > /dev/null || setsid sxhkd &
polybar_panel

# This starts or restarts panel. Be careful
# with pkill, if neither of these two programs have
# a 'setsid' prepended to their command, sxhdk wil crash.
# if [ $(pgrep -x lemonbar_panel | wc -l) = 1 ];then
# 	killall lemonbar
# 	lemonbar_panel &
# else
# 	lemonbar_panel &
# fi

# Multihead stuff.
if [ $(uname -n) = "arch" ]; then
	export MAINMON="DP-0"
	export SECMON="HDMI-0"

	# Run a script to select the main monitor.
	if [ $(pgrep -f bspwm_enforce_monitor_position | wc -l) < 2]; then
		bspwm_enforce_monitor_position $MAINMON '^1' &
	else
		killall bspwm_enforce_monitor_position
		bspwm_enforce_monitor_position $MAINMON '^1' &
	fi

	bspc monitor $MAINMON -d 1 2 3 4 5
	bspc monitor $SECMON -d 6 7 8 9 10
else
	bspc monitor -d I II III IV V VI VII VIII IX X
fi

# General config.
bspc config border_width			5
bspc config window_gap				5
bspc config split_ratio				0.52
bspc config borderless_monocle		true
bspc config gapless_monocle			true

# Window rules.
# bspc rule -a Gimp desktop='^8' state=floating follow=on
# bspc rule -a Chromium desktop='^2'
# bspc rule -a mplayer2 state=floating
# bspc rule -a Kupfer.py focus=on
# bspc rule -a Screenkey manage=off