Difference between revisions of "Xmonad/Using xmonad in KDE"

From HaskellWiki
Jump to navigation Jump to search
(Disable KDE multi desktops before you begin)
Line 1: Line 1:
 
 
{{xmonad}}
 
{{xmonad}}
 
[[Category:XMonad]]
 
[[Category:XMonad]]
Line 18: Line 17:
   
 
The [http://haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome GNOME/xmonad] page.
 
The [http://haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome GNOME/xmonad] page.
  +
  +
== Before you begin ==
  +
  +
Make sure that KDE is not configured for multiple desktops.
  +
To configure that, open the KDE Control Center, select
  +
'''Desktop''' > '''Multiple desktops''', and set the number
  +
of desktops to 1.
   
 
== Make xmonad your window manager in KDE ==
 
== Make xmonad your window manager in KDE ==

Revision as of 21:22, 8 April 2008

Xmonad-logo-small.png

XMonad

Below configuration is for xmonad 0.5, known to work on Kubuntu

Screen-sjanssen-kde-kicker.png

Motivation

Easier system monitoring on laptops with networking widget.

Ability to browse all programs and utitlities with desktop bar (kicker)

Easy integration of Xmonad on a system using kdm for logins

Related reading

The GNOME/xmonad page.

Before you begin

Make sure that KDE is not configured for multiple desktops. To configure that, open the KDE Control Center, select Desktop > Multiple desktops, and set the number of desktops to 1.

Make xmonad your window manager in KDE

Create the directory ~/.kde/env if it does not already exist. Create a file there called set_window_manager.sh containing only the following line of text:

KDEWM=/path/to/xmonad

where "/path/to/xmonad" is the path to the xmonad binary on your system. For example, on Debian systems this is /usr/bin/xmonad, and if you compiled xmonad by hand it may be something like /home/$USER/bin/xmonad.

Dealing with KDE windows

Without doing anything, you now have a working KDE environment. One nice thing is that system notification windows will pop-up as small windows in the upper left window.

KDE desktop and panel applets

The KDE desktop appears as a separate window in xmonad. Some KDE panel applets also appear as a separate window in xmonad and do not install into the panel. You may want to reserve a separate xmonad desktop for these, separate from the desktop you use for the panel itself.

Note that among the applets that appear in a separate window is the xkb applet that switches between different keyboard layouts. That allows you the flexibility of managing its location in xmonad.

Xmonad Configuration

import XMonad

import XMonad.Config

import qualified XMonad.StackSet as W

main = xmonad $ defaultConfig
    { manageHook            = manageHook defaultConfig <+> myManageHook
    }
    where
           myManageHook = composeAll . concat $
           [ [ className   =? c               --> doFloat | c <- myFloats]
           , [ title       =? t               --> doFloat | t <- myOtherFloats]
           , [ resource    =? r               --> doIgnore | r <- myIgnores]
           , [ className   =? "Firefox-bin"   --> doF (W.shift "2:web") ]
           , [ className   =? "Opera"         --> doF (W.shift "2:web") ]
           ]
           where
               myIgnores       = ["gnome-panel", "desktop_window", "kicker",
                                  "KDE Desktop", "KNetworkManager", "KMix",
                                  "Power Manager", "KPowersave", "klipper",
                                  "knotes", "panel", "stalonetray", "trayer"]
               myFloats        = ["MPlayer", "Gimp", "kdesktop"]
               myOtherFloats   = ["alsamixer"]

After ignoring the KDE kicker and panels, they will all be placed on the first desktop, which should be reserved for these items. It looks kind of odd, but it works.

KDE Configuration

If you don't use the KDE kicker bar much, you may want to configure the kicker bar to autohide, and show when the mouse touches the lower left corner of the screen. Right click on the bar, select "Configure Panel", select "Hiding" on the left, select "Hide Automatically", select "Raise when the pointer touches the screen's", select "Lower left Corner"