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 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
11 ;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
12 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@crash.cx>
13 ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
14 ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
15 ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
16 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
18 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;;
20 ;;; This file is part of GNU Guix.
21 ;;;
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
26 ;;;
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
31 ;;;
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35 (define-module (gnu packages wm)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages linux)
40 #:use-module (guix build-system cmake)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system haskell)
43 #:use-module (guix build-system perl)
44 #:use-module (guix build-system python)
45 #:use-module (gnu packages haskell)
46 #:use-module (gnu packages haskell-check)
47 #:use-module (gnu packages haskell-web)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages gawk)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages xorg)
56 #:use-module (gnu packages xdisorg)
57 #:use-module (gnu packages documentation)
58 #:use-module (gnu packages xml)
59 #:use-module (gnu packages m4)
60 #:use-module (gnu packages docbook)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages pcre)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages gtk)
65 #:use-module (gnu packages libevent)
66 #:use-module (gnu packages fribidi)
67 #:use-module (gnu packages maths)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages fontutils)
70 #:use-module (gnu packages freedesktop)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gperf)
73 #:use-module (gnu packages imagemagick)
74 #:use-module (gnu packages lua)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages suckless)
77 #:use-module (guix download)
78 #:use-module (guix git-download))
79
80 (define-public libconfuse
81 (package
82 (name "libconfuse")
83 (version "3.2.1")
84 (source (origin
85 (method url-fetch)
86 (uri (string-append "https://github.com/martinh/libconfuse/"
87 "releases/download/v" version
88 "/confuse-" version ".tar.xz"))
89 (sha256
90 (base32
91 "0pnjmlj9i0alp407qd7c0vq83sz7gpsjrbdgpcn4xvzjp9r35ii3"))))
92 (build-system gnu-build-system)
93 (home-page "https://github.com/martinh/libconfuse")
94 (synopsis "Configuration file parser library")
95 (description "libconfuse is a configuration file parser library. It
96 supports sections and (lists of) values (strings, integers, floats, booleans
97 or other sections), as well as some other features (such as
98 single/double-quoted strings, environment variable expansion, functions and
99 nested include statements).")
100 (license license:isc)))
101
102 (define-public bspwm
103 (package
104 (name "bspwm")
105 (version "0.9.3")
106 (source
107 (origin
108 (file-name (string-append name "-" version ".tar.gz"))
109 (method url-fetch)
110 (uri (string-append
111 "https://github.com/baskerville/bspwm/archive/"
112 version ".tar.gz"))
113 (sha256
114 (base32
115 "17dwj7w16cdj7g4s2y2f96lgj5msq1s4543dnfa3rijlazzy6mmk"))))
116 (build-system gnu-build-system)
117 (inputs
118 `(("libxcb" ,libxcb)
119 ("libxinerama" ,libxinerama)
120 ("sxhkd" ,sxhkd)
121 ("xcb-util" ,xcb-util)
122 ("xcb-util-keysyms" ,xcb-util-keysyms)
123 ("xcb-util-wm" ,xcb-util-wm)))
124 (arguments
125 '(#:phases (modify-phases %standard-phases (delete 'configure))
126 #:tests? #f ; no check target
127 #:make-flags (list "CC=gcc"
128 (string-append "PREFIX=" %output))))
129 (home-page "https://github.com/baskerville/bspwm")
130 (synopsis "Tiling window manager based on binary space partitioning")
131 (description "bspwm is a tiling window manager that represents windows as
132 the leaves of a full binary tree.")
133 (license license:bsd-2)))
134
135 (define-public i3status
136 (package
137 (name "i3status")
138 (version "2.11")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append "https://i3wm.org/i3status/i3status-"
142 version ".tar.bz2"))
143 (sha256
144 (base32
145 "0pwcy599fw8by1a1sf91crkqba7679qhvhbacpmhis8c1xrpxnwq"))))
146 (build-system gnu-build-system)
147 (arguments
148 `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
149 #:phases
150 (modify-phases %standard-phases
151 (delete 'configure))
152 #:tests? #f)) ; no test suite
153 (inputs
154 `(("openlibm" ,openlibm)
155 ("libconfuse" ,libconfuse)
156 ("libyajl" ,libyajl)
157 ("alsa-lib" ,alsa-lib)
158 ("pulseaudio" ,pulseaudio)
159 ("libnl" ,libnl)
160 ("libcap" ,libcap)
161 ("asciidoc" ,asciidoc)))
162 (native-inputs
163 `(("pkg-config" ,pkg-config)))
164 (home-page "https://i3wm.org/i3status/")
165 (synopsis "Status bar for i3bar, dzen2, xmobar or similar programs")
166 (description "i3status is a small program for generating a status bar for
167 i3bar, dzen2, xmobar or similar programs. It is designed to be very efficient
168 by issuing a very small number of system calls, as one generally wants to
169 update such a status line every second. This ensures that even under high
170 load, your status bar is updated correctly. Also, it saves a bit of energy by
171 not hogging your CPU as much as spawning the corresponding amount of shell
172 commands would.")
173 (license license:bsd-3)))
174
175 (define-public i3-wm
176 (package
177 (name "i3-wm")
178 (version "4.15")
179 (source (origin
180 (method url-fetch)
181 (uri (string-append "https://i3wm.org/downloads/i3-"
182 version ".tar.bz2"))
183 (sha256
184 (base32
185 "09jk70hsdxab24lqvj2f30ijrkbv3f6q9xi5dcsax1dw3x6m4z91"))))
186 (build-system gnu-build-system)
187 (arguments
188 `(#:make-flags
189 (list "CC=gcc"
190 (string-append "PREFIX=" %output)
191 ;; This works around the following error:
192 ;; 'error: ‘for’ loop initial declarations are only allowed in C99
193 ;; or C11 mode'
194 "CFLAGS=-std=c11")
195 ;; The build system tries to build in a separate directory, but that
196 ;; seems to be unnecessary.
197 #:configure-flags '("--disable-builddir")
198 ;; The test suite appears to require the unpackaged Perl module AnyEvent.
199 #:tests? #f))
200 (inputs
201 `(("libxcb" ,libxcb)
202 ("xcb-util" ,xcb-util)
203 ("xcb-util-cursor" ,xcb-util-cursor)
204 ("xcb-util-keysyms" ,xcb-util-keysyms)
205 ("xcb-util-wm" ,xcb-util-wm)
206 ("xcb-util-xrm" ,xcb-util-xrm)
207 ("libxkbcommon" ,libxkbcommon)
208 ("libev" ,libev)
209 ("libyajl" ,libyajl)
210 ("asciidoc" ,asciidoc)
211 ("xmlto" ,xmlto)
212 ("perl-pod-simple" ,perl-pod-simple)
213 ("libx11" ,libx11)
214 ("pcre" ,pcre)
215 ("startup-notification" ,startup-notification)
216 ("pango" ,pango)
217 ("cairo" ,cairo)))
218 (native-inputs
219 `(("which" ,which)
220 ("perl" ,perl)
221 ("pkg-config" ,pkg-config)
222 ;; For building the documentation.
223 ("libxml2" ,libxml2)
224 ("docbook-xsl" ,docbook-xsl)))
225 (home-page "https://i3wm.org/")
226 (synopsis "Improved tiling window manager")
227 (description "A tiling window manager, completely written
228 from scratch. i3 is primarily targeted at advanced users and
229 developers.")
230 (license license:bsd-3)))
231
232 (define-public perl-anyevent-i3
233 (package
234 (name "perl-anyevent-i3")
235 (version "0.17")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "mirror://cpan/authors/id/M/MS/MSTPLBG/"
239 "AnyEvent-I3-" version ".tar.gz"))
240 (sha256
241 (base32
242 "0qvd9bq16jyy7v3ma82qcnvz9j503bw0mh7h55gkjf7ir62ck0jk"))))
243 (build-system perl-build-system)
244 (propagated-inputs
245 `(("perl-anyevent" ,perl-anyevent)
246 ("perl-json-xs" ,perl-json-xs)))
247 (home-page "http://search.cpan.org/dist/AnyEvent-I3")
248 (synopsis
249 "Communicate with the i3 window manager through perl")
250 (description
251 "This module connects to the i3 window manager using the UNIX socket
252 based IPC interface it provides (if enabled in the configuration file).
253 You can then subscribe to events or send messages and receive their replies.")
254 ;; Can be used with either license.
255 (license (list license:gpl3+ license:perl-license))))
256
257 (define-public python-i3-py
258 (package
259 (name "python-i3-py")
260 (version "0.6.5")
261 (source
262 (origin
263 ;; The latest release is not tagged in Git nor has an entry in PyPi,
264 ;; but there is still a clear commit for it, and it's been the last one
265 ;; for years.
266 (method git-fetch)
267 (uri (git-reference
268 (url "https://github.com/ziberna/i3-py.git")
269 (commit "27f88a616e9ecc340e7d041d3d00782f8a1964c1")))
270 (sha256
271 (base32
272 "1nm719dc2xqlll7vj4c4m7mpjb27lpn3bg3c66gajvnrz2x1nmxs"))
273 (file-name (string-append name "-" version "-checkout"))))
274 (build-system python-build-system)
275 (arguments
276 `(#:tests? #f ; no tests yet
277 #:phases (modify-phases %standard-phases
278 (add-after 'install 'install-doc
279 ;; Copy readme file to documentation directory.
280 (lambda* (#:key outputs #:allow-other-keys)
281 (let ((doc (string-append (assoc-ref outputs "out")
282 "/share/doc/" ,name)))
283 (install-file "README.md" doc)
284 ;; Avoid unspecified return value.
285 #t))))))
286 (propagated-inputs
287 `(("i3-wm" ,i3-wm)))
288 (home-page "https://github.com/ziberna/i3-py")
289 (synopsis "Python interface to the i3 window manager")
290 (description "This package allows you to interact from a Python program
291 with the i3 window manager via its IPC socket. It can send commands and other
292 kinds of messages to i3, select the affected containers, filter results and
293 subscribe to events.")
294 (license license:gpl3+)))
295
296 (define-public python2-i3-py
297 (package-with-python2 python-i3-py))
298
299 (define-public quickswitch-i3
300 (let ((commit "ed692b1e8f43b95bd907ced26238ce8ccb2ed28f")
301 (revision "1")) ; Guix package revision
302 (package
303 (name "quickswitch-i3")
304 (version (string-append "2.2-" revision "."
305 (string-take commit 7)))
306 (source
307 (origin
308 ;; The latest commit is a few years old and just a couple commits
309 ;; after the last tagged release, so we use that latest commit
310 ;; instead of the release.
311 (method git-fetch)
312 (uri (git-reference
313 (url "https://github.com/proxypoke/quickswitch-for-i3.git")
314 (commit commit)))
315 (sha256
316 (base32
317 "0447077sama80jcdg5p64zjsvafmz5rbdrirhm1adcdjhkh6iqc5"))
318 (patches (search-patches "quickswitch-fix-dmenu-check.patch"))
319 (file-name (string-append name "-" version "-checkout"))))
320 (build-system python-build-system)
321 (arguments
322 `(#:tests? #f ; no tests yet
323 #:phases (modify-phases %standard-phases
324 (add-after 'install 'install-doc
325 ;; Copy readme file to documentation directory.
326 (lambda* (#:key outputs #:allow-other-keys)
327 (let ((doc (string-append (assoc-ref outputs "out")
328 "/share/doc/" ,name)))
329 (install-file "README.rst" doc)
330 ;; Avoid unspecified return value.
331 #t))))))
332 (inputs
333 `(("python-i3-py" ,python-i3-py)
334 ("dmenu" ,dmenu)))
335 (home-page "https://github.com/proxypoke/quickswitch-for-i3")
336 (synopsis "Quickly change to and locate windows in the i3 window manager")
337 (description
338 "This utility for the i3 window manager allows you to quickly switch to
339 and locate windows on all your workspaces, using an interactive dmenu
340 prompt.")
341 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
342
343 (define-public i3lock-color
344 (package
345 (name "i3lock-color")
346 (version "2.10.1c")
347 (source
348 (origin
349 (method url-fetch)
350 (uri (string-append "https://github.com/PandorasFox/i3lock-color/"
351 "archive/" version ".tar.gz"))
352 (file-name (string-append name "-" version ".tar.gz"))
353 (sha256
354 (base32
355 "119xvdm4r6irqk0mar80hx6s8ydw26y35h7712rd7nbg7pb7i053"))))
356 (build-system gnu-build-system)
357 (arguments
358 `(#:tests? #f)) ;no tests included
359 (inputs
360 `(("xcb-util-image" ,xcb-util-image)
361 ("xcb-util" ,xcb-util)
362 ("libxcb" ,libxcb)
363 ("linux-pam" ,linux-pam)
364 ("libxkbcommon" ,libxkbcommon)
365 ("libev" ,libev)
366 ("cairo" ,cairo)))
367 (native-inputs
368 `(("pkg-config" ,pkg-config)
369 ("autoconf" ,autoconf)
370 ("automake" ,automake)))
371 (home-page "https://github.com/PandorasFox/i3lock-color")
372 (synopsis "Screen locker with color configuration support")
373 (description
374 "i3lock-color is a simpler X11 screen locker derived from i3lock.
375 Features include:
376
377 @enumerate
378 @item forking process, the locked screen is preserved when you suspend to RAM;
379 @item specify background color or image to be displayed in the lock screen;
380 @item many additional color options.
381 @end enumerate")
382 (license license:bsd-3)))
383
384 (define-public i3lock-fancy
385 (package
386 (name "i3lock-fancy")
387 (version "0.2")
388 (source
389 (origin
390 (method url-fetch)
391 (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
392 version ".tar.gz"))
393 (file-name (string-append name "-" version ".tar.gz"))
394 (sha256
395 (base32
396 "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
397 (build-system gnu-build-system)
398 (arguments
399 `(#:tests? #f ;No tests included
400 #:phases
401 (modify-phases %standard-phases
402 (replace 'configure
403 (lambda* (#:key inputs outputs #:allow-other-keys)
404 (let* ((out (assoc-ref outputs "out"))
405 (icons (string-append out "/share/i3lock-fancy/icons/"))
406 (wmctrl (string-append (assoc-ref inputs "wmctrl")
407 "/bin/wmctrl"))
408 (mconvert (string-append (assoc-ref inputs "imagemagick")
409 "/bin/convert"))
410 (mimport (string-append (assoc-ref inputs "imagemagick")
411 "/bin/import"))
412 (awk (string-append (assoc-ref inputs "gawk")
413 "/bin/gawk")))
414
415 (substitute* "lock"
416 (("$(which wmctrl)") wmctrl)
417 (("convert") mconvert)
418 (("shot=\\(import") (string-append "shot=\(" mimport))
419 (("awk -F") (string-append awk " -F"))
420 ((" awk") awk)
421 (("\\$scriptpath/icons/") icons))
422 #t)))
423 (delete 'build)
424 (replace 'install
425 (lambda* (#:key inputs outputs #:allow-other-keys)
426 (let* ((out (assoc-ref outputs "out"))
427 (bin (string-append out "/bin"))
428 (icons (string-append out "/share/i3lock-fancy/icons/")))
429
430 (install-file "lock" bin)
431 (rename-file (string-append bin "/lock")
432 (string-append bin "/i3lock-fancy"))
433 (copy-recursively "icons" icons)
434 #t))))))
435 (native-inputs
436 `(("imagemagick" ,imagemagick)
437 ("wmctrl" ,wmctrl)
438 ("gawk" ,gawk)))
439 (home-page "https://github.com/meskarune/i3lock-fancy")
440 (synopsis "Screen locker with screenshot function")
441 (description
442 "@code{i3lock-fancy} is a Bash script that takes a screenshot of
443 the desktop, blurs the background and adds a lock icon and text.
444 It requires @code{i3lock-color} or @code{i3lock} and can optionally
445 be passed any screenshot util like @code{scrot}.
446 This screen locker can be used with any window manager or
447 desktop environment.")
448 (license license:expat)))
449
450 (define-public xmonad
451 (package
452 (name "xmonad")
453 (version "0.13")
454 (synopsis "Tiling window manager")
455 (source (origin
456 (method url-fetch)
457 (uri (string-append "mirror://hackage/package/xmonad/"
458 name "-" version ".tar.gz"))
459 (sha256
460 (base32
461 "1jh3lcs20qpna36fa5a0r174xqrsxhj10x1rm5vwf64zariipy7r"))))
462 (build-system haskell-build-system)
463 (inputs
464 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
465 ("ghc-mtl" ,ghc-mtl)
466 ("ghc-quickcheck" ,ghc-quickcheck)
467 ("ghc-setlocale" ,ghc-setlocale)
468 ("ghc-utf8-string" ,ghc-utf8-string)
469 ("ghc-directory" ,ghc-directory)
470 ("ghc-x11" ,ghc-x11)))
471 (arguments
472 `(#:phases
473 (modify-phases %standard-phases
474 (add-after
475 'install 'install-xsession
476 (lambda _
477 (let* ((xsessions (string-append %output "/share/xsessions")))
478 (mkdir-p xsessions)
479 (call-with-output-file
480 (string-append xsessions "/xmonad.desktop")
481 (lambda (port)
482 (format port "~
483 [Desktop Entry]~@
484 Name=~a~@
485 Comment=~a~@
486 Exec=~a/bin/xmonad~@
487 Type=Application~%" ,name ,synopsis %output)))))))))
488 (home-page "http://xmonad.org")
489 (description
490 "Xmonad is a tiling window manager for X. Windows are arranged
491 automatically to tile the screen without gaps or overlap, maximising screen
492 use. All features of the window manager are accessible from the keyboard: a
493 mouse is strictly optional. Xmonad is written and extensible in Haskell.
494 Custom layout algorithms, and other extensions, may be written by the user in
495 config files. Layouts are applied dynamically, and different layouts may be
496 used on each workspace. Xinerama is fully supported, allowing windows to be
497 tiled on several screens.")
498 (license license:bsd-3)))
499
500 (define-public xmobar
501 (package
502 (name "xmobar")
503 (version "0.25")
504 (source (origin
505 (method url-fetch)
506 (uri (string-append "mirror://hackage/package/xmobar/"
507 name "-" version ".tar.gz"))
508 (sha256
509 (base32
510 "0382r4vzqkz76jlp2069rdbwf4gh1a22r9w4rkphcn5qflw0dlb6"))))
511 (build-system haskell-build-system)
512 (inputs
513 `(("ghc-hinotify" ,ghc-hinotify)
514 ("ghc-http" ,ghc-http)
515 ("ghc-iwlib" ,ghc-iwlib)
516 ("ghc-parsec" ,ghc-parsec)
517 ("ghc-regex-compat" ,ghc-regex-compat)
518 ("ghc-stm" ,ghc-stm)
519 ("ghc-x11-xft" ,ghc-x11-xft)
520 ("libxpm" ,libxpm)))
521 (arguments
522 `(#:configure-flags
523 (list (string-append "--flags="
524 (string-join (list "with_inotify"
525 "with_iwlib"
526 "with_utf8"
527 "with_weather"
528 "with_xft"
529 "with_xpm")
530 " ")))))
531 (home-page "http://xmobar.org")
532 (synopsis "Minimalistic text based status bar")
533 (description
534 "@code{xmobar} is a lightweight, text-based, status bar written in
535 Haskell. It was originally designed to be used together with Xmonad, but it
536 is also usable with any other window manager. While xmobar is written in
537 Haskell, no knowledge of the language is required to install and use it.")
538 (license license:bsd-3)))
539
540 (define-public ghc-xmonad-contrib
541 (package
542 (name "ghc-xmonad-contrib")
543 (version "0.13")
544 (source
545 (origin
546 (method url-fetch)
547 (uri (string-append "mirror://hackage/package/xmonad-contrib/"
548 "xmonad-contrib-" version ".tar.gz"))
549 (sha256
550 (base32
551 "0vj72jhfng6y7hv5frx2v99jvl3jn9rbpk2j7xw9vydiwmzq4q57"))))
552 (build-system haskell-build-system)
553 (propagated-inputs
554 `(("ghc-mtl" ,ghc-mtl)
555 ("ghc-old-time" ,ghc-old-time)
556 ("ghc-random" ,ghc-random)
557 ("ghc-utf8-string" ,ghc-utf8-string)
558 ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
559 ("ghc-x11" ,ghc-x11)
560 ("ghc-x11-xft" ,ghc-x11-xft)
561 ("xmonad" ,xmonad)))
562 (home-page "http://xmonad.org")
563 (synopsis "Third party extensions for xmonad")
564 (description
565 "Third party tiling algorithms, configurations, and scripts to Xmonad, a
566 tiling window manager for X.")
567 (license license:bsd-3)))
568
569 (define-public evilwm
570 (package
571 (name "evilwm")
572 (version "1.1.1")
573 (source
574 (origin
575 (method url-fetch)
576 (uri (string-append "http://www.6809.org.uk/evilwm/evilwm-"
577 version ".tar.gz"))
578 (sha256
579 (base32
580 "0ak0yajzk3v4dg5wmaghv6acf7v02a4iw8qxmq5yw5ard8lrqn3r"))
581 (patches (search-patches "evilwm-lost-focus-bug.patch"))))
582 (build-system gnu-build-system)
583 (inputs
584 `(("libx11" ,libx11)
585 ("libxext" ,libxext)
586 ("libxrandr" ,libxrandr)))
587 (arguments
588 `(#:modules ((srfi srfi-26)
589 (guix build utils)
590 (guix build gnu-build-system))
591 #:make-flags (let ((inputs (map (cut assoc-ref %build-inputs <>)
592 '("libx11" "libxext" "libxrandr")))
593 (join (lambda (proc strs)
594 (string-join (map proc strs) " ")))
595 (dash-I (cut string-append "-I" <> "/include"))
596 (dash-L (cut string-append "-L" <> "/lib")))
597 `("desktopfilesdir=$(prefix)/share/xsessions"
598 ,(string-append "prefix=" (assoc-ref %outputs "out"))
599 ,(string-append "CPPFLAGS=" (join dash-I inputs))
600 ,(string-append "LDFLAGS=" (join dash-L inputs))))
601 #:tests? #f ;no tests
602 #:phases (modify-phases %standard-phases
603 (delete 'configure)))) ;no configure script
604 (home-page "http://www.6809.org.uk/evilwm/")
605 (synopsis "Minimalist window manager for the X Window System")
606 (description
607 "evilwm is a minimalist window manager based on aewm, extended to feature
608 many keyboard controls with repositioning and maximize toggles, solid window
609 drags, snap-to-border support, and virtual desktops.")
610 (license (license:x11-style "file:///README"))))
611
612 (define-public fluxbox
613 (package
614 (name "fluxbox")
615 (version "1.3.7")
616 (synopsis "Small and fast window manager")
617 (source (origin
618 (method url-fetch)
619 (uri (string-append "mirror://sourceforge/fluxbox/fluxbox/"
620 version "/fluxbox-" version ".tar.xz"))
621 (sha256
622 (base32
623 "1h1f70y40qd225dqx937vzb4k2cz219agm1zvnjxakn5jkz7b37w"))))
624 (build-system gnu-build-system)
625 (arguments
626 `(#:make-flags '("CPPFLAGS=-U__TIME__") ;ugly, but for reproducibility
627 #:phases
628 (modify-phases %standard-phases
629 (add-after
630 'install 'install-xsession
631 (lambda _
632 (let ((xsessions (string-append %output "/share/xsessions")))
633 (mkdir-p xsessions)
634 (call-with-output-file
635 (string-append xsessions "/fluxbox.desktop")
636 (lambda (port)
637 (format port "~
638 [Desktop Entry]~@
639 Name=~a~@
640 Comment=~a~@
641 Exec=~a/bin/startfluxbox~@
642 Type=Application~%" ,name ,synopsis %output)))))))))
643 (native-inputs
644 `(("pkg-config" ,pkg-config)))
645 (inputs
646 `(("freetype" ,freetype)
647 ("fribidi" ,fribidi)
648 ("imlib2" ,imlib2)
649 ("libx11" ,libx11)
650 ("libxext" ,libxext)
651 ("libxft" ,libxft)
652 ("libxinerama" ,libxinerama)
653 ("libxpm" ,libxpm)
654 ("libxrandr" ,libxrandr)
655 ("libxrender" ,libxrender)))
656 (description "Fluxbox is a window manager. It is light on resources
657 and easy to handle yet full of features to make an easy and fast desktop
658 experience.")
659 (home-page "http://fluxbox.org/")
660 (license license:expat)))
661
662 (define-public awesome
663 (package
664 (name "awesome")
665 (version "4.2")
666 (source
667 (origin (method url-fetch)
668 (uri (string-append
669 "https://github.com/awesomeWM/awesome-releases/raw/"
670 "master/awesome-" version ".tar.xz"))
671 (sha256
672 (base32
673 "0kwpbls9h1alxcmvxh5g9qb995fds5b2ngcr44w0ibazkyls2pdc"))
674 (modules '((guix build utils)
675 (srfi srfi-19)))
676 (snippet '(begin
677 ;; Remove non-reproducible timestamp and use the date
678 ;; of the source file instead.
679 (substitute* "common/version.c"
680 (("__DATE__ \" \" __TIME__")
681 (date->string
682 (time-utc->date
683 (make-time time-utc 0
684 (stat:mtime (stat "awesome.c"))))
685 "\"~c\"")))
686 #t))
687 (patches (search-patches "awesome-reproducible-png.patch"))))
688 (build-system cmake-build-system)
689 (native-inputs `(("asciidoc" ,asciidoc)
690 ("docbook-xsl" ,docbook-xsl)
691 ("doxygen" ,doxygen)
692 ("gperf" ,gperf)
693 ("imagemagick" ,imagemagick)
694 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
695 ("pkg-config" ,pkg-config)
696 ("xmlto" ,xmlto)))
697 (inputs `(("cairo" ,cairo)
698 ("dbus" ,dbus)
699 ("gdk-pixbuf" ,gdk-pixbuf)
700 ("glib" ,glib)
701 ("gobject-introspection" ,gobject-introspection)
702 ("imlib2" ,imlib2)
703 ("libev" ,libev)
704 ("libxcb" ,libxcb)
705 ("libxcursor" ,libxcursor)
706 ("libxdg-basedir" ,libxdg-basedir)
707 ("libxkbcommon" ,libxkbcommon)
708 ("lua" ,lua)
709 ("lua-lgi" ,lua-lgi)
710 ("pango" ,pango)
711 ("startup-notification" ,startup-notification)
712 ("xcb-util" ,xcb-util)
713 ("xcb-util-cursor" ,xcb-util-cursor)
714 ("xcb-util-image" ,xcb-util-image)
715 ("xcb-util-keysyms" ,xcb-util-keysyms)
716 ("xcb-util-renderutil" ,xcb-util-renderutil)
717 ("xcb-util-xrm" ,xcb-util-xrm)
718 ("xcb-util-wm" ,xcb-util-wm)))
719 (arguments
720 `(;; Let compression happen in our 'compress-documentation' phase so that
721 ;; '--no-name' is used, which removes timestamps from gzip output.
722 #:configure-flags '("-DCOMPRESS_MANPAGES=off")
723
724 ;; Building awesome in its source dir is no longer supported.
725 #:out-of-source? #t
726
727 #:phases
728 (modify-phases %standard-phases
729 (add-before 'build 'xmlto-skip-validation
730 (lambda _
731 ;; We can't download the necessary schema, so so skip
732 ;; validation and assume they're valid.
733 (substitute* "../build/CMakeFiles/man.dir/build.make"
734 (("/xmlto")
735 (string-append "/xmlto --skip-validation")))
736 #t))
737 (add-before 'configure 'set-lua-paths
738 (lambda* (#:key inputs #:allow-other-keys)
739 ;; The build process needs to load cairo dynamically.
740 (let* ((cairo (string-append
741 (assoc-ref inputs "cairo") "/lib" ))
742 (lua-lgi (assoc-ref inputs "lua-lgi") ))
743 (setenv "LD_LIBRARY_PATH" cairo )
744 (setenv "LUA_PATH" (string-append lua-lgi
745 "/share/lua/5.2/?.lua"))
746 (setenv "LUA_CPATH" (string-append lua-lgi
747 "/lib/lua/5.2/?.so"))
748 #t)))
749 (replace 'check
750 (lambda _
751 ;; There aren't any tests, so just make sure the binary
752 ;; gets built and can be run successfully.
753 (zero? (system* "../build/awesome" "-v"))))
754 (add-after 'install 'wrap
755 (lambda* (#:key inputs outputs #:allow-other-keys)
756 (let* ((awesome (assoc-ref outputs "out"))
757 (cairo (string-append
758 (assoc-ref inputs "cairo") "/lib" ))
759 (lua-lgi (assoc-ref inputs "lua-lgi") ))
760 (wrap-program (string-append awesome "/bin/awesome")
761 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
762 `("LD_LIBRARY_PATH" suffix (, cairo))
763 `("LUA_PATH" suffix (,(string-append lua-lgi
764 "/share/lua/5.2/?.lua")))
765 `("LUA_CPATH" suffix (,(string-append
766 lua-lgi "/lib/lua/5.2/?.so"))))))))))
767 (synopsis "Highly configurable window manager")
768 (description
769 "Awesome has been designed as a framework window manager. It is fast, small,
770 dynamic and extensible using the Lua programming language.")
771 (license license:gpl2+)
772 (home-page "https://awesome.naquadah.org/")))
773
774 (define-public menumaker
775 (package
776 (name "menumaker")
777 (version "0.99.10")
778 (source
779 (origin
780 (method url-fetch)
781 (uri (string-append "mirror://sourceforge/menumaker/"
782 "menumaker-" version ".tar.gz"))
783 (sha256
784 (base32
785 "1mm4cvg3kphkkd8nwrhcg6d9nm5ar7mgc0wf6fxk6zck1l7xn8ky"))))
786 (build-system gnu-build-system)
787 (inputs
788 `(("python" ,python)))
789 (synopsis "Heuristics-driven menu generator")
790 (description
791 "MenuMaker is a menu generation utility for a number of X window
792 managers and desktop environments. It is capable of finding lots of
793 installed programs and generating a root menu consistent across all
794 supported window managers, so one will get (almost) the same menu in
795 all of them. Currently supported window managers include:
796
797 @enumerate
798 @item BlackBox
799 @item Deskmenu
800 @item FluxBox
801 @item IceWM
802 @item OpenBox
803 @item PekWM
804 @item WindowMaker
805 @item XFCE
806 @end enumerate\n")
807 (home-page "http://menumaker.sourceforge.net/")
808 (license license:bsd-2)))
809
810 (define-public keybinder
811 (package
812 (name "keybinder")
813 (version "0.3.1")
814 (source
815 (origin
816 (method url-fetch)
817 (uri (string-append "https://github.com/kupferlauncher/keybinder"
818 "/releases/download/v" version "/keybinder-"
819 version ".tar.gz"))
820 (file-name (string-append name "-" version ".tar.gz"))
821 (sha256
822 (base32
823 "0h52hj3ay8mfhwvmfxbxlfyq74hifdk8wxgxp7fr4iy6189hg7w7"))))
824 (build-system gnu-build-system)
825 (inputs
826 `(("python-2" ,python-2)
827 ("gtk+-2" ,gtk+-2)))
828 (native-inputs
829 `(("python2-pygtk" ,python2-pygtk)
830 ("gtk-doc" ,gtk-doc)
831 ("pkg-config" ,pkg-config)))
832 (synopsis "Library for registering global keyboard shortcuts")
833 (description
834 "Keybinder is a library for registering global keyboard shortcuts.
835 Keybinder works with GTK-based applications using the X Window System.")
836 (home-page "https://github.com/kupferlauncher/keybinder")
837 (license license:gpl2+)))
838
839 (define-public spectrwm
840 (package
841 (name "spectrwm")
842 (version "3.1.0")
843 (source
844 (origin
845 (method url-fetch)
846 (uri (let ((version-with-underscores
847 (string-join (string-split version #\.) "_")))
848 (string-append "https://github.com/conformal/spectrwm/archive/"
849 "SPECTRWM_" version-with-underscores ".tar.gz")))
850 (file-name (string-append name "-" version ".tar.gz"))
851 (sha256
852 (base32
853 "16lxcharxslf9rc39wxa3mr2nx5d8kzm9ls7p7dal8yrwr7y59dp"))))
854 (build-system gnu-build-system)
855 (arguments
856 `(#:make-flags (let ((pkg-config (lambda (flag)
857 (string-append
858 "$(shell pkg-config " flag " "
859 "xft fontconfig x11 libpng)"))))
860 (list
861 "CC=gcc"
862 (string-append "PREFIX=" %output)
863 (string-append "INCS=-I. " (pkg-config "--cflags"))
864 (string-append "LIBS=" (pkg-config "--libs") " -lm")))
865 #:tests? #f ;No test suite
866 #:phases
867 (modify-phases %standard-phases
868 (add-before 'build 'change-dir
869 (lambda _
870 (chdir "linux") #t))
871 (add-after 'change-dir 'patch-makefile
872 (lambda _
873 (substitute* "Makefile"
874 (("-g") ""))))
875 (add-after 'change-dir 'fix-freetype-include
876 (lambda _
877 (substitute* "Makefile"
878 (("/usr/include/freetype2")
879 (string-append (assoc-ref %build-inputs "freetype")
880 "/include/freetype2")))))
881 (delete 'configure)))) ;no 'configure' exists
882 (inputs
883 `(("freetype" ,freetype)
884 ("fontconfig" ,fontconfig)
885 ("libx11" ,libx11)
886 ("libxcursor" ,libxcursor)
887 ("libxrandr" ,libxrandr)
888 ("libxtst" ,libxtst)
889 ("libxft" ,libxft)
890 ("xcb-util" ,xcb-util)
891 ("xcb-util-wm" ,xcb-util-wm)
892 ("xcb-util-keysyms" ,xcb-util-keysyms)))
893 (native-inputs
894 `(("libxt" ,libxt)
895 ("pkg-config" ,pkg-config)))
896 (synopsis "Minimalistic automatic tiling window manager")
897 (description
898 "Spectrwm is a small dynamic tiling and reparenting window manager for X11.
899 It is inspired by Xmonad and dwm. Its major features include:
900
901 @itemize
902 @item Navigation anywhere on all screens with either the keyboard or mouse
903 @item Customizable status bar
904 @item Restartable without losing state
905 @item Quick launch menu
906 @item Many screen layouts possible with a few simple key strokes
907 @item Move/resize floating windows
908 @item Extended Window Manager Hints (@dfn{EWMH}) support
909 @item Configurable tiling
910 @item Adjustable tile gap allows for a true one pixel border
911 @item Customizable colors and border width
912 @end itemize\n")
913 (home-page "https://github.com/conformal/spectrwm")
914 (license license:isc)))
915
916 (define-public cwm
917 (package
918 (name "cwm")
919 (version "6.2")
920 (source
921 (origin
922 (method url-fetch)
923 (uri (string-append "http://chneukirchen.org/releases/cwm-"
924 version ".tar.gz"))
925 (sha256
926 (base32
927 "1b8k2hjxpb0bzqjh2wj6mn2nf2360zacf8z19sw2rw5lxvmfy89x"))))
928 (build-system gnu-build-system)
929 (arguments
930 `(#:make-flags (list "CC=gcc"
931 (string-append "PREFIX=" %output))
932 #:tests? #f
933 #:phases
934 (modify-phases %standard-phases
935 (delete 'configure)
936 (add-after 'build 'install-xsession
937 (lambda* (#:key outputs #:allow-other-keys)
938 ;; Add a .desktop file to xsessions.
939 (let* ((output (assoc-ref outputs "out"))
940 (xsessions (string-append output "/share/xsessions")))
941 (mkdir-p xsessions)
942 (with-output-to-file
943 (string-append xsessions "/cwm.desktop")
944 (lambda _
945 (format #t
946 "[Desktop Entry]~@
947 Name=cwm~@
948 Comment=OpenBSD Calm Window Manager fork~@
949 Exec=~a/bin/cwm~@
950 TryExec=~@*~a/bin/cwm~@
951 Icon=~@
952 Type=Application~%"
953 output)))
954 #t))))))
955 (inputs
956 `(("libxft" ,libxft)
957 ("libxrandr" ,libxrandr)
958 ("libxinerama" ,libxinerama)))
959 (native-inputs
960 `(("pkg-config" ,pkg-config)
961 ("bison" ,bison)))
962 (home-page "https://github.com/chneukirchen/cwm")
963 (synopsis "OpenBSD fork of the calmwm window manager")
964 (description "Cwm is a stacking window manager for X11. It is an OpenBSD
965 project derived from the original Calm Window Manager.")
966 (license license:isc)))