Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / wm.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
4 ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2015 xd1le <elisp.vim@gmail.com>
6 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
7 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
8 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages wm)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages linux)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system haskell)
33 #:use-module (gnu packages haskell)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages pulseaudio)
38 #:use-module (gnu packages xorg)
39 #:use-module (gnu packages xdisorg)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages xml)
42 #:use-module (gnu packages m4)
43 #:use-module (gnu packages docbook)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages pcre)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages libevent)
48 #:use-module (gnu packages fribidi)
49 #:use-module (gnu packages maths)
50 #:use-module (gnu packages web)
51 #:use-module (gnu packages fontutils)
52 #:use-module (guix download)
53 #:use-module (guix git-download))
54
55 (define-public libconfuse
56 (package
57 (name "libconfuse")
58 (version "2.7")
59 (source (origin
60 (method url-fetch)
61 (uri (string-append "http://savannah.nongnu.org/download/confuse/"
62 "confuse-" version ".tar.gz"))
63 (sha256
64 (base32
65 "0y47r2ashz44wvnxdb18ivpmj8nxhw3y9bf7v9w0g5byhgyp89g3"))))
66 (build-system gnu-build-system)
67 (home-page "http://www.nongnu.org/confuse/")
68 (synopsis "Configuration file parser library")
69 (description "libconfuse is a configuration file parser library. It
70 supports sections and (lists of) values (strings, integers, floats, booleans
71 or other sections), as well as some other features (such as
72 single/double-quoted strings, environment variable expansion, functions and
73 nested include statements).")
74 (license license:isc)))
75
76 (define-public bspwm
77 (package
78 (name "bspwm")
79 (version "0.9")
80 (source
81 (origin
82 (file-name (string-append name "-" version ".tar.gz"))
83 (method url-fetch)
84 (uri (string-append
85 "https://github.com/baskerville/bspwm/archive/"
86 version ".tar.gz"))
87 (sha256
88 (base32
89 "1pig0h2jk8wipyz90j69c4bk37bfyq60asnn0v0bqld2p2vjvyqy"))))
90 (build-system gnu-build-system)
91 (inputs
92 `(("libxcb" ,libxcb)
93 ("libxinerama" ,libxinerama)
94 ("sxhkd" ,sxhkd)
95 ("xcb-util" ,xcb-util)
96 ("xcb-util-keysyms" ,xcb-util-keysyms)
97 ("xcb-util-wm" ,xcb-util-wm)))
98 (arguments
99 '(#:phases (alist-delete 'configure %standard-phases)
100 #:tests? #f ; no check target
101 #:make-flags (list "CC=gcc"
102 (string-append "PREFIX=" %output))))
103 (home-page "https://github.com/baskerville/bspwm")
104 (synopsis "Tiling window manager based on binary space partitioning")
105 (description "bspwm is a tiling window manager that represents windows as
106 the leaves of a full binary tree.")
107 (license license:bsd-2)))
108
109 (define-public i3status
110 (package
111 (name "i3status")
112 (version "2.10")
113 (source (origin
114 (method url-fetch)
115 (uri (string-append "https://i3wm.org/i3status/i3status-"
116 version ".tar.bz2"))
117 (sha256
118 (base32
119 "1497dsvb32z9xljmxz95dnyvsbayn188ilm3l4ys8m5h25vd1xfs"))))
120 (build-system gnu-build-system)
121 (arguments
122 `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
123 #:phases
124 (modify-phases %standard-phases
125 (delete 'configure))
126 #:tests? #f)) ; no test suite
127 (inputs
128 `(("openlibm" ,openlibm)
129 ("libconfuse" ,libconfuse)
130 ("libyajl" ,libyajl)
131 ("alsa-lib" ,alsa-lib)
132 ("pulseaudio" ,pulseaudio)
133 ("libnl" ,libnl)
134 ("libcap" ,libcap)
135 ("asciidoc" ,asciidoc)))
136 (native-inputs
137 `(("pkg-config" ,pkg-config)))
138 (home-page "https://i3wm.org/i3status/")
139 (synopsis "Status bar for i3bar, dzen2, xmobar or similar programs")
140 (description "i3status is a small program for generating a status bar for
141 i3bar, dzen2, xmobar or similar programs. It is designed to be very efficient
142 by issuing a very small number of system calls, as one generally wants to
143 update such a status line every second. This ensures that even under high
144 load, your status bar is updated correctly. Also, it saves a bit of energy by
145 not hogging your CPU as much as spawning the corresponding amount of shell
146 commands would.")
147 (license license:bsd-3)))
148
149 (define-public i3-wm
150 (package
151 (name "i3-wm")
152 (version "4.12")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "https://i3wm.org/downloads/i3-"
156 version ".tar.bz2"))
157 (sha256
158 (base32
159 "1d3q3lgpjbkmcwzjhp0dfr0jq847silcfg087slcnj95ikh1r7p1"))))
160 (build-system gnu-build-system)
161 (arguments
162 `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
163 #:phases
164 (modify-phases %standard-phases
165 (delete 'configure))
166 #:tests? #f)) ; no test suite
167 (inputs
168 `(("libxcb" ,libxcb)
169 ("xcb-util" ,xcb-util)
170 ("xcb-util-cursor" ,xcb-util-cursor)
171 ("xcb-util-keysyms" ,xcb-util-keysyms)
172 ("xcb-util-wm" ,xcb-util-wm)
173 ("libxkbcommon" ,libxkbcommon)
174 ("libev" ,libev)
175 ("libyajl" ,libyajl)
176 ("asciidoc" ,asciidoc)
177 ("xmlto" ,xmlto)
178 ("perl-pod-simple" ,perl-pod-simple)
179 ("docbook-xml" ,docbook-xml)
180 ("libx11" ,libx11)
181 ("pcre" ,pcre)
182 ("startup-notification" ,startup-notification)
183 ("pango" ,pango)
184 ("cairo" ,cairo)))
185 (native-inputs
186 `(("which" ,which)
187 ("perl" ,perl)
188 ("pkg-config" ,pkg-config)))
189 (home-page "https://i3wm.org/")
190 (synopsis "Improved tiling window manager")
191 (description "A tiling window manager, completely written
192 from scratch. i3 is primarily targeted at advanced users and
193 developers.")
194 (license license:bsd-3)))
195
196 (define-public xmonad
197 (package
198 (name "xmonad")
199 (version "0.11.1")
200 (synopsis "Tiling window manager")
201 (source (origin
202 (method url-fetch)
203 (uri (string-append "http://hackage.haskell.org/package/xmonad/"
204 name "-" version ".tar.gz"))
205 (sha256
206 (base32
207 "1pfjssamiwpwjp1qqkm9m9p9s35pv381m0cwg6jxg0ppglibzq1r"))
208 (modules '((guix build utils)))
209 (snippet
210 ;; Here we update the constraints on the utf8-string package in
211 ;; the Cabal file. We allow a newer version which is compatible
212 ;; with GHC 7.10.2. The same change is applied on Hackage. See
213 ;; <https://hackage.haskell.org/package/xmonad-0.11.1/revisions/>.
214 '(substitute* "xmonad.cabal"
215 (("utf8-string >= 0.3 && < 0.4")
216 "utf8-string >= 0.3 && < 1.1")))))
217 (build-system haskell-build-system)
218 (inputs
219 `(("ghc-mtl" ,ghc-mtl)
220 ("ghc-utf8-string" ,ghc-utf8-string)
221 ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
222 ("ghc-x11" ,ghc-x11)))
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (add-after
227 'install 'install-xsession
228 (lambda _
229 (let* ((xsessions (string-append %output "/share/xsessions")))
230 (mkdir-p xsessions)
231 (call-with-output-file
232 (string-append xsessions "/xmonad.desktop")
233 (lambda (port)
234 (format port "~
235 [Desktop Entry]~@
236 Name=~a~@
237 Comment=~a~@
238 Exec=~a/bin/xmonad~@
239 Type=Application~%" ,name ,synopsis %output)))))))))
240 (home-page "http://xmonad.org")
241 (description
242 "Xmonad is a tiling window manager for X. Windows are arranged
243 automatically to tile the screen without gaps or overlap, maximising screen
244 use. All features of the window manager are accessible from the keyboard: a
245 mouse is strictly optional. Xmonad is written and extensible in Haskell.
246 Custom layout algorithms, and other extensions, may be written by the user in
247 config files. Layouts are applied dynamically, and different layouts may be
248 used on each workspace. Xinerama is fully supported, allowing windows to be
249 tiled on several screens.")
250 (license license:bsd-3)))
251
252 (define-public ghc-xmonad-contrib
253 (package
254 (name "ghc-xmonad-contrib")
255 (version "0.11.4")
256 (source
257 (origin
258 (method url-fetch)
259 (uri (string-append "http://hackage.haskell.org/package/xmonad-contrib/"
260 "xmonad-contrib-" version ".tar.gz"))
261 (sha256
262 (base32
263 "1g5cw9vvnfbiyi599fngk02zlmdhrf82x0bndhypkn6kybab6yd3"))))
264 (build-system haskell-build-system)
265 (propagated-inputs
266 `(("ghc-mtl" ,ghc-mtl)
267 ("ghc-old-time" ,ghc-old-time)
268 ("ghc-random" ,ghc-random)
269 ("ghc-utf8-string" ,ghc-utf8-string)
270 ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
271 ("ghc-x11" ,ghc-x11)
272 ("ghc-x11-xft" ,ghc-x11-xft)
273 ("xmonad" ,xmonad)))
274 (home-page "http://xmonad.org")
275 (synopsis "Third party extensions for xmonad")
276 (description
277 "Third party tiling algorithms, configurations, and scripts to Xmonad, a
278 tiling window manager for X.")
279 (license license:bsd-3)))
280
281 (define-public evilwm
282 (package
283 (name "evilwm")
284 (version "1.1.1")
285 (source
286 (origin
287 (method url-fetch)
288 (uri (string-append "http://www.6809.org.uk/evilwm/evilwm-"
289 version ".tar.gz"))
290 (sha256
291 (base32
292 "0ak0yajzk3v4dg5wmaghv6acf7v02a4iw8qxmq5yw5ard8lrqn3r"))
293 (patches (search-patches "evilwm-lost-focus-bug.patch"))))
294 (build-system gnu-build-system)
295 (inputs
296 `(("libx11" ,libx11)
297 ("libxext" ,libxext)
298 ("libxrandr" ,libxrandr)))
299 (arguments
300 `(#:modules ((srfi srfi-26)
301 (guix build utils)
302 (guix build gnu-build-system))
303 #:make-flags (let ((inputs (map (cut assoc-ref %build-inputs <>)
304 '("libx11" "libxext" "libxrandr")))
305 (join (lambda (proc strs)
306 (string-join (map proc strs) " ")))
307 (dash-I (cut string-append "-I" <> "/include"))
308 (dash-L (cut string-append "-L" <> "/lib")))
309 `("desktopfilesdir=$(prefix)/share/xsessions"
310 ,(string-append "prefix=" (assoc-ref %outputs "out"))
311 ,(string-append "CPPFLAGS=" (join dash-I inputs))
312 ,(string-append "LDFLAGS=" (join dash-L inputs))))
313 #:tests? #f ;no tests
314 #:phases (modify-phases %standard-phases
315 (delete 'configure)))) ;no configure script
316 (home-page "http://www.6809.org.uk/evilwm/")
317 (synopsis "Minimalist window manager for the X Window System")
318 (description
319 "evilwm is a minimalist window manager based on aewm, extended to feature
320 many keyboard controls with repositioning and maximize toggles, solid window
321 drags, snap-to-border support, and virtual desktops.")
322 (license (license:x11-style "file:///README"))))
323
324 (define-public fluxbox
325 (package
326 (name "fluxbox")
327 (version "1.3.7")
328 (synopsis "Small and fast window manager")
329 (source (origin
330 (method url-fetch)
331 (uri (string-append "mirror://sourceforge/fluxbox/"
332 version "/fluxbox-" version ".tar.xz"))
333 (sha256
334 (base32
335 "1h1f70y40qd225dqx937vzb4k2cz219agm1zvnjxakn5jkz7b37w"))))
336 (build-system gnu-build-system)
337 (arguments
338 `(#:make-flags '("CPPFLAGS=-U__TIME__") ;ugly, but for reproducibility
339 #:phases
340 (modify-phases %standard-phases
341 (add-after
342 'install 'install-xsession
343 (lambda _
344 (let ((xsessions (string-append %output "/share/xsessions")))
345 (mkdir-p xsessions)
346 (call-with-output-file
347 (string-append xsessions "/fluxbox.desktop")
348 (lambda (port)
349 (format port "~
350 [Desktop Entry]~@
351 Name=~a~@
352 Comment=~a~@
353 Exec=~a/bin/startfluxbox~@
354 Type=Application~%" ,name ,synopsis %output)))))))))
355 (native-inputs
356 `(("pkg-config" ,pkg-config)))
357 (inputs
358 `(("freetype" ,freetype)
359 ("fribidi" ,fribidi)
360 ("imlib2" ,imlib2)
361 ("libx11" ,libx11)
362 ("libxext" ,libxext)
363 ("libxft" ,libxft)
364 ("libxinerama" ,libxinerama)
365 ("libxpm" ,libxpm)
366 ("libxrandr" ,libxrandr)
367 ("libxrender" ,libxrender)))
368 (description "Fluxbox is a window manager. It is light on resources
369 and easy to handle yet full of features to make an easy and fast desktop
370 experience.")
371 (home-page "http://fluxbox.org/")
372 (license license:expat)))