Run Or Raise Application Windows On Linux (X11) Using A Single Keyboard Shortcut With jumpapp

jumpapp is a very fast way of switching between applications or application windows, for X11 Linux desktops.

Using jumpapp you can create a single keyboard shortcut that will launch an application if it's not already running, or focus the application window if it's already running. If there is more than one application window open, pressing the keyboard shortcut repeatedly cycles through all the application windows.

This way you have frequently used applications one keyboard shortcut away, no matter if they are already running or not, on which workspace they are on, etc.

jumpapp firefox

The run-or-raise application switcher makes use of wmctrl, a command line program that can be used to interact with X Window managers that are compatible with the EWMH/NetWM specification.

The jumpapp page says that the program was built for the Gnome desktop environment, but "there's a good chance though that it'll work on any window manager supported by wmctrl". wmctrl supports Metacity, KWin, Enlightenment, Fluxbox, Openbox, Xfce, Window Maker, and others.

While to use jumpapp, all you have to do is assign a keyboard shortcut to jumpapp application-executable, for example jumpapp chromium-browser, jumpapp firefox, and so on, the tool offers some advanced options too. You can specify jumpapp to cycle through open windows in reverse order (-r), always launch COMMAND when ARGs are passed (-p), specify the window using WM_CLASS (-c) or window title (-t) instead of COMMAND, and more.

You can see all the jumpapp options by running jumpapp without any arguments:

$ jumpapp
Usage: jumpapp [OPTION]... COMMAND [ARG]...

Jump to (focus) the first open window for an application, if it's running.
Otherwise, launch COMMAND (with opitonal ARGs) to start the application.

Options:
  -r -- cycle through windows in reverse order
  -f -- force COMMAND to launch if process found but no windows found
  -n -- do not fork into background when launching COMMAND
  -p -- always launch COMMAND when ARGs passed
        (see Argument Passthrough in man page)
  -L -- list matching windows for COMMAND and quit
  -t NAME -- process window has to have NAME as the window title
  -c NAME -- find window using NAME as WM_CLASS (instead of COMMAND)
  -i NAME -- find process using NAME as the command name (instead of COMMAND)
  -w -- only find the applications in the current workspace
  -C -- center cursor when raising application

There's also a new option (-R) that has not yet been released (it's not available in the latest release, but it was added in Git), which allows bringing the application to the current workspace when raising the window, instead of switching to the workspace that the application is currently on.

Installing and using jumpapp



jumpapp is available for download as a RPM, DEB or as a generic archive that can be installed on any Linux distribution. There are instructions for how to install the latest version from Git as well.

To use jumpapp, you'll need to assign a keyboard shortcut for the jumpapp application-executable (use the application executable name instead of "application-executable) command, for each application you want to use with it. For example, use jumpapp firefox for Firefox, jumpapp chromium-browser for Chromium web browser, etc.

To assign a keyboard shortcut to a command in Gnome, open System settings, go to Devices -> Keyboard, scroll down to Custom Shortcuts, click the + button, and add a new command (jumpapp application-executable). Then assign a keyboard shortcut to this command.

In case the desktop environment you're using doesn't have a way of biding keyboard shortcuts to commands, you can use XBindKeys as explained here.