Allow keybinding for toggle_workspace.
Submitted by Sean Reifschneider
Assigned to Olivier Fourdan @olivier
Description
One "mission critical" feature for me is the ability to have a keybinding that allows me to switch back to the last workspace I was on. For example, KDE allow this. XFCE allows this AS LONG AS I REMEMBER WHAT WORKSPACE I'M CURRENTLY ON.
It would be nice if instead of having to press the key binding to switch to the current workspace, I could make another key-binding that would always be the same, like Super-P, that when I pressed it would switch me back to the last workspace I was on.
For example, I often will press this keybinding, look at something briefly like the status of a build or some documentation in my web browser, then press this key again to get back to where I was.
The current configuration requires me to remember not only what workspace I'm currently on, but what the previous workspace was if I want to flip back to a previous workspace and then return to where I was.
I currently emulate this by setting Super-1 through Super-7 and Super-K to an external program that uses "wmctrl" to switch to the specific workspaces, and keeps a file with these in it, and to switch to the previous workspace.
While investigating the source to see if this was already implemented, I noticed in screen.c at line 228:
screen_info->current_ws = 0;
screen_info->previous_ws = 0;
screen_info->current_ws = 0;
screen_info->previous_ws = 0;
Seems like those lines got duplicated.
Thanks, Sean
Version: 4.10.0