
xmonad is a
dynamic window manager (
tiling) for the
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
, noted for being written in the
functional programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
Haskell
Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
.
Window manager
Begun in March 2007, version 0.1 was announced
[ ] in April 2007 as 500
lines of Haskell (which have since grown to 2000 lines). xmonad is a
tiling window manager—akin to
dwm,
larswm, and
StumpWM. It arranges windows in a non-overlapping pattern, and enables managing windows without using the
mouse
A mouse (: mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus'' ...
. xmonad is
packaged and distributed on a wide range of
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating systems, such as a large number of
Linux distributions, and
Berkeley Software Distribution
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginn ...
(BSD) systems.
While originally a
clone of dwm (derivative in areas such as default keybindings), xmonad now supports features not available to dwm users such as per-workspace layout, tiling reflection, state preservation, layout mirroring,
GNOME support and per-screen status bars; it can be customised by modifying an external configuration file and 'reloaded' while running. xmonad features have begun to influence other tiling window managers: dwm has borrowed "urgency hooks" from xmonad, has also included
Xinerama support (for
multihead displays) with
release
Release may refer to:
* Art release, the public distribution of an artistic production, such as a film, album, or song
* Legal release, a legal instrument
* News release, a communication directed at the news media
* Release (ISUP), a code to i ...
4.8, and patches exist to reimplement xmonad's Fibonacci layout.
Haskell project
In 2023 the
man page stated:
By utilising the expressivity of a modern functional language with a rich static type
In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
system, xmonad provides a complete, featureful window manager .. with an emphasis on correctness and robustness. Internal properties of the window manager are checked using a combination of static guarantees provided by the type system
In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify.
Since xmonad's inception, when its small code size of 500 lines of code was advertised, it has grown to ca. 2000 lines in 2023.
Extensions to the core system, including emulation of other window managers, and unusual layout algorithms, such as window
tiling based on the
Fibonacci spiral—have been implemented by the active community and are available as a library.
Along with obviating the need for a mouse,
the xmonad developers make heavy use of semi-
formal methods
In computer science, formal methods are mathematics, mathematically rigorous techniques for the formal specification, specification, development, Program analysis, analysis, and formal verification, verification of software and computer hardware, ...
and
program derivation for improving reliability and enabling a total line of code count less than 1200, as of version 0.7; window manager properties (such as the behavior of window focus) are checked through use of
QuickCheck.
This emphasis makes xmonad unusual in a number of ways; besides being the first window manager written in Haskell, it is also the first to use the
zipper
A zipper (N. America), zip, zip fastener (UK), formerly known as a clasp locker, is a commonly used device for binding together two edges of textile, fabric or other flexible material. Used in clothing (e.g. jackets and jeans), luggage and oth ...
data structure
In computer science, a data structure is a data organization and storage format that is usually chosen for Efficiency, efficient Data access, access to data. More precisely, a data structure is a collection of data values, the relationships amo ...
for automatically managing
focus, and its core has been proven to be safe with respect to
pattern matches, contributing further to reliability. The developers write:
xmonad is a tiling window manager for the X Window system, implemented, configured and dynamically extensible in Haskell. This demonstration presents the case that software dominated by side effects
In medicine, a side effect is an effect of the use of a medicinal drug or other treatment, usually adverse but sometimes beneficial, that is unintended. Herbal and traditional medicines also have side effects.
A drug or procedure usually used ...
can be developed with the precision and efficiency we expect from Haskell by utilising purely functional data structures, an expressive type system
In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
, extended static checking and property-based testing. In addition, we describe the use of Haskell as an application configuration and extension language.
The code is separated into side-effect free code, and a thin wrapper for the side-effects.
According to Alejandro Serrano Mena, there are two ways of implementing
domain-specific languages for actions in Haskell
applications and
libraries
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
: "developing a
combinator library" or "rolling your own
monad", with xmonad being a successful example of the latter.
xmonad was regarded as one of the most well known Haskell projects in a 2013 functional programming book.
Reception
''
Linux Magazine'' included xmonad in a list of "My Top Resources of 2009".
In 2012, How-To Geek described xmonad as having good, but complex, ability to be configured,
and it was included in a 2013 list of eight desktop environments for Linux.
''
Lifehacker
''Lifehacker'' is a weblog about life hacks and software that launched on 31 January 2005. The site was originally launched by Gawker Media and is owned by Ziff Davis. The blog posts cover a wide range of topics including Microsoft Windows, M ...
'' wrote that the basic operations of xmonad's user interface can be taught using a small set of instructions.
A high level of customisation and speed were noted by
Network World
International Data Group (IDG, Inc.) is an American market intelligence and demand generation company focused on the technology industry. IDG, Inc.'s mission is centered around supporting the technology industry through research, data, market ...
,
and in MakeUseOf xmonad was reviewed positively compared to
Openbox.
In 2016 ''
Ars Technica
''Ars Technica'' is a website covering news and opinions in technology, science, politics, and society, created by Ken Fisher and Jon Stokes in 1998. It publishes news, reviews, and guides on issues such as computer hardware and software, sci ...
'' said xmonad and
Awesome had more advanced tiling ability than
Cinnamon
Cinnamon is a spice obtained from the inner bark of several tree species from the genus ''Cinnamomum''. Cinnamon is used mainly as an aromatic condiment and flavouring additive in a wide variety of cuisines, sweet and savoury dishes, biscuits, b ...
. In 2017 it was described as powerful, with application as a windows manager for
big data
Big data primarily refers to data sets that are too large or complex to be dealt with by traditional data processing, data-processing application software, software. Data with many entries (rows) offer greater statistical power, while data with ...
,
while in an article on
opensource.com on the other hand, dwm was chosen over xmonad. A ''
TechRadar'' review of the "Best Linux desktop of 2018" said "If there's one desktop environment that stands out from all the others we have here, it's this one."
Due to the small number of lines of code of the Xmonad application, the use of the
purely functional programming
In computer science, purely functional programming usually designates a programming paradigm—a style of building the structure and elements of computer programs—that treats all computation as the evaluation of function (mathematics), mathematic ...
language
Haskell
Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
, and recorded use of a rigorous testing procedure it is sometimes used as a baseline application in other research projects. This has included re-implementation of xmonad using the
Coq proof assistant,
a determination xmonad is an
imperative program,
and studies of
package management relating to the
NixOS linux distribution.
See also
*
Comparison of X window managers
*
Formal verification
In the context of hardware and software systems, formal verification is the act of proving or disproving the correctness of a system with respect to a certain formal specification or property, using formal methods of mathematics.
Formal ver ...
References
Works cited
*
*
Association for Computing Machinery archive**
Further reading
* According to Bryan Lunduke xmonad is an unknown
desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
written in an unknown programming language, adding "Are xmonad and Haskell failures? Are they dead? No. Because they are unique. They are customizable. They are alive and kicking (and awesome)."
* – the use of xmonad and other lightweight window managers
External links
*
"Taste of Haskell"–
O'Reilly Open Source Convention (OSCON) presentation by
Simon Peyton Jones on Haskell, using xmonad as an example
*
First half of talk on YouTube(video)
*
Second half of talk on YouTube(video)
{{Haskell programming
Free software programmed in Haskell
Free X window managers
Tiling window managers
X window managers extensible by scripting
Software using the BSD license