scaling-toggle.sh
· 422 B · Bash
原始檔案
#!/usr/bin/sh
## Script to toggle text scaling factor in GNOME between
## 1.0 and 1.25
SCALE=$(dconf read /org/gnome/desktop/interface/text-scaling-factor)
if [ $SCALE == '1.0' ]; then
SCALE_SWITCH=1.25
elif [ $SCALE == '1.25' ]; then
SCALE_SWITCH=1.0
fi
notify-send --transient "Previous Font Scale: $SCALE, Switched to $SCALE_SWITCH"
dconf write /org/gnome/desktop/interface/text-scaling-factor $SCALE_SWITCH
| 1 | #!/usr/bin/sh |
| 2 | ## Script to toggle text scaling factor in GNOME between |
| 3 | ## 1.0 and 1.25 |
| 4 | |
| 5 | SCALE=$(dconf read /org/gnome/desktop/interface/text-scaling-factor) |
| 6 | |
| 7 | if [ $SCALE == '1.0' ]; then |
| 8 | SCALE_SWITCH=1.25 |
| 9 | elif [ $SCALE == '1.25' ]; then |
| 10 | SCALE_SWITCH=1.0 |
| 11 | fi |
| 12 | |
| 13 | notify-send --transient "Previous Font Scale: $SCALE, Switched to $SCALE_SWITCH" |
| 14 | |
| 15 | dconf write /org/gnome/desktop/interface/text-scaling-factor $SCALE_SWITCH |