aboutsummaryrefslogtreecommitdiff
path: root/bin/xrandr-rul
blob: 0b76a98d5974c683bbf3d097ad8cfea82764e2ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

INT="eDP-1"

export DISPLAY="${DISPLAY:-:0}"

xrandr --output ${INT} --mode 1920x1080 # 1920x1440 #2560x1440

for EXT in DP-1 DP-2 HDMI-2
do
	if xrandr -q | grep -qs "^${EXT} connected"
	then
		xrandr --output ${EXT} --mode 3440x1440
		xrandr --output ${EXT} --left-of ${INT}
	else
		xrandr --output ${EXT} --off
	fi
done

# If we have a script for sorting out the workspaces, use it.
eval "$(command -v i3-fix-workspaces)"
nihil fit ex nihilo