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