The GNOME zoomer utility updates the relevant dconf setting to zoom the entire desktop by a chosen increment. This may be easily assigned to a keyboard shortcut in GNOME so that the user may zoom in with shortcuts using their chosen increment.
This utility works on both Xorg and Wayland, however I'm currently not aware of a way to assign it to assign a mouse wheel shortcut for it in Wayland at present.
# Install build dependencies (Debian / Ubuntu).
sudo apt install gcc libdconf-dev
# Install build dependencies (CentOS >= 8 / RHEL >= 8 / Fedora).
sudo dnf install gcc dconf-devel
# Install build dependencies (CentOS < 8 / RHEL < 8).
sudo yum install gcc dconf-devel
# Build the GNOME zoomer binary.
gcc -Wall gnome-zoomer.c $(pkg-config --libs --cflags dconf) -o gnome-zoomer
# Install the GNOME zoomer binary.
sudo install -o root -g root -m 0755 gnome-zoomer /usr/bin/gnome-zoomer
- Open Settings / Keyboard Shortucts
- Scroll to the bottom of the list and click +
- Create an item named Zoom in increment
- Set Command to
gnome-zoomer 0.1
(or similar) - Click Set Shortcut and set to Alt + =
- Set Command to
- Create an item named Zoom out increment
- Set Command to
gnome-zoomer -0.1
(or similar) - Click Set Shortcut and set to Alt + -
- Set Command to
We'll be assigning Alt+Wheel to adjust the zoom level.
Start by installing xbindkeys:
sudo apt install xbindkeys
Place the following contents in ~/.xbindkeysrc:
"gnome-zoomer 0.1"
alt + b:4
"gnome-zoomer -0.1"
alt + b:5
Start xbindkeys:
xbindkeys_autostart
GNOME Zoomer is released under the MIT license. Please see the LICENSE file for more details.