dotfiles/bin/xrandr/switch_monitors.sh

21 lines
293 B
Bash
Raw Permalink Normal View History

2019-02-11 16:43:02 +00:00
#!/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