Marks + Scratchpad = Awesome!


By creating bindings that set a mark on a window, you can manage individual windows in the scratchpad, and have bindings that hide/show a particular window.

bindsym $mod+Shift+Mod4+0 mark "alpha", move scratchpad
bindsym $mod+Mod4+0 [con_mark="alpha"] scratchpad show

With those two bindings, I can move a window into the scratchpad, but do so with the ability to explicitly call it back. I have the full number row set up that way, and also a bunch of assignments to do this to certain apps.

With that, I can have what I’m considering “non-contextual” windows: profanity (a chat client), spotify, etc.; and pull them up on whatever workspace I’m working on, without the weird cycling that scratchpad does normally. For example, this is the full set of bindings for my spotify (which is launched by i3):

bindsym $mod+Mod4+m [con_mark="music"] scratchpad show
for_window [class="Spotify"] mark "music", move scratchpad
exec spotify

I just figured this out, and thought I’d share. Pretty sure it’s not novel at all, but it’s been really useful for me.