Difference between revisions of "User:Hgabreu"

From HaskellWiki
Jump to navigation Jump to search
m
Line 9: Line 9:
   
 
== Configuring Xfce and XMonad ==
 
== Configuring Xfce and XMonad ==
I followed [[Xmonad/Using_xmonad_in_XFCE]] to set up xfce and xmonad and start using it. But as a good newbie I had some difficulties to have it running that I'll try to clear here.
+
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.
 
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.
 
<haskell>
 
<haskell>

Revision as of 14:09, 16 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 easier to configure. 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. For xfce to open xmonad no startup add it to 'Autostarted Applications' in Xfce menu > Settings, just click add and type xmonad on name and command fields. Configuration is done! To starting using it now press 'Alt+F2' and type

killall xfwm4 && xmonad

I'll finish the guide later..