dotfiles/bin/switch_monitors.sh

10 lines
218 B
Bash
Executable File

#!/bin/bash
intern=eDP-1
extern=HDMI-1
if xrandr | grep "$extern disconnected"; then
xrandr --output "$extern" --off --output "$intern" --auto
else
xrandr --output "$intern" --off --output "$extern" --auto
fi