Difference between revisions of "User:Hgabreu"

From HaskellWiki
Jump to navigation Jump to search
Line 30: Line 30:
 
: killall xfwm4 && xmonad
 
: killall xfwm4 && xmonad
   
  +
I've heard that on Xfce 4.6 xfwm4 is not removed from session, and it's necessary to do it manually editing the file ~/.cache/session/xfce4-session-users:0 after logging out.
 
I'll finish the guide later..
 
I'll finish the guide later..

Revision as of 18:38, 31 March 2009

Intro

I have no knowledge of Haskell and therefore the codes provided are mostly copied from documentation, examples and users help on xmonad irc channel. Since I'm a newbie, I believe this guide will be a good start for other newbies, or at least easier to read.

Installing XMonad

I installed XMonad from Debian sources and it was just like any other packages. On terminal as root:

apt-get install xmonad libghc6-xmonad-contrib-dev libghc6-xmonad-dev dwm-tools

I'm on Debian Squeeze with XFCE environment and I think it's easy for newbies to use xmonad within an desktop environment so you have easy configurations provided by the environment for keyboard, mouse, wallpaper, graphical applets, themes and so on. I like xfce because it has better applets, it's light and easy to configure. By the way, I recommend using squeeze sources since lenny has only xmonad older version, which doesn't have some nice features.

Configuring Xfce and XMonad

I followed Xmonad/Using_xmonad_in_XFCE to set up xfce, xmonad and start using it. But as a good newbie I had some difficulties in this process that I'll try to clear here. After installing xmonad packages, create a dir in your home called .xmonad/ and create a xmonad.hs in it with the following contents: (Notice that the file manager normally hides dir and files that starts with a dot, press 'ctrl+h' to show them)

import XMonad
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks

main = do
    xmonad $ defaultConfig
        { manageHook = manageDocks <+> manageHook defaultConfig
        , layoutHook = ewmhDesktopsLayout $ avoidStruts $ layoutHook defaultConfig
        , logHook    = ewmhDesktopsLogHook
        , modMask    = mod4Mask --set windows key as modifier to avoid conflicts
        }

I know that it looks weird but you doesn't need to understand it to use xmonad (I truly don't). Also note that the indentation is important, so copy it exactly.

Now the last configuration necessary is to tell Xfce to use xmonad instead of xfwm4, but there's no standard way to do this, what we're going to do is kill xfwm4 and use xfce session management to keep it killed, this feature is default on xfce so just don't disable it. In order to xfce open xmonad at startup you need to add it to 'Autostarted Applications' in Xfce menu > Settings, just click 'add' and type xmonad on both name and command fields. Configuration is done! To starting using it now press 'Alt+F2' and type

killall xfwm4 && xmonad

I've heard that on Xfce 4.6 xfwm4 is not removed from session, and it's necessary to do it manually editing the file ~/.cache/session/xfce4-session-users:0 after logging out. I'll finish the guide later..