Entry

Linux: toggle display on or off

Solution

Replace DP-4, 1920x1080 & 144.0 with your displays information

xrandr --listactivemonitors | grep DP-4; if [ $? -ne 0 ]; then xrandr --output DP-4 --mode 1920x1080 --rate 144.0; else xrandr --output DP-4 --off; fi

For scale, the font sizing of Gnome Tweaks seems to do a better trick than xrandr --scale.