Enhanced toggle-gdctl-scale.
This commit is contained in:
@@ -8,12 +8,19 @@ fi
|
|||||||
|
|
||||||
# Set scale explicitly to argument value.
|
# Set scale explicitly to argument value.
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
gdctl set -LM Meta-0 --primary --scale $1
|
# gdctl set -LM Meta-0 --primary --scale $1
|
||||||
|
SCALE=$1
|
||||||
else
|
else
|
||||||
# If no argument is given, toggle between 1.0 and 1.5 scales.
|
# If no argument is given, toggle between 1.0 and 1.5 scales.
|
||||||
if gdctl show | grep -q "Scale: 1.0"; then
|
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
|
else
|
||||||
gdctl set -LM Meta-0 --primary --scale 1
|
#gdctl set -LM Meta-0 --primary --scale 1
|
||||||
|
SCALE=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Apply and output.
|
||||||
|
gdctl set -LM Meta-0 --primary --scale $SCALE
|
||||||
|
printf "Setting display scale to: $SCALE\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user