Personal tools

Xmonad/Config archive/Don's xmonad.hs

From HaskellWiki

< Xmonad | Config archive(Difference between revisions)
Jump to: navigation, search
Line 6: Line 6:
 
<haskell>
 
<haskell>
 
import XMonad
 
import XMonad
  +
import qualified Data.Map as M
 
import XMonad.Hooks.DynamicLog
 
import XMonad.Hooks.DynamicLog
  +
import XMonad.Layout.NoBorders
   
main = dzen $ \conf -> xmonad $ conf
+
main = dzen $ \x -> xmonad $ x
{ borderWidth = 2
+
{ terminal = "urxvtc"
, terminal = "term"
+
, normalBorderColor = "#333333"
, normalBorderColor = "#cccccc"
+
, focusedBorderColor = "red"
, focusedBorderColor = "#cd8b00" }
+
, layoutHook = smartBorders (layoutHook x)
  +
}
 
</haskell>
 
</haskell>
   

Revision as of 22:54, 15 March 2008

Configuration files get much simpler in xmonad 0.5, as you just override those values you need to.

This is the ~/.xmonad/xmonad.hs file.

import XMonad
import qualified Data.Map as M
import XMonad.Hooks.DynamicLog
import XMonad.Layout.NoBorders
 
main = dzen $ \x -> xmonad $ x
        { terminal           = "urxvtc"
        , normalBorderColor  = "#333333"
        , focusedBorderColor = "red"
        , layoutHook         = smartBorders (layoutHook x)
        }

Launches dzen on startup, with some good defaults.

My .xinitrc:

# .xinitrc
 
xrandr -s 0
 
xrdb $HOME/.Xresources
xsetroot -cursor_name left_ptr
xsetroot -solid '#80a0af'
 
xset b 100 0 0
xset r rate 140 200
 
xmodmap -e "keycode 233 = Page_Down"
xmodmap -e "keycode 234 = Page_Up"
xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Control = Control_L"
 
PATH=/home/dons/bin:$PATH
 
# launch the external 60 second clock, and launch the workspace status bar
FG='#a8a3f7' 
BG='#3f3c6d' 
#FONT="-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-1"
xmonad-clock | dzen2 -e '' -x 400 -w 1200 -ta r -fg $FG -bg $BG &
 
xmonad &
 
# wait for xmonad
wait $!
pkill -HUP dzen2
pkill -HUP -f xmonad-clock
wait