Mirrored keybindings with mirrored layout
Hello I use the ResizableTall layout and configured key bindings for resizing windows which resemble vim movements: ("M-S-j", sendMessage MirrorShrink) ("M-S-k", sendMessage MirrorExpand) ("M-S-h", sendMessage Shrink) ("M-S-l", sendMessage Expand) Now when I use a mirrored variant of this layout, the key bindings are mirrored as well - meaning that j/k change the window size horizontally and h/k vertically. Is it possible to keep the original behaviour also in the mirrored layout variant? Best regards, Andreas
Hi Andreas, You could check the layout description of the current layout for "Mirror" (or something else if you're using XMonad.Layout.Named), and then have the key binding send the message that makes more sense for the given layout. This is probably a good start that compiles but I didn't test it < http://lpaste.net/8970541507006169088>. Cheers, Adam On Mon, Apr 11, 2016 at 10:20 AM, Andreas Doll <fuseki@posteo.de> wrote:
Hello
I use the ResizableTall layout and configured key bindings for resizing windows which resemble vim movements:
("M-S-j", sendMessage MirrorShrink) ("M-S-k", sendMessage MirrorExpand) ("M-S-h", sendMessage Shrink) ("M-S-l", sendMessage Expand)
Now when I use a mirrored variant of this layout, the key bindings are mirrored as well - meaning that j/k change the window size horizontally and h/k vertically.
Is it possible to keep the original behaviour also in the mirrored layout variant?
Best regards, Andreas _______________________________________________ xmonad mailing list xmonad@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
On 2016-04-11 at 14:26, adam vogt wrote:
You could check the layout description of the current layout for "Mirror" (or something else if you're using XMonad.Layout.Named), and then have the key binding send the message that makes more sense for the given layout.
This is probably a good start that compiles but I didn't test it <http:// lpaste.net/8970541507006169088>.
Thanks! In flipD I have to use U -> L, D -> R, besides that it works like a charm. Best regards, Andreas
participants (2)
-
adam vogt -
Andreas Doll