Don Stewart | 2 May 2009 21:39
Favicon
Gravatar

Re: darcs patch: Config.hs, Operations.hs: +unfloat, unfloatFocused fun...

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)
(Continue reading)

Adam Vogt | 3 May 2009 01:32
Picon

Re: darcs patch: Config.hs, Operations.hs: +unfloat, unfloatFocused fun...

Perhaps an alternative would be to make it easier to refer to actions by 
the keys that call them in the default config, which is sort of awkward 
currently. The goal would be remapping sort of like in vim. Here's a 
sketch:

> fromDefaultConfig   :: (ButtonMask, KeySym) -> (X ())
> fromDefaultConfig k = fromMaybe (return ()) $ Map.lookup k $ keys dcl dcl
>   where
>     dcl = defaultConfig { layoutHook = Layout $ layoutHook defaultConfig }

I can't see myself using this, but it could simplify rearranging keys as those
configs do.

Adam

Gmane