Configure Xfce and Xmonad

This is my first "contribution" in the world GNU / Linux, I hope you find it useful. This in a small guide of how I have configured xmonad, and how to substitute xfwm4 by xmonad.

Why xmonad and xfce?

After working with xmonad for a while, I realized that it lacks “something”, in my case the themes for windows, mouse, volume,…. etc, and I don't know how to configure with haskell. So the easiest way to achieve something similar was to exchange xfwm4 for xmonad, I really liked the end result.

Installing xmonad

aptitude install ghc xmonad xmobar gmrun dmenu

Setting up xmonad

Once xmonad is installed, we move to the .xmonad folder

cd ~/.xmonad

If it does not exist we create it

mkdir ~/.xmonad

Inside the folder we create a text file called xmonad.hs, open it with our favorite text editor and paste the following code in it. (If it exists, we delete or rename it)

xmonad.hs

We compile the file with

xmonad --recompile

Now we have xmonad configured, the global keys are in the xmonad.hs file

Changing xfwm4 to xmonad

First we add xmonad to the applications autostart, in
xfce> settings> Configuration manager> Session and startup> Applications autostart> add>

name: xfce-xmonad (or whatever you want)
description: xfce-xmonad (or whatever you want)
command: xmonad

Now we end the xfwm4 process and save the session.
xfce> configuration> Configuration manager> Session and login> Session

We select xfwm4 and click on close program, then save session

Important before closing xfwm4 we open a terminal (it never hurts)

If you want to see the result (without closing the session) put in the console

xmonad&

Wait I don't like how I look!

Just remove xmonad from autostart (if you called it that), and in the terminal put

xfwm4&

Save session and ready as if something had not happened

Hope that useful.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   @Jlcmux said

    I tried but got the error
    "Xmonad.hs: 1: 1: Parse error: naked expression at top level"

    And I can't move. maximize or some action of these with the windows and it did not improve the cursor view much.

    What to do?

    1.    alpj said

      mmmm according to http://paste.desdelinux.net/4658 the first line must be a comment
      - Win + F1 Iceweasel
      If you deleted the comments, the first line should be this
      import Xmonad
      check if the other lines have the same indentation.
      (incorrect)
      import Xmonad
      import qualified XMonad.StackSet as W
      import qualified Data.Map as M

      (Right)
      import Xmonad
      import qualified XMonad.StackSet as W
      import qualified Data.Map as M

      Well, it tells you that the error is in line 1, and you will not be able to use the global keys until the file compiles, I leave you my .xmonad folder
      http://www.mediafire.com/?t4gorohuvurgo86

  2.   hexborg said

    The trick of saving the session to be able to change the XFCE window manager is very good. I think I had seen it somewhere else. I have to try it. Good article. 🙂

  3.   rots87 said

    the tip looks good ... to my list of things to try

  4.   helena_ryuu said

    very interesting, having xmonad working with xfce 😀, I am new to WM tiling, but I must say that awesome is amazing !!!

    1.    Wada said

      Yeeeii a user awesome I felt lonely 😛 hahahaha Awesome is great 😀

  5.   auroszx said

    Wow, what a curious combination. Oo I would use it with Openbox (well, actually Xfwm4 is enough for me).

  6.   alpj said

    hahaha he didn't put the blanks for me, well let's suppose - it's a space
    incorrect)
    -import Xmonad
    –Import qualified XMonad.StackSet as W
    import qualified Data.Map as M

    (Right)
    import Xmonad
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M

  7.   Let's use Linux said

    Ahhh .. Linux and its immeasurable customization. 🙂
    I love it!