[xmonad] that's it

Andrea Rossato mailing_list at istitutocolli.org
Fri Jan 25 14:01:35 EST 2008


On Fri, Jan 25, 2008 at 11:04:34AM -0500, David Roundy wrote:
> On Fri, Jan 25, 2008 at 04:46:41PM +0100, Andrea Rossato wrote:
> > I already have something in mind (a mouse interface), but I'm not
> > going to write a single line of code as long as a decision on the code
> > I've already produced have been taken.
> 
> I'd like to mention that I've enjoyed skimming over the patches you've been
> sending recently.  But I've no time for xmonad either, currently, and am
> unlikely to be much help.  But your work looks pretty cool! And I'm glad
> you've taken up working on almost precisely the features of xmonad that I
> wish I had time to work on!  :)

Well, thank you for your kind words. I must confess that you show me
the way with that LayoutModifier class... a sort of an epiphany of
what type classes can be useful for...;)

I would like to suggest another minimal ~/.xmonad/xmonad.hs

import XMonad
import XMonad.Layout.Tabbed
import XMonad.Layout.DwmStyle
import XMonad.Layout.SimpleDecoration
import XMonad.Layout.WindowArranger
import qualified Data.Map as M

myL = tabDeco shrinkText defaultTabbedConfig |||
      simpleDeco shrinkText defaultSimpleConfig (windowArranger $ layoutHook defaultConfig) |||
      dwmStyle shrinkText defaultDwmStyleConfig (windowArranger $ layoutHook defaultConfig)

myKeys x = [  ((modMask x .|. controlMask              , xK_s    ), sendMessage Arrange            )
            , ((modMask x .|. controlMask .|. shiftMask, xK_s    ), sendMessage DeArrange          )
            , ((modMask x .|. controlMask .|. shiftMask, xK_Left ), sendMessage (DecreaseLeft   10))
            , ((modMask x .|. controlMask .|. shiftMask, xK_Right), sendMessage (DecreaseRight  10))
            , ((modMask x .|. controlMask .|. shiftMask, xK_Down ), sendMessage (DecreaseDown   10))
            , ((modMask x .|. controlMask .|. shiftMask, xK_Up   ), sendMessage (DecreaseUp     10))
            , ((modMask x .|. controlMask              , xK_Left ), sendMessage (IncreaseLeft   10))
            , ((modMask x .|. controlMask              , xK_Right), sendMessage (IncreaseRight  10))
            , ((modMask x .|. controlMask              , xK_Down ), sendMessage (IncreaseDown   10))
            , ((modMask x .|. controlMask              , xK_Up   ), sendMessage (IncreaseUp     10))
            , ((modMask x .|. shiftMask                , xK_Left ), sendMessage (MoveLeft       10))
            , ((modMask x .|. shiftMask                , xK_Right), sendMessage (MoveRight      10))
            , ((modMask x .|. shiftMask                , xK_Down ), sendMessage (MoveDown       10))
            , ((modMask x .|. shiftMask                , xK_Up   ), sendMessage (MoveUp         10))
           ]                                                                                        

newKeys x  = M.union (keys defaultConfig x) (M.fromList (myKeys x))

main = xmonad defaultConfig { layoutHook = myL }

and then start moving and resizing windows around. purely...
;)
andrea


More information about the xmonad mailing list