From 267a6e9541b7c47b509097d10f3df8ede6d9b3b5 Mon Sep 17 00:00:00 2001 From: shockrah Date: Fri, 25 Nov 2022 16:30:23 -0800 Subject: [PATCH] Better script for toggling single & dual monitor mode --- quick-single | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 quick-single diff --git a/quick-single b/quick-single new file mode 100755 index 0000000..6a60f17 --- /dev/null +++ b/quick-single @@ -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