dotfiles_deprecated/scripts/toggle_monitor.sh
2018-03-01 00:47:14 +01:00

11 lines
290 B
Bash
Executable File

#!/bin/bash
left=HDMI-0
right=DVI-I-3
#if xrandr | grep "$right disconnected"; then
if ! xrandr --listmonitors | grep "$right"; then
xrandr --output "$right" --primary --auto --output "$left" --left-of "$right" --auto
else
xrandr --output "$right" --off --output "$left" --auto
fi