[xmonad] darcs patch: Config.hs, Operations.hs: +unfloat, unfloatFocused fun...

Don Stewart dons at galois.com
Sat May 2 15:39:59 EDT 2009


Ah, they're not copy-paste though -- they're in the default Config.

-- Don

gwern0:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> On Sat, May 2, 2009 at 3:11 PM, Don Stewart  wrote:
> > Isn't 'unfloat' the same as 'sink'?
> 
> If it is, I don't see how defining unfloat as 'windows . W.sink' would work.
> 
> > unfloatFocused seems useful. Do you have some examples of how people are
> > using it?
> 
> Sure. Using my downloader tool to get the config archive, here are 20
> copy-pastes of the unfloat function in people's configs (and
> presumably there are more in configs not included in the archive):
> 
> 12.hs:        , ((mod4Mask              , xK_t     ), withFocused $
> windows . W.sink) -- %! Push window back into tiling
> 13.hs:          , ((m,              xK_z), withFocused $ windows .
> W.sink) -- unfloat
> 15.hs:              , ("M-r", withFocused $ windows . W.sink)
> 19.hs:                , ("M-t",          withFocused $ windows . W.sink)
> 1.hs:    , ((modm,               xK_t     ), withFocused $ windows . W.sink)
> 21.hs:    , ((modMask,                xK_t     ), withFocused $
> windows . W.sink)
> 24.hs:           , ("M-t",          withFocused $ windows . W.sink)
> 25.hs:                , ("M-d", withFocused $ windows . W.sink)
> 28.hs:    , ("M-t"         ,  withFocused $ windows . W.sink)  -- put
> window back on tiling layer
> 2.hs:    , ((modm,               xK_t     ), withFocused $ windows . W.sink)
> 34.hs:    , ((modMask,               xK_t     ), withFocused $ windows . W.sink)
> 38.hs:    , ((modMask,               xK_v     ), withFocused $ windows . W.sink)
> 3.hs:    , ((modMask,               xK_s     ), withFocused $ windows . W.sink)
> 40.hs:    , ((modMask,                  xK_t     ), withFocused $
> windows . W.sink)
> 42.hs:    , ("M-t", withFocused $ windows . W.sink)	-- unfloat
> 44.hs:    , ((modMask,               xK_t     ), withFocused $ windows . W.sink)
> 45.hs:    , ((modMask .|. shiftMask, xK_t     ), withFocused $ windows . W.sink)
> 48.hs:    , ((modMask,               xK_t     ), withFocused $ windows
> . W.sink) -- %! Push window back into tiling
> 52.hs:    , ((modMask,               xK_t     ), withFocused $ windows . W.sink)
> 7.hs:    , ((modMask .|. controlMask, xK_d), withFocused $ windows .
> W.sink) -- push window back into tiling
> 
> Getting rid of some copy-paste in >20 configs strikes me as worth 6 lines.
> 
> - --
> gwern
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Use GnuPG with Firefox : http://getfiregpg.org (Version: 0.7.5)
> 
> iEYEAREKAAYFAkn8nVwACgkQvpDo5Pfl1oLddwCfaWtamRt+B2mUgM8y4br978oK
> jJIAni2D/I/6+BCP68Dshydtpem/sxSy
> =zXai
> -----END PGP SIGNATURE-----


More information about the xmonad mailing list