scripts/display-extern.sh
2024-03-13 09:32:03 +01:00

15 lines
334 B
Bash
Executable File

echo $id
#id="asdfsadf HDMI-1.1 asdfsdfas sfdsa"
id=$(xrandr)
id="HDMI${id#*HDMI}" #remove prefix to "HDMI" this does the # the * signifies what to remove
id="${id%%[[:space:]]*}"
echo $id "On"
id2=$(xrandr)
id2="eDP${id2#*eDP}"
id2="${id2%%[[:space:]]*}"
echo $id2 "Off"
xrandr --output $id2 --off
xrandr --output $id --auto