GNOME Bugzilla – Bug 618124
feature to quickly switch to previous workspace
Last modified: 2018-01-24 01:47:24 UTC
Created attachment 160598 [details] [review] initial implementation of the workspace quick-switching This patch adds a possibility to quickly switch to previous workspace via keybindings. Basically, if you switched from workspace 2 to workspace 1 by pressing keyboard shortcut for workspace 1, pressing the same shortcut again while on workspace 1 will switch back to workspace 2. I initially described it here: http://dodonov.net/blog/2010/05/06/gnome-hacking/ I did it for metacity originally, but having in mind that mutter is the future of gnome window managers, I adapted it for mutter as well. I know that it is probably a low priority feature, but I thought it would be more appropriate to post it here anyway to get your feedback or suggestions.
(Note: the original implementation for metacity is in bug #618018).
A) As much as possible we try to avoid random GConf keys that just tweak one aspect of behavior - if this actually is useful behavior, then Mutter should just do it. If it isn't useful, nobody is going to know to look for a hidden GConf key to find it. There are a lot of GConf keys in Mutter that *seem* to tweak random behavioral things, yes, but conceptually we try to do that to accomodate people with apps they need to use, or different setups. B) I think as implemented here, this *isn't* the right behavior. With a sample size of 1, when I once used "switch to desktop" keybindings, I'd have a pattern of doing alt-f1/f2/f3/f4 until I found what I was looking for. With that pattern, if you are sitting on the first desktop hit Alt-F1 and it pops you somewhere else, that's just confusing. C) But you should be able to implement your behavior with a GNOME Shell extension pretty easily - using meta_keybindings_set_custom_handler() C) What I think might be a useful "just works behavior" is that if I hit Alt-F1 (whatever the configured shortcut was), then hit F1 again *without* releasing the Alt key, it toggles me back to the last desktop. I'd take a patch that did that.
Review of attachment 160598 [details] [review]: As noted in comments, don't want to take this patch like this. BTW, see https://live.gnome.org/GnomeShell/Development/WorkingWithPatches for how to create properly formatted patches for bugzilla bugs.
Fair enough, this makes perfect sense for me! Thanks for the feedback! I actually don't know whether this functionality would fit into gnome3 way of working, with ad-hoc workspaces being created when needed. So perhaps this could be closed - it is your call! If this feature would be interested however, I can rework the patch. Thanks for the tip on using meta_keybindings_set_custom_handler(), I think it will do the job as well, and won't interfere with main mutter features.