Welcome to my mind.
Watch your step, it's a bit messy around here!

Goto is not always bad

• i3wm

Tiling window managers are said to be great to keep your desktop organized. But once you start using multiple monitors your amount of windows will slightly go out of hand.

At least that’s what happened to me lately…

One thing I found particularly annoying was the fact, that when setting up different workspaces on multiple monitors, i3 will switch focus between them when iterating over the workspace list.

That’s not what I wanted. I wanted to stay on my current monitor and switch immediatly to the window I was looking for.

So I began to search for a solution. And found one! :)

i3 provides the possibility to mark a window. That is, you apply a certain name to a window and are now able to jump back to it right away by calling using this particular mark.

Sounds perfect!

So here’s how to set things up:

# mark window
bindsym $mod+m exec i3-input -p 'mark ' -P 'Mark: '

# unmark window
bindsym $mod+Shift+m exec i3-input -p 'unmark ' -P 'Unmark: '

# goto window
bindsym $mod+g exec i3-input -F '[con_mark="%s"] focus' -P 'Go to: '

Add these lines to your i3 config, reload it and you’re good to go.

By pressing $mod+m i3-input will ask you to enter a mark.

When entering this mark after pressing $mod+g, i3 will jump to the corresponding workspace and set the focus to the marked window.

$mod+Shift+m allows you to unmark a window again.

This way you’re able to switch windows fast without the need to cycle through the complete workspace list.