dotfiles/bin/executable_i3-displayconfig

33 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/bin/bash
set -e
2019-07-16 14:06:50 +02:00
if xrandr | grep "^DP-2-3 connected" > /dev/null; then
if xrandr | grep "^DP-2-2 connected"; then
2019-07-16 14:06:50 +02:00
xrandr --output DP-2-2 --primary --mode 3440x1440 --pos 1200x215 --rotate normal --output DP-2-3 --mode 1920x1200 --pos 0x0 --rotate left --output eDP-1 --off
else
echo "Something went horribly wrong!"
fi
2019-07-16 14:06:50 +02:00
# sleep 0.2
bspc monitor %DP-2-2 -d work web files graphics
2019-07-16 14:06:50 +02:00
bspc monitor %DP-2-3 -d comm docs media dump
elif xrandr | grep "^DP-2-2-8 connected"; then
xrandr --output DP-2-2-8 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output eDP-1 --off --output DP-2-1 --off --output DP-2-2 --off --output DP-2-3 --off
sleep 0.2
bspc monitor %DP-2-2-8 -d work web comm docs media files graphics dump
else
if xrandr | grep "^eDP-1 connected"; then
2019-07-16 14:06:50 +02:00
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2-1 --off --output DP-2-2 --off --output DP-2-3 --off
fi
sleep 0.2
bspc monitor -d work web comm docs media files graphics dump
fi
~/bin/i3-polybar &
feh --randomize --bg-fill ~/Pictures/Wallpapers/