jqno / gnome-happy-appy-hotkey

GNOME Shell extension to assign hotkeys to applications to give them focus or launch them
GNU General Public License v3.0
8 stars 1 forks source link

Happy Appy Hotkey

A GNOME Shell extension that assigns hotkeys to apps to give them focus or launch them.

A screenshot of Happy Appy Hotkey's preferences screen

Get it on extensions.gnome.org!

Features

Troubleshooting

If this extension behaves erratically (for instance, it takes half a second for a window to be activated, or the 'unbound cycle' feature doesn't activate an app when an app without a hotkey is clearly running), make sure the desktop files you're running have the StartupWMClass property defined. If you're using an AppImage and you created the desktop file manually, this is likely to be the cause.

Exporting and importing

Sometimes you want to share hotkeys between different machines, or to save them when you need to do a re-install. You can use dconf for this. It's already installed on your system.

Open a terminal and run this command:

dconf dump /org/gnome/shell/extensions/happy-appy-hotkey/ > happy-appy-hotkey-settings.dconf

You can save the happy-appy-hotkey-settings.dconf file somewhere safe. When you need to import them again, you can run this:

dconf load /org/gnome/shell/extensions/happy-appy-hotkey/ < happy-appy-hotkey-settings.dconf

Your settings should take effect immediately.

Motivation

I'm a keyboard oriented person and I like to use it to switch apps. However, I think Alt+Tab is too slow and imprecise, especially if you want to jump to a specific app that isn't the last one that you used.

Previously, I cobbled together a few scripts that do this, but they use tools that don't work on Wayland. To achieve this in Wayland, it must operate directly on the window manager (Mutter), and to do that, you need a GNOME Shell extension.

Tiling window managers (like AwesomeWM and QTile) provide this too, but they have downsides:

This extension seeks to fill the niche of what I miss from TWM's in GNOME.

Building

In order to install this extension locally, run ./build.sh local.

In order to create a package for upload to extensions.gnome.org, run ./build.sh package.

Contributing

I'm open for issues and PRs, but keep in mind that I don't have a lot of time to work on this extension. Therefore, I'll only consider features that I'm likely to use myself; otherwise maintaining them would cost too much time.

Credits

For this plugin, I took inspiration from: