Personal tools

Xmonad/Config archive/Don's xmonad.hs

From HaskellWiki

< Xmonad | Config archive(Difference between revisions)
Jump to: navigation, search
 
(10 intermediate revisions by 3 users not shown)
Line 5: Line 5:
   
 
<haskell>
 
<haskell>
 
 
import XMonad
 
import XMonad
import XMonad.Core
 
import XMonad.Config
 
 
import XMonad.Hooks.DynamicLog
 
import XMonad.Hooks.DynamicLog
  +
import XMonad.Util.EZConfig
  +
import XMonad.Prompt
  +
import XMonad.Prompt.RunOrRaise
  +
import XMonad.Hooks.SetWMName
  +
import XMonad.Hooks.ManageHelpers
  +
import XMonad.Hooks.ManageDocks
  +
import XMonad.Layout.NoBorders
   
main = xmonad $ defaultConfig
+
main = do
{ borderWidth = 2
+
conf <- dzen defaultConfig
, defaultGaps = [(18,0,0,0)]
+
xmonad $ conf
, terminal = "term"
+
{ terminal = "term"
, normalBorderColor = "#cccccc"
+
, startupHook = setWMName "LG3D"
, focusedBorderColor = "#cd8b00"
+
, layoutHook = smartBorders (layoutHook conf)
, logHook = dynamicLogDzen }
+
-- , manageHook = composeOne [ isFullscreen -?> doFullFloat ]
  +
}
  +
`additionalKeys`
  +
[ ((modMask conf , xK_p), runOrRaisePrompt defaultXPConfig { position = Top })]
  +
</haskell>
   
  +
Launches dzen on startup, with some good defaults.
  +
  +
My .xinitrc:
  +
  +
<haskell>
  +
# .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
  +
  +
trayer --transparent true --widthtype request --height 18 --align right --edge top --expand true &
  +
gnome-power-manager &
  +
nm-applet &
  +
  +
# launch the external 60 second clock, and launch the workspace status bar
  +
FG='#a8a3f7'
  +
BG='#3f3c6d'
  +
  +
  +
while true ; do date ; sleep 60 ; done | dzen2 -e '' -x 400 -w $off -ta r -fg $FG -bg $BG -p &
  +
  +
dbus-launch --exit-with-session xmonad
 
</haskell>
 
</haskell>
  +
  +
[[Category:XMonad configuration]]

Latest revision as of 18:14, 21 February 2009

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 XMonad.Hooks.DynamicLog
import XMonad.Util.EZConfig
import XMonad.Prompt
import XMonad.Prompt.RunOrRaise
import XMonad.Hooks.SetWMName 
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.ManageDocks
import XMonad.Layout.NoBorders
 
main = do
    conf <- dzen defaultConfig
    xmonad $ conf
        { terminal    = "term"
        , startupHook = setWMName "LG3D"
        , layoutHook = smartBorders (layoutHook conf)
--      , manageHook = composeOne [ isFullscreen -?> doFullFloat ]
        }
         `additionalKeys`
        [ ((modMask conf , xK_p), runOrRaisePrompt defaultXPConfig { position = Top })]

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
 
trayer --transparent true --widthtype request --height 18 --align right --edge top --expand true &
gnome-power-manager &
nm-applet &
 
# launch the external 60 second clock, and launch the workspace status bar
FG='#a8a3f7' 
BG='#3f3c6d' 
 
 
while true ; do date ; sleep 60 ; done | dzen2 -e '' -x 400 -w $off -ta r -fg $FG -bg $BG -p &
 
dbus-launch --exit-with-session xmonad