This commit is contained in:
2025-12-31 09:25:36 +08:00
parent 8f431fb27d
commit b8bd3b3418

View File

@@ -1,6 +1,9 @@
#!/bin/bash
# -----------------------------------------------------------------------------#
# Display Scale Toggling Script for GNOME RDP Session.
# Display Scale Toggling Script for GNOME RDP Session. Writen to work with the #
# Custom Command Toggles GNOME extension. Note: use the following command to #
# get the current scale as the check check command of the exteion: #
# $ gdctl show | grep Scale:\.* #
# -----------------------------------------------------------------------------#
# Only for GNOME shell.
@@ -11,7 +14,7 @@ fi
# Only for remote session.
if ! gdctl show | grep -q "Meta-0"; then
echo "Could not find monitor Meta-0, seems not a remote session."
echo "Error: could not find monitor Meta-0, seems not a remote session."
exit 2
fi
@@ -21,10 +24,8 @@ if [ $# -eq 1 ]; then
else
# Toggle if not specified.
if gdctl show | grep -q "Scale: 1.0"; then
#gdctl set -LM Meta-0 --primary --scale 1.5
SCALE=1.5
else
#gdctl set -LM Meta-0 --primary --scale 1
SCALE=1
fi
fi