Alexander Kojevnikov | Blog

xmonad-log-applet for GNOME and Xfce

xmonad-log-applet is a handy panel applet/plugin for GNOME (and now Xfce) users who use Xmonad as an alternative window manager. The applet will show the visible workspace(s), active window's title or anything you send its way from your xmonad.hs.

I recently took over xmonad-log-applet maintainership from Adam Wick, and today I'm happy to announce the release of version 2.0.0.

xmonad-log-applet

Changes since the previous release:

To install get and unpack the tarball or clone the repo, then run:

% ./configure --with-panel=gnome2
% make
% sudo make install

Substitute gnome2 with gnome3 or xfce4 if that's what you use. If you cloned the git repo, use ./autogen.sh instead of ./configure. After restarting the panel you should be able to add the applet.

Use the provided sample xmonad.hs file to bind it to Xmonad. It depends on the DBus package, which currently doesn't compile with GHC 7.x, but it's easy to work around:

% cabal update
% cabal unpack DBus
% cd DBus-0.4
% $EDITOR DBus/Internal.hsc

Replace import Control.Exception with import Control.OldException, then:

% cabal configure
% cabal build
% cabal install

After this, your xmonad.hs should compile.

EDIT: With GHC 7.4, you also need to edit DBus/Message.hsc and prepend Foreign. to unsafePerformIO.

Happy Xmonading!

Published: 2011-09-20

Tags: gnome haskell xmonad xla

xmonad ⋙ metacity (mod GNOME)

xmonad is an elegantly minimalist and lightning fast window manager for X written in Haskell. I wanted to play with it for a long time: I'm using two 24" monitors and so have to spend a fair bit of time re-sizing windows and moving them around. A tiling window manager like xmonad takes care of this; in addition you can control all aspects of window placement with the keyboard alone.

The good news is: xmonad plays really well with GNOME. You can keep your GNOME panels, themes, desktop backgrounds, etc – xmonad just replaces Metacity leaving everything else intact.

The bad news is: I should have tried it earlier.

A few notes about xmonad set up and usage:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Xmonad
Exec=/usr/bin/xmonad
NoDisplay=true
X-GNOME-WMName=Xmonad
X-GNOME-Bugzilla-Bugzilla=XMonad
X-GNOME-Bugzilla-Product=xmonad
X-GNOME-Bugzilla-Component=general
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
X-GNOME-Autostart-Notify=true
/desktop/gnome/session/required_components/windowmanager
xsetroot -cursor_name left_ptr
import XMonadimport XMonad.Config.Gnome main = xmonad gnomeConfig
import XMonad
import XMonad.Config.Gnome

main = do
  xmonad $ gnomeConfig
    { terminal    = "gnome-terminal"
    , modMask     = mod4Mask
    , focusFollowsMouse = False
    , borderWidth = 2
    }
import XMonad
import XMonad.Config.Gnome
import XMonad.Actions.Submap

import Control.Arrow
import Data.Bits
import qualified Data.Map as M

main :: IO ()
main = do
    xmonad $ gnomeConfig
         { terminal = "gnome-terminal"
         , focusFollowsMouse = False
         , borderWidth = 2
         , keys = addPrefix (controlMask, xK_m) (keys gnomeConfig)
         }

addPrefix p ms conf =
    M.singleton p . submap $ M.mapKeys (first chopMod) (ms conf)
    where
    mod = modMask conf
    chopMod = (.&. complement mod)

After using xmonad for 2 days I must say I'm a convert. The keyboard short-cuts feel very natural, it's not difficult to see the influence of vi. Moving a window to another screen or to another workspace (did I mention workspaces are per screen, which is a really neat feature), switching between workspaces, switching windows, changing layouts, etc... is just a short-cut away.

And as a bonus point, I now have a good reason to become more familiar with Haskell – it's a very nice language.

Published: 2009-10-18

Tags: gnome haskell xmonad

Page 1 / 1