15 lines
334 B
Bash
Executable File
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
|
|
|
|
|