dotfiles/bin/xrandr/switch_monitors.sh

21 lines
293 B
Bash
Executable File

#!/bin/bash
intern=eDP-1
extern=HDMI-1
case $1 in
"-i")
m=$intern
;;
"-e")
m=$extern
;;
*)
echo "Wrong option"
esac
if xrandr --listactivemonitors | grep "$m"; then
xrandr --output "$m" --off
else
xrandr --output "$m" --auto
fi