[xmonad] zaphod mode

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Mon Dec 19 23:22:10 CET 2011


Quoting Mike Meyer <mwm at mired.org>:

> It may take some finagling to get things started properly:
>
> DISPLAY=:0.1 xmonad &	# Managing screen 1
> DISPLAY=:0.0 xmonad 	# Managing screen 0, exit to exit X.
>
> It doesn't look like xmonad has a way to specify a non-default config,
> which would significantly lower the value of this.

The config file is a program written in the general-purpose  
programming language Haskell, so you have all of Haskell's power at  
your fingertips. Branch on the value of $DISPLAY or do any other thing  
that seems sensible. For example:

main = do
     display <- getEnv "DISPLAY"
     case display of
         ":0.0" -> xmonad config00
         ":0.1" -> xmonad config01
         _ -> hPutStrLn stderr "Hey! I was expecting either :0.0 or  
:0.1 in $DISPLAY."

~d



More information about the xmonad mailing list