1XMONAD(1) XMONAD(1)
2
3
4
6 xmonad - Tiling Window Manager
7
9 xmonad is a minimalist tiling window manager for X, written in Haskell.
10 Windows are managed using automatic layout algorithms, which can be dy‐
11 namically reconfigured. At any time windows are arranged so as to max‐
12 imize the use of screen real estate. All features of the window manag‐
13 er are accessible purely from the keyboard: a mouse is entirely option‐
14 al. xmonad is configured in Haskell, and custom layout algorithms may
15 be implemented by the user in config files. A principle of xmonad is
16 predictability: the user should know in advance precisely the window
17 arrangement that will result from any action.
18
19 By default, xmonad provides three layout algorithms: tall, wide and
20 fullscreen. In tall or wide mode, windows are tiled and arranged to
21 prevent overlap and maximize screen use. Sets of windows are grouped
22 together on virtual screens, and each screen retains its own layout,
23 which may be reconfigured dynamically. Multiple physical monitors are
24 supported via Xinerama, allowing simultaneous display of a number of
25 screens.
26
27 By utilizing the expressivity of a modern functional language with a
28 rich static type system, xmonad provides a complete, featureful window
29 manager in less than 1200 lines of code, with an emphasis on correct‐
30 ness and robustness. Internal properties of the window manager are
31 checked using a combination of static guarantees provided by the type
32 system, and type-based automated testing. A benefit of this is that
33 the code is simple to understand, and easy to modify.
34
36 xmonad places each window into a “workspace”. Each workspace can have
37 any number of windows, which you can cycle though with mod-j and mod-k.
38 Windows are either displayed full screen, tiled horizontally, or tiled
39 vertically. You can toggle the layout mode with mod-space, which will
40 cycle through the available modes.
41
42 You can switch to workspace N with mod-N. For example, to switch to
43 workspace 5, you would press mod-5. Similarly, you can move the cur‐
44 rent window to another workspace with mod-shift-N.
45
46 When running with multiple monitors (Xinerama), each screen has exactly
47 1 workspace visible. mod-{w,e,r} switch the focus between screens,
48 while shift-mod-{w,e,r} move the current window to that screen. When
49 xmonad starts, workspace 1 is on screen 1, workspace 2 is on screen 2,
50 etc. When switching workspaces to one that is already visible, the
51 current and visible workspaces are swapped.
52
53 Flags
54 xmonad has several flags which you may pass to the executable. These
55 flags are:
56
57 –recompile
58 Recompiles your xmonad.hs configuration
59
60 –restart
61 Causes the currently running xmonad process to restart
62
63 –replace
64 Replace the current window manager with xmonad
65
66 –version
67 Display version of xmonad
68
69 –verbose-version
70 Display detailed version of xmonad
71
72 Default keyboard bindings
73 mod-shift-return
74 Launch terminal
75
76 mod-p Launch dmenu
77
78 mod-shift-p
79 Launch gmrun
80
81 mod-shift-c
82 Close the focused window
83
84 mod-space
85 Rotate through the available layout algorithms
86
87 mod-shift-space
88 Reset the layouts on the current workspace to default
89
90 mod-n Resize viewed windows to the correct size
91
92 mod-tab
93 Move focus to the next window
94
95 mod-shift-tab
96 Move focus to the previous window
97
98 mod-j Move focus to the next window
99
100 mod-k Move focus to the previous window
101
102 mod-m Move focus to the master window
103
104 mod-return
105 Swap the focused window and the master window
106
107 mod-shift-j
108 Swap the focused window with the next window
109
110 mod-shift-k
111 Swap the focused window with the previous window
112
113 mod-h Shrink the master area
114
115 mod-l Expand the master area
116
117 mod-t Push window back into tiling
118
119 mod-comma
120 Increment the number of windows in the master area
121
122 mod-period
123 Deincrement the number of windows in the master area
124
125 mod-shift-q
126 Quit xmonad
127
128 mod-q Restart xmonad
129
130 mod-shift-slash
131 Run xmessage with a summary of the default keybindings (useful
132 for beginners)
133
134 mod-question
135 Run xmessage with a summary of the default keybindings (useful
136 for beginners)
137
138 mod-[1..9]
139 Switch to workspace N
140
141 mod-shift-[1..9]
142 Move client to workspace N
143
144 mod-{w,e,r}
145 Switch to physical/Xinerama screens 1, 2, or 3
146
147 mod-shift-{w,e,r}
148 Move client to screen 1, 2, or 3
149
150 mod-button1
151 Set the window to floating mode and move by dragging
152
153 mod-button2
154 Raise the window to the top of the stack
155
156 mod-button3
157 Set the window to floating mode and resize by dragging
158
160 To use xmonad as your window manager add to your ~/.xinitrc file:
161
162 exec xmonad
163
165 xmonad is customized in your xmonad.hs, and then restarted with mod-q.
166 You can choose where your configuration file lives by
167
168 1. Setting XMONAD_DATA_DIR, XMONAD_CONFIG_DIR, and XMONAD_CACHE_DIR;
169 xmonad.hs is then expected to be in XMONAD_CONFIG_DIR.
170
171 2. Creating xmonad.hs in ~/.xmonad.
172
173 3. Creating xmonad.hs in XDG_CONFIG_HOME. Note that, in this case,
174 xmonad will use XDG_DATA_HOME and XDG_CACHE_HOME for its data and
175 cache directory respectively.
176
177 You can find many extensions to the core feature set in the xmonad-
178 contrib package, available through your package manager or from xmon‐
179 ad.org (https://xmonad.org).
180
181 Modular Configuration
182 As of xmonad-0.9, any additional Haskell modules may be placed in
183 ~/.xmonad/lib/ are available in GHC’s searchpath. Hierarchical modules
184 are supported: for example, the file ~/.xmonad/lib/XMonad/Stack/MyAddi‐
185 tions.hs could contain:
186
187 module XMonad.Stack.MyAdditions (function1) where
188 function1 = error "function1: Not implemented yet!"
189
190 Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that mod‐
191 ule was contained within xmonad or xmonad-contrib.
192
194 Probably. If you find any, please report them to the bugtracker
195 (https://github.com/xmonad/xmonad/issues)
196
197
198
199Tiling Window Manager 27 October 2021 XMONAD(1)