Skip to content

A simple command-line utility to allow custom-increment zooming of the GNOME desktop.

License

Notifications You must be signed in to change notification settings

fgimian/gnome-zoomer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GNOME Zoomer

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.

Compiling the Binary

# 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

Assigning GNOME Zoomer to a Keyboard Shortcut

  1. Open Settings / Keyboard Shortucts
  2. Scroll to the bottom of the list and click +
  3. Create an item named Zoom in increment
    • Set Command to gnome-zoomer 0.1 (or similar)
    • Click Set Shortcut and set to Alt + =
  4. Create an item named Zoom out increment
    • Set Command to gnome-zoomer -0.1 (or similar)
    • Click Set Shortcut and set to Alt + -

Assigning GNOME Zoomer to the Mouse Wheel (Xorg)

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

License

GNOME Zoomer is released under the MIT license. Please see the LICENSE file for more details.

About

A simple command-line utility to allow custom-increment zooming of the GNOME desktop.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages