Logo

Switching app with a single key press

2020-01-22 - Thomas Queste

Some years ago, I found that using alt-tab for app switching was not that convenient nor fast.

I bounded some key to directly access the app I had in mind with great success in term of efficiency.

This has worked greatly but I think I can go a bit further.

TL;DR: Configure key-to-app with Jumpapp, experiment with single-key press

Efficiency and Focus

Not being disturbed is the great idea here.

The desktop animation to switch from an app to an app is error prone and slow.

When I want to paste a StackOverflow to my code editor, I can copy, then switch in one key to the editor, then paste. Want to search something, Super-F1 and the browser appears.

No more, alt-tab once thinking I just left the editor before going to the browser, or was it two windows away.

No more, “aperçu” of all running applications through the App Switcher/Alt-tab menu, searching for something like a code editor.

How-to

Custom

I have used the following in Xfce to directly access my apps, bound to a key in Xfce:

sh -c "wmctrl -a jetbrains-idea -x || /home/tom/Apps/idea/current/bin/idea.sh"

It worked quite well, but it is not able to switch between apps of the same type.

Jumpapp

Jumpapp

Killer app for me. Jumpapp is a wrapper around wmctrl and makes it really easy to:

  • switch directly to an app by its WM_CLASS or name
  • switch between app of the same type
  • open an instance of target app when not found

Optimization

I will try in the coming weeks to use a single key to switch app.

The idea is to have a direct key to an app instead of a weird-two-fingers keybinging like Super-F1, which is not that much ergonomic on a standard keyboard or a laptop keyboard.

Here is what I will try:

  • Press F1 to switch to my browser, instead of Super-F1
  • Press F2 to switch to my terminal, instead of Super-F2
  • Press F3 to switch to my code editor, instead of Super-F3

This will cause conflict in some applications.

There is no problem for F1 as it is the help screen, and can be skipped.

But, F2 is bound to go to next error in Intellij. This is a key I used often.

F2 in Intellij

Same for F3 which is bound to next occurrence.

F3 in Intellij

F4 is also bounded, but to Jump to source which I don’t think I use.

Ideas

3 things:

  • Some have used default keys like MAIL and BROWSER to access their app, which can also be convenient.
  • There are some tutorials in the articles from xahlee.info
  • Using a launcher (I use Albert on Linux and it has a plugin to switch to windows) can work but it is more tedious
Written by:

Thomas Queste

comments powered by Disqus