mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-05 06:31:54 -07:00
0928bb484a3db58e7029dda83b25f3f00ed450a0
Using Typeables as the only constraint on layout messages is a bit scary, as a user can send arbitrary values to layoutMsg, whether they make sense or not: there's basically no type feedback on the values you supply to layoutMsg. Folloing Simon Marlow's dynamically extensible exceptions paper, we use an existential type, and a Message type class, to constrain valid arguments to layoutMsg to be valid members of Message. That is, a user writes some data type for messages their layout algorithm accepts: data MyLayoutEvent = Zoom | Explode | Flaming3DGlassEffect deriving (Typeable) and they then add this to the set of valid message types: instance Message MyLayoutEvent Done. We also reimplement the dynamic type check while we're here, to just directly use 'cast', rather than expose a raw fromDynamic/toDyn. With this, I'm much happier about out dynamically extensible layout event subsystem.
xmonad : a lightweight X11 window manager. http://xmonad.org About: Xmonad is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms, which can be dynamically reconfigured. At any time windows are arranged so as to maximise the use of screen real estate. All features of the window manager are accessible purely from the keyboard: a mouse is entirely optional. Xmonad is configured in Haskell, and custom layout algorithms may be implemented by the user in config files. A principle of Xmonad is predictability: the user should know in advance precisely the window arrangement that will result from any action. By default xmonad provides three layout algorithms: tall, wide and fullscreen. In tall or wide mode, windows are tiled and arranged to prevent overlap and maximise screen use. Sets of windows are grouped together on virtual screens, and each screen retains its own layout, which may be reconfigured dynamically. Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of screens. By utilising the expressivity of a modern functional language with a rich static type system, Xmonad provides a complete, featureful window manager in less than 500 lines of code, with an emphasis on correctness and robustness. Internal properties of the window manager are checked using a combination of static guarantees provided by the type system, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify. Building: Get the dependencies mtl http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mtl-1.0 X11 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-1.2 (Unfortunately X11-1.2 does not work correctly on AMD64. The latest darcs version from http://darcs.haskell.org/packages/X11 does.) X11-extras: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-extras-0.1 unix http://hackage.haskell.org/cgi-bin/hackage-scripts/package/unix-2.0 (included with ghc) dmenu 2.* http://www.suckless.org/download/dmenu-2.7.tar.gz (optional) And then build with Cabal: runhaskell Setup.lhs configure --prefix=/home/dons runhaskell Setup.lhs build runhaskell Setup.lhs install Finally, add: exec /home/dons/bin/xmonad to the last line of your .xsession file Authors: Spencer Janssen Don Stewart Jason Creighton
Description
The core of xmonad, a small but functional ICCCM-compliant tiling window manager
Readme
BSD-3-Clause
6.3 MiB
Languages
Haskell
97.6%
Nix
2%
Shell
0.4%