I am using XMonad.Layout.Reflect together with XMonad.Layout.MultiToggle to flip my layout left-right when needed. However, when any layout is reflected, my keybinds for shrinking and expanding the layout, eg.
...
((modm, xK_h), sendMessage Shrink),
((modm, xK_l), sendMessage Expand),
...
behaves as they are inversed.
So, what I want is a way to remap my keys, or maybe use a function instead of sendMessage that somehow detects the state of the layout and chooses Shrink/Expand depending on that.
Now I know that checking eg. global state variables (of which there are no such thing I guess) is not very Haskelly, so I am at a little bit of a loss on how to do this. I've considered XMonad.Actions.PerWorkspaceKeys, but it seems to do a match against the entire Workspace name. Another route could be to add/delete keybinds in defaultConfig, but again - I'm not sure this is even doable (it seems messy anyways).
Any ideas on how to approach this anyone? I know Haskell on the level of having read the "Learn you a Haskell..." book from beginning to end and making smallish programs based on that.