Skip to content

Instantly share code, notes, and snippets.

@0xFEEDC0DE64
Created January 25, 2022 15:12
Show Gist options
  • Save 0xFEEDC0DE64/6485212bb86e428ef3d01213fe8bdd96 to your computer and use it in GitHub Desktop.
Save 0xFEEDC0DE64/6485212bb86e428ef3d01213fe8bdd96 to your computer and use it in GitHub Desktop.
#!/bin/bash
CURRENT_ZOOM=""
for (( ; ; ))
do
eval $(xdotool getmouselocation --shell)
if [[ $Y -gt 2160 ]]
then
if [[ "$CURRENT_ZOOM" != "1.0" ]]
then
echo set to 1.0
gsettings set org.cinnamon.desktop.interface text-scaling-factor 1.0
CURRENT_ZOOM="1.0"
fi
else
if [[ "$CURRENT_ZOOM" != "1.5" ]]
then
echo set to 1.5
gsettings set org.cinnamon.desktop.interface text-scaling-factor 1.5
CURRENT_ZOOM="1.5"
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment