There's a recurring issue with window management at work:
I work on a task, so I have lots of open windows for that task. I don't
like to minimize/iconify windows (my window manager doesn't even have
that function anymore), but instead I organize them in multiple
workspaces. For example something along these lines:
- Workspace 1: An editor and a terminal for running `make` (which also
shows potentially large compiler output). I mostly work in the
editor, but I switch between these two windows repeatedly. Maybe a
third window showing a manpage.
- Workspace 2: Four terminal windows, each running SSH, connected to
some servers. I use these to run the program that I just compiled on
workspace 1 remotely on those servers.
- Workspace 3: The same set of SSH connections, but here they're
showing `tail -f some.log`.
- Workspace 4: Also a terminal with SSH, but a different server, it's
a corner case that isn't closely related to the other four servers.
I think you get the idea.
This works pretty well, *unless* something unexpected comes up and I
have to interrupt working on that task. I now have to perform a context
switch in my brain -- and on my computer. So, I begin using new
workspaces, say workspace 5, where I'll spawn new windows related to
this new task.
That gets confusing really quick. In the heat of the moment, I keep
forgetting what my "first" workspace for this second task was. Was it 5?
Or 7? Or 3?
So, ideally, I'd want a clean state for this new task. Put all the
existing windows aside and start from scratch. When I'm done, I want to
go back to how things were before the interruption.
I think I have finally come up with a lightweight solution for this.
The function keys still refer to a fixed set of workspaces. Those are
indeed static, fixed ones: Mod4 + F1 will now always jump to my (main)
browser window. Mod4 + F3 will always jump to IRC.
But the hotkeys for 1 thru 0 all go through a special script
`katriac-topic`. This script also provides an interactive mode: I can
create new "topics" and select the currently active one. Then, when I
press Mod4 + 5, it will jump to the fifth workspace *for this particular
topic*.
So, I now have a relatively small set of hotkeys, but I can access way
more workspaces than before. The assumption being that I don't jump
between *topics* all the time, but only between workspaces of one topic.
Bonus points because I didn't have to implement any new features in my
WM.