|
xmonadfrequently asked questions |
What build dependencies does xmonad have?The hackage page for xmonad lists all dependencies, namely: Standard Haskell libraries (you might already have these installed): X11 bindings: Note also you'll need the standard X libraries:
Can I install without root permission?Yes, the Haskell libraries that xmonad depends on can all by installed in the user package database. Simply append --user to the install phase:
$ runhaskell Setup.hs install --user
The library will be registered in your ~/.ghc/ database. How do I configure xmonad?By editing the Config.hs file, a Haskell source file. You can use any Haskell you want in this module. To have your changes take effect, recompile xmonad, reinstall it, and either restart (mod-q) or exit X, and log back in. Note that when reinstalling, cabal might prevent you from overwriting the running xmonad binary:
Installing: /home/dons/lib/xmonad-0.2/ghc-6.6 & /home/dons/bin xmonad-0.2...
copy /usr/obj/cabal/xmonad/xmonad to /home/dons/bin/xmonad
*** Exception: /home/dons/bin/xmonad: copyFile: resource busy (Text file busy)
The solution is to remove the old xmonad binary before install.
rm `which xmonad`
Does xmonad support a statusbar?Yes. Arbitrary external programs may be used as a statusbar. See for example dzen. xmonad lets you use any application as a 'statusbar', as long as it is visible in a given 'gap' on the screen, and has the override-redirect property set to true. Many status bar/dock programs already set this property, for example, dzen. To set other applications, you can sometimes use normal X resources. For example, to use xclock, launch it with
xclock -digital -xrm '*overrideRedirect: True' -geometry 1024x30+0+0
And set a gap of (30,0,0,0) in Config.hs.
A similar trick can be done for xsystray.
How can I use xmonad with a display manager? (xdm, kdm, gdm)The simplest way is to create or modify your ~/.xsession file to run xmonad. If you don't already have a .xsession, the minimal example looks like:
xmonad
This requires that the xmonad executable (or a symlink to it) is in a directory in your $PATH. Alternatively, you can use the full path to xmonad. People using 'startx' can use these example xinitrc and run-xmonad scripts. If you are using xdm, you're done. Login and enjoy xmonad. If you're using kdm or gdm (KDE and GNOME's display mangers, respectively), you're almost done. When logging in, select the entry that says "xsession" or "default session" from the menu in order to use your ~/.xsession to start xmonad. Alternatively, if you want a menu entry specifically for xmonad, create a file named "xmonad.desktop" in your /usr/share/xsessions (location varies by distribution) directory. For example:
[Desktop Entry]
Encoding=UTF-8
Name=xmonad
Comment=This session starts xmonad
Exec=/usr/local/bin/xmonad
Type=Application
Replace the "Exec=..." line with the actual path to your xmonad executable, and you should be able to login by selecting "xmonad" as a session from the menu in gdm/kdm. Using a dock clientAs of version 0.2, dock clients (such as gkrellm) aren't specially supported. They will be treated as a normal window. It is possible to use them by explicitly unmanaging the window, after moving it into a gap space. Dock clients will likely be properly supported in version 0.3. X11 or X11-extras fail to find libX11 or libXineramaCabal has difficulty locating library directories on some platforms (such as the Mac or RHEL4). First, locate the directory that contains libX11.so (libX11.dylib on Mac OS X). Add the following line to the .cabal file for the package:
extra-lib-dirs: /your/path/here/
For example, on a 64 bit machine you might need to add:
extra-lib-dirs: /usr/X11R6/lib/lib64
Rebinding the mod keyxmonad uses 'alt', actually mod1, as the default modifier. You may bind to other mod keys by editing Config.hs' modMask value, or by using xmodmap to rebind a key to mod1. The apple command key can be rebound to mod1 in this way. Use xmodmap to find what key your mod1 is bound to, as well. You can rebind the Caps Lock key, to mod, if you wish. See this mailing list item. If your new key binding doesn't appear to work, double check it doesn't clash with an existing binding. Saving layoutxmonad will remember your workspace layouts during dynamic restart (mod-q), but not when quitting X altogether. Startup programsYou may launch programs at startup in the usual X manner: by adding them to your .xsession or .Xinitrc. For example, the following .xsession file launches 'unclutter' to hide the cursor, xpmroot to set the background image, xmodmap to rebind caps lock to ctrl. It then launches a status bar program with dzen, before finally launching xmonad:
# .xsession
unclutter -idle 1 &
xpmroot ~/.bg/407511721_eb8559457c_o.xpm &
xrdb -merge .Xresources
xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Control = Control_L"
status | dzen2 -ta r -fg '#a8a3f7' \
-bg '#3f3c6d' \
-fn '-*-terminus-medium-r-normal--16-*' \
-e "button1=exec:xterm" &
urxvt &
$HOME/bin/xmonad
Losing text when resizing xtermsBeing a dynamic tiling window manager, xmonad, like ion or dwm, makes heavy use of resizing. Poor clients such as xterm, might not take well to resizing and will require explicit resize events to be set (Ctrl-L). This however, can cause the buffer to be cleared. To avoid this, several users recommend urxvt (rxvt-unicode), which handles resizing much better. Main.hs:175:8: Not in scope: data constructor `ConfigureEvent'When building a darcs version of xmonad, you will also need to use a darcs version of the X11-extras library. That is available from:
darcs get http://darcs.haskell.org/~sjanssen/X11-extras
Dynamic restartThe dynamic reconfigure and restart feature (mod-q) assumes that xmonad is in your $PATH environment. If it isn't, restarting will have no effect. |