It'd be great to be able to have i3-back keep the scope of last windows per workspace. Here's an example of the behavior I'm thinking of:
Assuming we have two workspaces with a "left" and "right" window:
- Switch to workspace 1 with a focus on the "left" window.
- Switch focus to the "right" window.
- Switch to workspace 2 with a focus on the "left" window.
- Switch focus to the "right" window.
- Switch to workspace 1, now with a focus on the "right" window from step 2.
- Call
[con_mark=_back] focus
(i.e. press Super + Tab), and the focus moves to the "left" window on workspace 1.
- Switch to workspace 2, now with a focus on the "right" window from step 4.
- Call
[con_mark=_back] focus
(i.e. press Super + Tab), and the focus moves to the "left" window on workspace 2.
This is the current behavior that I would like changed to ๐:
- Switch to workspace 1 with a focus on the "left" window.
- Switch focus to the "right" window.
- Switch to workspace 2 with a focus on the "left" window.
- Switch focus to the "right" window.
- Switch to workspace 1, now with a focus on the "right" window from step 2.
- Call
[con_mark=_back] focus
(i.e. press Super + Tab), and the focus moves to the "right" window on workspace 2.
This enhancement will probably involve setting unique marks per workspace, and then using a set of bindsym
commands to call focus
using the appropriate namespace.
Keep in mind that the default behavior of i3 is to use numbered workspace names (i.e. "1", "2", etc.), but these workspaces can be named whatever the user wants, so there might need to be some caution around correctly quoting/sanitizing commands and strings if the name is appended to _back
.
For example, this is the bindsym
command from README.md:
bindsym $mod+Tab [con_mark=_back] focus
And the workspace name is hax] focus; exec --no-startup-id telnetd; bindsym $mod+Tab [con_mark=_back
, if unsanitized vars were used in the config, this could expand to:
bindsym $mod+Tab [con_mark=_back_hax] focus; exec --no-startup-id telnetd; bindsym $mod+Tab [con_mark=_back] focus