xmonad is a
dynamic window manager
In computing, a dynamic window manager is a tiling window manager where windows are tiled based on preset layouts between which the user can switch. Layouts typically have a main area and a secondary area. The main area usually shows one window, b ...
(
tiling
Tiling may refer to:
*The physical act of laying tiles
*Tessellations
Computing
*The compiler optimization of loop tiling
*Tiled rendering, the process of subdividing an image by regular grid
*Tiling window manager
People
*Heinrich Sylvester The ...
) 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 provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wit ...
, noted for being written in the
functional programming language
In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that m ...
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 has pioneered a number of programming lang ...
.
Window manager
Begun in March 2007, version 0.1 was announced
[ ] in April 2007 as 500
lines
Line most often refers to:
* Line (geometry), object with zero thickness and curvature that stretches to infinity
* Telephone line, a single-user circuit on a telephone communication system
Line, lines, The Line, or LINE may also refer to:
Arts ...
of Haskell. xmonad is a
tiling window manager
In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more common approach (used by stacking window managers) of coordinate-based stacking of overlap ...
—akin to
dwm
dwm is a minimalist dynamic window manager for the X Window System developed by Suckless that has influenced the development of several other X window managers, including xmonad and awesome. It is externally similar to wmii, but internally mu ...
,
larswm
larswm is a window manager for the X window system that follows the tiling window manager paradigm. Using ideas from the older 9wm window manager, it features automatic tiling and virtual desktops. It also borrows other ideas, for example a limi ...
, and
StumpWM
StumpWM is a tiling window manager that was created when developer Shawn Betts found ratpoison growing increasingly software bloat, large and "Lisp (programming language), lispy". Intended as a successor to ratpoison, StumpWM is released under the ...
. 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
Packaging is the science, art and technology of enclosing or protecting products for distribution, storage, sale, and use. Packaging also refers to the process of designing, evaluating, and producing packages. Packaging can be described as a co ...
and distributed on a wide range of
Unix-like
A Unix-like (sometimes referred to as UN*X 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 Unix-li ...
operating systems, such as a large number of
Linux distributions
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one ...
, and
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
A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
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
Xinerama is an extension to the X Window System that enables X applications and window managers to use two or more physical displays as one large virtual display.
Developed under the name ''PanoramiX'' by Madeline T. Asmus of the Digital Equipme ...
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 ident ...
4.8, and patches exist to reimplement xmonad's Fibonacci layout.
Haskell project
In 2007 the
man page
A man page (short for manual page) is a form of software documentation usually found on a Unix or Unix-like operating system. Topics covered include computer programs (including library and system calls), formal standards and conventions, and ev ...
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 to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
system, xmonad provides a complete, featureful window manager in less than 500 lines of code, 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, and type-based automated testing
In software testing, test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes. Test automation can automate some repetitive bu ...
. A benefit of this is that the code is simple to understand, and easy to modify.
Extensions to the core system, including emulation of other window managers, and unusual layout algorithms—such as window
tiling
Tiling may refer to:
*The physical act of laying tiles
*Tessellations
Computing
*The compiler optimization of loop tiling
*Tiled rendering, the process of subdividing an image by regular grid
*Tiling window manager
People
*Heinrich Sylvester The ...
based on the
Fibonacci spiral
Fibonacci (; also , ; – ), also known as Leonardo Bonacci, Leonardo of Pisa, or Leonardo Bigollo Pisano ('Leonardo the Traveller from Pisa'), was an Italian mathematician from the Republic of Pisa, considered to be "the most talented Western ...
—have been implemented by the active community and are available as a library.
In addition to obviating the need for the mouse,
the xmonad developers make heavy use of semi-
formal methods
In computer science, formal methods are mathematically rigorous techniques for the specification, development, and verification of software and hardware systems. The use of formal methods for software and hardware design is motivated by the expec ...
and
program derivation In computer science, program derivation is the derivation of a program from its specification, by mathematical means.
To ''derive'' a program means to write a formal specification, which is usually non-executable, and then apply mathematically corr ...
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
QuickCheck is a software library, specifically a combinator library, originally written in the programming language Haskell, designed to assist in software testing by generating test cases for test suites – an approach known as property testi ...
.
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, zip, fly, or zip fastener, 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 other Bag, ba ...
data structure
In computer science, a data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, a ...
for automatically managing
focus
Focus, or its plural form foci may refer to:
Arts
* Focus or Focus Festival, former name of the Adelaide Fringe arts festival in South Australia Film
*''Focus'', a 1962 TV film starring James Whitmore
* ''Focus'' (2001 film), a 2001 film based ...
, 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, whether therapeutic or adverse, that is secondary to the one intended; although the term is predominantly employed to describe adverse effects, it can also apply to beneficial, but unintended, consequence ...
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 to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
, 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
A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging f ...
for actions in Haskell
applications
Application may refer to:
Mathematics and computing
* Application software, computer software designed to help the user to perform specific tasks
** Application layer, an abstraction layer that specifies protocols and interface methods used in a c ...
and
libraries
A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
: "developing a
combinator library" or "rolling your own
monad
Monad may refer to:
Philosophy
* Monad (philosophy), a term meaning "unit"
**Monism, the concept of "one essence" in the metaphysical and theological theory
** Monad (Gnosticism), the most primal aspect of God in Gnosticism
* ''Great Monad'', an ...
", 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
''Linux Magazine'' is an international magazine for Linux software enthusiasts and professionals. It is published by the former Linux New Media division of the German media company Medialinx AG.
The magazine was first published in German in 199 ...
'' included xmonad in a list of "My Top Resources of 2009".
In 2012, How-To Geek described xmonad as having good, but complicated, 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 January 31, 2005. The site was originally launched by Gawker Media and is currently owned by G/O Media. The blog posts cover a wide range of topics including: Microsoft W ...
'' wrote that the basic operations of xmonads 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 a 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, marketing technol ...
,
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, breakfa ...
. In 2017 it was described as powerful, with application as a windows manager for
big data
Though used sometimes loosely partly because of a lack of formal definition, the interpretation that seems to best describe Big data is the one associated with large body of information that we could not comprehend when used only in smaller am ...
,
while in an article on
opensource.com on the other hand, dwm was chosen over xmonad. A ''
TechRadar
''TechRadar'' is an online publication owned by Future and focused on technology. It has editorial teams in the US, UK and Australia and provides news and reviews of tech products and gadgets. It was launched in 2007 and expanded to the US in ...
'' 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), mathemati ...
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 has pioneered a number of programming lang ...
, 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
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals wi ...
relating to the
NixOS
NixOS is a Linux distribution built on top of the Nix package manager. It uses declarative configuration and allows reliable system upgrades. Several official package "channels" are offered, including the current Stable release and the Unstable ...
linux distribution.
See also
*
Comparison of X window managers
This article compares variety of different X window managers. For an introduction to the topic, see X Window System.
General information
Features
See also
* Comparison of X Window System desktop environments
* Window manager
* ...
*
Formal verification
In the context of hardware and software systems, formal verification is the act of proving or disproving the correctness of intended algorithms underlying a system with respect to a certain formal specification or property, using formal metho ...
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 graphica ...
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"-
OSCON presentation by
Simon Peyton Jones
Simon Peyton Jones (born 18 January 1958) is a British computer scientist who researches the implementation and applications of functional programming languages, particularly lazy functional programming.
Education
Peyton Jones graduated from ...
on Haskell, using xmonad as an example
*
First half of talk on YouTube(video)
*
Second half of talk on YouTube(video)
{{X desktop environments and window managers
Free software programmed in Haskell
Free X window managers
Tiling window managers
X window managers extensible by scripting
Software using the BSD license