I recently installed the Debian with XFCE & Xfwm4 on my laptop, dual booting alongside macOS. For my own sanity, I did some key remapping to make myself equally productive on both installations.
Keyboard
I wanted the keybindings which’re mostly the same on linux as they are on macOS, to use the CMD aka “Super” key on linux, instead of the control key. I didn’t want to remove the control key’s functionality, just duplicate it on the Super key, so muscle memory for things like CMD+c would still work inside most apps.
Xmodmap
I found this solution on stack overflow, and it works quite nicely, using xmodmap
: https://askubuntu.com/a/137456
inside my ~/.Xmodmap
:
remove mod4 = Super_L
add control = Super_L
Application Shortcuts
Spotlight Replacement
As a spotlight search replacement, I added an application shortcut in the Keyboard settings, from SUPER+SPACE
to xfce4-appfinder
.
Magnet Window Snap
Magnet’s window snapping shortcuts (CTRL+ALT+{LEFT,RIGHT,UP,DOWN,U,I,J,K}), can be bound directly inside xfce’s Xfwm4 window manager settings.
Cmd-Left/Right
In macOS, the cursor can be jumped to the start & end of the line, using CMD+{LEFT/RIGHT}. Linux just jumps one word, which is a bit annoying. Unfortunately, this trick doesn’t seem to work in all apps.
I installed xdotool
and added a couple application shortcuts. I’m still experimenting with making this work better.
CTRL+RIGHT bash -c "xdotool getactivewindow key End"
CTRL+LEFT bash -c "xdotool getactivewindow key Home"