xmonad
A tiling window manager
Version on this page: | 0.13@rev:1 |
LTS Haskell 22.34: | 0.17.2 |
Stackage Nightly 2024-09-17: | 0.18.0 |
Latest on Hackage: | 0.18.0 |
xmonad-0.13@sha256:5dba7f7f3bb5092fd9c7d8c3ee49ae2647fd6ec4009780c727027202072878d6,4043
Module documentation for 0.13
xmonad: A Tiling Window Manager
xmonad is a tiling window manager for X. Windows are arranged automatically to tile the screen without gaps or overlap, maximising screen use. Window manager features are accessible from the keyboard: a mouse is optional. xmonad is written, configured and extensible in Haskell. Custom layout algorithms, key bindings and other extensions may be written by the user in config files. Layouts are applied dynamically, and different layouts may be used on each workspace. Xinerama is fully supported, allowing windows to be tiled on several physical screens.
Quick Start
-
From hackage:
cabal update cabal install xmonad xmonad-contrib
-
Alternatively, build from source using the following repositories:
For the full story, read on.
Building
Building is quite straightforward, and requires a basic Haskell toolchain. On many systems xmonad is available as a binary package in your package system (e.g. on Debian or Gentoo). If at all possible, use this in preference to a source build, as the dependency resolution will be simpler.
We’ll now walk through the complete list of toolchain dependencies.
-
GHC: the Glasgow Haskell Compiler
You first need a Haskell compiler. Your distribution’s package system will have binaries of GHC (the Glasgow Haskell Compiler), the compiler we use, so install that first. If your operating system’s package system doesn’t provide a binary version of GHC and the
cabal-install
tool, you can install both using the Haskell Platform.It shouldn’t be necessary to compile GHC from source – every common system has a pre-build binary version. However, if you want to build from source, the following links will be helpful:
-
X11 libraries:
Since you’re building an X application, you’ll need the C X11 library headers. On many platforms, these come pre-installed. For others, such as Debian, you can get them from your package manager:
$ apt-get install libx11-dev libxinerama-dev libxext-dev
Running xmonad
If you built XMonad using cabal
then add:
exec $HOME/.cabal/bin/xmonad
to the last line of your .xsession
or .xinitrc
file.
Configuring
See the CONFIG document and the example configuration file.
XMonadContrib
There are many extensions to xmonad available in the XMonadContrib (xmc) library. Examples include an ion3-like tabbed layout, a prompt/program launcher, and various other useful modules. XMonadContrib is available at:
-
Latest release: http://hackage.haskell.org/package/xmonad-contrib
-
Git version: https://github.com/xmonad/xmonad-contrib
Other Useful Programs
A nicer xterm replacement, that supports resizing better:
For custom status bars:
-
taffybar: https://github.com/travitch/taffybar
For a program dispatch menu:
-
XMonad.Prompt.Shell: (from XMonadContrib)
-
gmrun: (in your package system)
Authors
- Spencer Janssen
- Don Stewart
- Jason Creighton
Changes
Change Log / Release Notes
0.13 (February 10, 2017)
Breaking Changes
-
When restarting xmonad, resume state is no longer passed to the next process via the command line. Instead, a temporary state file is created and xmonad’s state is serialized to that file.
When upgrading to 0.13 from a previous version, the
--resume
command line option will automatically migrate to a state file.This fixes issue #12.
Enhancements
-
You can now control which directory xmonad uses for finding your configuration file and which one is used for storing the compiled version of your configuration. In order of preference:
-
New environment variables. If you want to use these ensure you set the correct environment variable and also create the directory it references:
XMONAD_CONFIG_DIR
XMONAD_CACHE_DIR
XMONAD_DATA_DIR
-
The
~/.xmonad
directory. -
XDG Base Directory Specification directories, if they exist:
XDG_CONFIG_HOME/xmonad
XDG_CACHE_HOME/xmonad
XDG_DATA_HOME/xmonad
If none of these directories exist then one will be created using the following logic: If the relevant environment variable mentioned in step (1) above is set, the referent directory will be created and used. Otherwise
~/.xmonad
will be created and used.This fixes a few issues, notably #7 and #56.
-
-
A custom build script can be used when xmonad is given the
--recompile
command line option. If an executable namedbuild
exists in the xmonad configuration directory it will be called instead ofghc
. It takes one argument, the name of the executable binary it must produce.This fixes #8. (One of two possible custom build solutions. See the next entry for another solution.)
-
For users who build their xmonad configuration using tools such as cabal or stack, there is another option for executing xmonad.
Instead of running the
xmonad
executable directly, arrange to have your login manager run your configuration binary instead. Then, in your binary, use the newlaunch
command instead ofxmonad
.This will keep xmonad from using its configuration file checking/compiling code and directly start the window manager without
exec
ing any other binary.See the documentation for the
launch
function inXMonad.Main
for more details.Fixes #8. (Second way to have a custom build environment for XMonad. See previous entry for another solution.)
0.12 (December 14, 2015)
-
Compiles with GHC 7.10.2, 7.8.4, and 7.6.3
-
Use of data-default allows using
def
where previously you had to writedefaultConfig
,defaultXPConfig
, etc. -
The setlocale package is now used instead of a binding shipped with xmonad proper allowing the use of
Main.hs
instead ofMain.hsc
-
No longer encodes paths for
spawnPID
-
The default
manageHook
no longer floats Gimp windows -
Doesn’t crash when there are fewer workspaces than screens
-
Query
is now an instance ofApplicative
-
Various improvements to the example configuration file