An appreciation for Cinnamon's workspace flipping keyboard shortcuts

February 21, 2020

When I first started using Cinnamon (which was back here for serious use), I thought of it just as the closest good thing I could get to the old Gnome 2 environment (as Gnome 3 is not for me). Over time, I've come to appreciate Cinnamon for itself, and even propagate aspects of Cinnamon back into my desktop fvwm setup (such as keyboard control over window position and size). One of the little Cinnamon aspects I now appreciate is its slick and convenient keyboard handling of what I would call virtual screens and Cinnamon calls workspaces.

As basic table stakes, Cinnamon organizes workspaces sequentially and lets you move left and right through them with Ctrl + Alt + Right (or Left) Arrow. By default it has four workspaces, which is enough for most sensible people (I'm not sensible on my desktop). Where Cinnamon gets slick is that it has an additional set of keyboard shortcuts for moving to another workspace with the current window, Ctrl + Alt + Shift + Left (or Right). It turns out that it's extremely common for me to open a new window on my laptop's relatively constrained screen, then decide that things are now too cramped and busy in this workspace and I want to move. The Cinnamon keyboard shortcuts make that a rapid and fluid operation, and I can keep moving the window along to further workspaces by just hitting Right (or Left) again while still holding down the other keys.

(As I've experienced many times before, having this as an easy and rapid operation encourages me to use it; I shuffle windows around this way on my laptop much more than I do on my desktops, where moving windows between virtual screens is a more involved process that generally requires multiple steps.)

Every so often I've thought about trying to create a version of this keyboard shortcut in fvwm, but so far I haven't seen a good way to do it. Although fvwm has functions and supports some logic operations, the feature's actually got a variety of challenges in fvwm's model of windows and what the current window can be. I'm pretty sure that if I looked at the actual Cinnamon code for this, it would turn out to be much more complicated than you'd expect from such a simple-sounding thing.

(I already have a keyboard shortcut for just moving to a different virtual screen; the tricky bit in fvwm is taking the current window along with me when (and only when) it's appropriate to do so given the state of the current window. I suppose the easy way to implement this is to assume that if I hit the 'take the window with me' shortcut, I've already determined that what fvwm considers the current window should be moved to the target virtual screen and my fvwm function can just ignore all of the possible weird cases.)


Comments on this page:

I've switched from fvwm to i3, but I've dug out my old config which had a function

AddToFunc ZapToDesk
+ "I"   MoveToDesk 0 $0
+ "I"   GotoDesk 0 $0

that I used as a menu item but I guess it could probably be used as a key shortcut too. I use absolute positions for my virtual desktops (i.e. a specific key on the keyboard corresponds to a desktop) rather than arrowing around so it will need some souping up to support relative movement.

By hobbs at 2020-05-14 03:46:05:

The setup I've had for over a decade has Alt+number (i.e. Alt-1 through Alt-8) as "go to desktop" (surprisingly, this has hardly ever clashed with anything I've cared about) and Shift+Alt+number for "send window to desktop". It does take two actions to send a window somewhere and follow it there, but as it just requires lifting a pinky off of shift while tapping a key a second time, it's pretty amenable to muscle memory.

I think I originally had this on WindowMaker, but for the past mumble years it's been something that I've configured into KDE's KWin about five minutes after sitting down at a machine.

Written on 21 February 2020.
« Link: Stop Using Encrypted Email
Will common motherboards ever have very many NVMe drive slots? »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Fri Feb 21 00:23:06 2020
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.