Better script for toggling single & dual monitor mode

This commit is contained in:
shockrah 2022-11-25 16:30:23 -08:00
parent ab113c724b
commit 267a6e9541

19
quick-single Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -x
# Basically we use this script to quickly determine
# if we're going to switch to 'single mode' during the workday
# or go back to the usual dual monitor setup
opt=$(printf 'Single\nDual' | dmenu -i -p 'Single or dual monitor setup')
main=DP-2
scnd=HDMI-0
if [ "$opt" = "Single" ]; then
xrandr --output $scnd --off
xrandr --output $main --mode 1920x1080 --rate 143.98
else
xrandr --output $main --mode 1920x1080 --rate 143.98 --right-of $main
fi