aboutsummaryrefslogtreecommitdiff
path: root/initialLayout.sh
blob: 54d3a9800ae332a2787934d42f84c6d7250fcd32 (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
#!/bin/sh

hdmiConnected=""
xrandr | grep 'HDMI.* connected' && hdmiConnected="y"

if [ -n "$hdmiConnected" ]; then

	"$HOME/.screenlayout/hdmi1080p.sh"

	if pgrep -x bspwm; then
		bspc monitor -f HDMI-1-1
	fi

	if pgrep -x i3; then
		i3-msg focus left
		i3-msg workspace 3:👾
		i3-msg focus right
	fi

fi

pgrep -x bspwm && bspc desktop -l monocle
urxvt -e tmux new -s main &

if pgrep -x i3 && [ -n "$hdmiConnected" ]; then
	sleep 1
	i3-msg move workspace number 1:💻
	i3-msg workspace number 1:💻
fi