I3 Scratchpad to access often used applications
I do have a few applications that I need many times throughout the day but usually only for a very short time. One of the prime examples for this is my password manager. Others are a go to terminal or some note taking application. You might have some other needs like a messenger or who knows what.
Since over a year I am using I3 as my window manager.
Recently I have discovered the scratchpad. A "workspace" that cannot be accessed like a regular one but if activated the application will be shown in the center of the screen in floating mode and can be hidden again.
After some basic usage I came up with a way to speed up the access to those applications I talked about above. Let's take a look at the scratchpad section in my I3 config.
# Scratchpad
bindsym $mod+Shift+BackSpace move scratchpad
bindsym $mod+backslash scratchpad show
What does this do? I can move a window to the scratchpad (first line) and toggle through all programs in the scratchpad (second line).
This is all fine but when there is more than one application in the scratchpad hitting $mod+backslash
will cycle through them.
This can be quite cumbersome so I want target my most used scratchpad applications directly.
I also want the shortcuts to be close to each other.
As you can see with the backslash I decided to have them in the upper right corner.
On my private computer I have my terminal on $mod+backspace
and KeePass as my password manager on $mod+=
.
bindsym $mod+BackSpace [class="Termite"] scratchpad show
bindsym $mod+equal [class="keepassx"] scratchpad show
On my work computer I also use the $mod+-
to quickly access my note taking application.
In order to figure out the class of a window in the scratchpad to target it use xprop
on that window and look for the WM_CLASS
property or any other you may need to target more specifically.
Conclusion🔗
Use I3's scratchpad to quickly access multiple applications specifically with custom keyboard shortcuts.
Relevant part of the I3 config file:
# Scratchpad
bindsym $mod+Shift+BackSpace move scratchpad
bindsym $mod+backslash scratchpad show
bindsym $mod+BackSpace [class="Termite"] scratchpad show
bindsym $mod+equal [class="keepassx"] scratchpad show