Xmonad/Using xmonad in KDE: Difference between revisions
(Set KDEWM in ~/.kde/env) |
(Fix bug and formatting in config file) |
||
Line 38: | Line 38: | ||
=== Xmonad Configuration === | === Xmonad Configuration === | ||
< | <haskell> | ||
import XMonad | import XMonad | ||
Line 46: | Line 47: | ||
main = xmonad $ defaultConfig | main = xmonad $ defaultConfig | ||
{ | { manageHook = manageHook defaultConfig <+> myManageHook | ||
} | } | ||
where | where | ||
myManageHook = composeAll . concat $ | myManageHook = composeAll . concat $ | ||
[ [ className =? c | [ [ className =? c --> doFloat | c <- myFloats] | ||
, [ title =? t | , [ title =? t --> doFloat | t <- myOtherFloats] | ||
, [ resource =? r | , [ resource =? r --> doIgnore | r <- myIgnores] | ||
, [ className =? "Firefox-bin" | , [ className =? "Firefox-bin" --> doF (W.shift "2:web") ] | ||
, [ className =? "Opera" | , [ className =? "Opera" --> doF (W.shift "2:web") ] | ||
] | ] | ||
where | where | ||
myIgnores = ["gnome-panel", "desktop_window", "kicker", "KDE Desktop", "KNetworkManager", "KMix", "Power Manager", "KPowersave", "klipper", "knotes", "panel", "stalonetray", "trayer"] | myIgnores = ["gnome-panel", "desktop_window", "kicker", | ||
"KDE Desktop", "KNetworkManager", "KMix", | |||
"Power Manager", "KPowersave", "klipper", | |||
"knotes", "panel", "stalonetray", "trayer"] | |||
myFloats = ["MPlayer", "Gimp", "kdesktop"] | myFloats = ["MPlayer", "Gimp", "kdesktop"] | ||
myOtherFloats = ["alsamixer"] | myOtherFloats = ["alsamixer"] | ||
</ | </haskell> | ||
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. | 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. | ||
Revision as of 13:15, 8 April 2008
Below configuration is for xmonad 0.5, known to work on Kubuntu

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.
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.
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"