This commit is contained in:
ccppi 2024-03-13 09:32:03 +01:00
parent e3f65318ae
commit c101b90396

View File

@ -3,10 +3,12 @@ echo $id
id=$(xrandr) id=$(xrandr)
id="HDMI${id#*HDMI}" #remove prefix to "HDMI" this does the # the * signifies what to remove id="HDMI${id#*HDMI}" #remove prefix to "HDMI" this does the # the * signifies what to remove
id="${id%%[[:space:]]*}" id="${id%%[[:space:]]*}"
echo $id echo $id "On"
id2=$(xrandr)
id2="eDP${id2#*eDP}"
xrandr --output eDP-1-1 --off id2="${id2%%[[:space:]]*}"
echo $id2 "Off"
xrandr --output $id2 --off
xrandr --output $id --auto xrandr --output $id --auto