Paul Hedderly
Paul Hedderly

Reputation: 3941

define an xmonad keymap to set doFullFloat on current window

I want to do something like this from the standard maps:

, ((modMask,     xK_t     ), withFocused $ windows . W.sink)

But the opposite ie a bit like:

, ((modMask,     xK_t     ), withFocused $ windows . W.doFullFloat) 

I get some way with:

, ((modMask,     xK_t     ), withFocused $ float) 

But that doesnt maximise it - it would to be

, ((modMask,     xK_t     ), do
   withFocused $ float
   [SOMETHING TO MAXIMISE WINDOW]
) 

Any suggestions? Thanks

Upvotes: 1

Views: 601

Answers (2)

Leiaz
Leiaz

Reputation: 2917

The float function from XMonad.StackSet takes a window and a rectangle.

With import qualified XMonad.StackSet as W :

((modm, xK_f), withFocused $ windows . (flip W.float $ W.RationalRect 0 0 1 1)),

Upvotes: 2

Paul Hedderly
Paul Hedderly

Reputation: 3941

Slightly orthogonal answer but this answer does what I actually want - just not how I had planned to it: Using MultiToggle

This is the magic module: MultiToggle

And I did it by modifying my layouts to inject

id . smartBorders . mkToggle (NOBORDERS ?? FULL ?? EOT)

before the list of layouts and then added a keymap

, ((modMask, xK_w ), sendMessage $ LMT.Toggle FULL)                                      

If anyone can give an answer to my original question/method, I'll vote it as the correct answer! Thanks.

Another alternative seems to be provided Layout.Maximise

Upvotes: 0

Related Questions