From c4705ffcc3ffe8b810bc35f695747a4c71251ba1 Mon Sep 17 00:00:00 2001 From: Wongyip Date: Mon, 29 Dec 2025 12:03:21 +0800 Subject: [PATCH] Enhanced toggle-gdctl-scale. --- toggle-gdctl-scale | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/toggle-gdctl-scale b/toggle-gdctl-scale index d3f459d..638038c 100755 --- a/toggle-gdctl-scale +++ b/toggle-gdctl-scale @@ -8,12 +8,19 @@ fi # Set scale explicitly to argument value. if [ $# -eq 1 ]; then - gdctl set -LM Meta-0 --primary --scale $1 + # gdctl set -LM Meta-0 --primary --scale $1 + SCALE=$1 else # If no argument is given, toggle between 1.0 and 1.5 scales. if gdctl show | grep -q "Scale: 1.0"; then - gdctl set -LM Meta-0 --primary --scale 1.5 + #gdctl set -LM Meta-0 --primary --scale 1.5 + SCALE=1.5 else - gdctl set -LM Meta-0 --primary --scale 1 + #gdctl set -LM Meta-0 --primary --scale 1 + SCALE=1 fi fi + +# Apply and output. +gdctl set -LM Meta-0 --primary --scale $SCALE +printf "Setting display scale to: $SCALE\n"