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 Ludovic Courtès <ludo@gnu.org>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages wm)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages linux)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system haskell)
36 #:use-module (gnu packages haskell)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages pulseaudio)
41 #:use-module (gnu packages xorg)
42 #:use-module (gnu packages xdisorg)
43 #:use-module (gnu packages documentation)
44 #:use-module (gnu packages xml)
45 #:use-module (gnu packages m4)
46 #:use-module (gnu packages docbook)
47 #:use-module (gnu packages image)
48 #:use-module (gnu packages pcre)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages libevent)
51 #:use-module (gnu packages fribidi)
52 #:use-module (gnu packages maths)
53 #:use-module (gnu packages web)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages freedesktop)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gperf)
58 #:use-module (gnu packages imagemagick)
59 #:use-module (gnu packages lua)
60 #:use-module (guix download)
61 #:use-module (guix git-download))
63 (define-public libconfuse
69 (uri (string-append "http://savannah.nongnu.org/download/confuse/"
70 "confuse-" version ".tar.gz"))
73 "0y47r2ashz44wvnxdb18ivpmj8nxhw3y9bf7v9w0g5byhgyp89g3"))))
74 (build-system gnu-build-system)
75 (home-page "http://www.nongnu.org/confuse/")
76 (synopsis "Configuration file parser library")
77 (description "libconfuse is a configuration file parser library. It
78 supports sections and (lists of) values (strings, integers, floats, booleans
79 or other sections), as well as some other features (such as
80 single/double-quoted strings, environment variable expansion, functions and
81 nested include statements).")
82 (license license:isc)))
90 (file-name (string-append name "-" version ".tar.gz"))
93 "https://github.com/baskerville/bspwm/archive/"
97 "1pig0h2jk8wipyz90j69c4bk37bfyq60asnn0v0bqld2p2vjvyqy"))))
98 (build-system gnu-build-system)
101 ("libxinerama" ,libxinerama)
103 ("xcb-util" ,xcb-util)
104 ("xcb-util-keysyms" ,xcb-util-keysyms)
105 ("xcb-util-wm" ,xcb-util-wm)))
107 '(#:phases (alist-delete 'configure %standard-phases)
108 #:tests? #f ; no check target
109 #:make-flags (list "CC=gcc"
110 (string-append "PREFIX=" %output))))
111 (home-page "https://github.com/baskerville/bspwm")
112 (synopsis "Tiling window manager based on binary space partitioning")
113 (description "bspwm is a tiling window manager that represents windows as
114 the leaves of a full binary tree.")
115 (license license:bsd-2)))
117 (define-public i3status
123 (uri (string-append "https://i3wm.org/i3status/i3status-"
127 "1497dsvb32z9xljmxz95dnyvsbayn188ilm3l4ys8m5h25vd1xfs"))))
128 (build-system gnu-build-system)
130 `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
132 (modify-phases %standard-phases
134 #:tests? #f)) ; no test suite
136 `(("openlibm" ,openlibm)
137 ("libconfuse" ,libconfuse)
139 ("alsa-lib" ,alsa-lib)
140 ("pulseaudio" ,pulseaudio)
143 ("asciidoc" ,asciidoc)))
145 `(("pkg-config" ,pkg-config)))
146 (home-page "https://i3wm.org/i3status/")
147 (synopsis "Status bar for i3bar, dzen2, xmobar or similar programs")
148 (description "i3status is a small program for generating a status bar for
149 i3bar, dzen2, xmobar or similar programs. It is designed to be very efficient
150 by issuing a very small number of system calls, as one generally wants to
151 update such a status line every second. This ensures that even under high
152 load, your status bar is updated correctly. Also, it saves a bit of energy by
153 not hogging your CPU as much as spawning the corresponding amount of shell
155 (license license:bsd-3)))
163 (uri (string-append "https://i3wm.org/downloads/i3-"
167 "1d3q3lgpjbkmcwzjhp0dfr0jq847silcfg087slcnj95ikh1r7p1"))))
168 (build-system gnu-build-system)
170 `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
172 (modify-phases %standard-phases
174 #:tests? #f)) ; no test suite
177 ("xcb-util" ,xcb-util)
178 ("xcb-util-cursor" ,xcb-util-cursor)
179 ("xcb-util-keysyms" ,xcb-util-keysyms)
180 ("xcb-util-wm" ,xcb-util-wm)
181 ("libxkbcommon" ,libxkbcommon)
184 ("asciidoc" ,asciidoc)
186 ("perl-pod-simple" ,perl-pod-simple)
187 ("docbook-xml" ,docbook-xml)
190 ("startup-notification" ,startup-notification)
196 ("pkg-config" ,pkg-config)))
197 (home-page "https://i3wm.org/")
198 (synopsis "Improved tiling window manager")
199 (description "A tiling window manager, completely written
200 from scratch. i3 is primarily targeted at advanced users and
202 (license license:bsd-3)))
204 (define-public xmonad
208 (synopsis "Tiling window manager")
211 (uri (string-append "http://hackage.haskell.org/package/xmonad/"
212 name "-" version ".tar.gz"))
215 "1pfjssamiwpwjp1qqkm9m9p9s35pv381m0cwg6jxg0ppglibzq1r"))
216 (modules '((guix build utils)))
218 ;; Here we update the constraints on the utf8-string package in
219 ;; the Cabal file. We allow a newer version which is compatible
220 ;; with GHC 7.10.2. The same change is applied on Hackage. See
221 ;; <https://hackage.haskell.org/package/xmonad-0.11.1/revisions/>.
222 '(substitute* "xmonad.cabal"
223 (("utf8-string >= 0.3 && < 0.4")
224 "utf8-string >= 0.3 && < 1.1")))))
225 (build-system haskell-build-system)
227 `(("ghc-mtl" ,ghc-mtl)
228 ("ghc-utf8-string" ,ghc-utf8-string)
229 ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
230 ("ghc-x11" ,ghc-x11)))
233 (modify-phases %standard-phases
235 'install 'install-xsession
237 (let* ((xsessions (string-append %output "/share/xsessions")))
239 (call-with-output-file
240 (string-append xsessions "/xmonad.desktop")
247 Type=Application~%" ,name ,synopsis %output)))))))))
248 (home-page "http://xmonad.org")
250 "Xmonad is a tiling window manager for X. Windows are arranged
251 automatically to tile the screen without gaps or overlap, maximising screen
252 use. All features of the window manager are accessible from the keyboard: a
253 mouse is strictly optional. Xmonad is written and extensible in Haskell.
254 Custom layout algorithms, and other extensions, may be written by the user in
255 config files. Layouts are applied dynamically, and different layouts may be
256 used on each workspace. Xinerama is fully supported, allowing windows to be
257 tiled on several screens.")
258 (license license:bsd-3)))
260 (define-public ghc-xmonad-contrib
262 (name "ghc-xmonad-contrib")
267 (uri (string-append "http://hackage.haskell.org/package/xmonad-contrib/"
268 "xmonad-contrib-" version ".tar.gz"))
271 "1g5cw9vvnfbiyi599fngk02zlmdhrf82x0bndhypkn6kybab6yd3"))))
272 (build-system haskell-build-system)
274 `(("ghc-mtl" ,ghc-mtl)
275 ("ghc-old-time" ,ghc-old-time)
276 ("ghc-random" ,ghc-random)
277 ("ghc-utf8-string" ,ghc-utf8-string)
278 ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
280 ("ghc-x11-xft" ,ghc-x11-xft)
282 (home-page "http://xmonad.org")
283 (synopsis "Third party extensions for xmonad")
285 "Third party tiling algorithms, configurations, and scripts to Xmonad, a
286 tiling window manager for X.")
287 (license license:bsd-3)))
289 (define-public evilwm
296 (uri (string-append "http://www.6809.org.uk/evilwm/evilwm-"
300 "0ak0yajzk3v4dg5wmaghv6acf7v02a4iw8qxmq5yw5ard8lrqn3r"))
301 (patches (search-patches "evilwm-lost-focus-bug.patch"))))
302 (build-system gnu-build-system)
306 ("libxrandr" ,libxrandr)))
308 `(#:modules ((srfi srfi-26)
310 (guix build gnu-build-system))
311 #:make-flags (let ((inputs (map (cut assoc-ref %build-inputs <>)
312 '("libx11" "libxext" "libxrandr")))
313 (join (lambda (proc strs)
314 (string-join (map proc strs) " ")))
315 (dash-I (cut string-append "-I" <> "/include"))
316 (dash-L (cut string-append "-L" <> "/lib")))
317 `("desktopfilesdir=$(prefix)/share/xsessions"
318 ,(string-append "prefix=" (assoc-ref %outputs "out"))
319 ,(string-append "CPPFLAGS=" (join dash-I inputs))
320 ,(string-append "LDFLAGS=" (join dash-L inputs))))
321 #:tests? #f ;no tests
322 #:phases (modify-phases %standard-phases
323 (delete 'configure)))) ;no configure script
324 (home-page "http://www.6809.org.uk/evilwm/")
325 (synopsis "Minimalist window manager for the X Window System")
327 "evilwm is a minimalist window manager based on aewm, extended to feature
328 many keyboard controls with repositioning and maximize toggles, solid window
329 drags, snap-to-border support, and virtual desktops.")
330 (license (license:x11-style "file:///README"))))
332 (define-public fluxbox
336 (synopsis "Small and fast window manager")
339 (uri (string-append "mirror://sourceforge/fluxbox/fluxbox/"
340 version "/fluxbox-" version ".tar.xz"))
343 "1h1f70y40qd225dqx937vzb4k2cz219agm1zvnjxakn5jkz7b37w"))))
344 (build-system gnu-build-system)
346 `(#:make-flags '("CPPFLAGS=-U__TIME__") ;ugly, but for reproducibility
348 (modify-phases %standard-phases
350 'install 'install-xsession
352 (let ((xsessions (string-append %output "/share/xsessions")))
354 (call-with-output-file
355 (string-append xsessions "/fluxbox.desktop")
361 Exec=~a/bin/startfluxbox~@
362 Type=Application~%" ,name ,synopsis %output)))))))))
364 `(("pkg-config" ,pkg-config)))
366 `(("freetype" ,freetype)
372 ("libxinerama" ,libxinerama)
374 ("libxrandr" ,libxrandr)
375 ("libxrender" ,libxrender)))
376 (description "Fluxbox is a window manager. It is light on resources
377 and easy to handle yet full of features to make an easy and fast desktop
379 (home-page "http://fluxbox.org/")
380 (license license:expat)))
382 (define-public awesome
387 (origin (method url-fetch)
389 "https://awesome.naquadah.org/download/awesome-"
393 "1m910lr7wkw2dgzmirfvz7dasfswhhccdf65l21iiciv24c3w1bb"))
394 (modules '((guix build utils)
397 ;; Remove non-reproducible timestamp and use the date of the
398 ;; source file instead.
399 '(substitute* "common/version.c"
400 (("__DATE__ \" \" __TIME__")
403 (make-time time-utc 0
404 (stat:mtime (stat "awesome.c"))))
406 (patches (search-patches "awesome-reproducible-png.patch"))))
407 (build-system cmake-build-system)
408 (native-inputs `(("asciidoc" ,asciidoc)
409 ("docbook-xsl" ,docbook-xsl)
412 ("imagemagick" ,imagemagick)
413 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
414 ("pkg-config" ,pkg-config)
416 (inputs `(("cairo" ,cairo)
418 ("gdk-pixbuf" ,gdk-pixbuf)
423 ("libxcursor" ,libxcursor)
424 ("libxdg-basedir" ,libxdg-basedir)
427 ("startup-notification" ,startup-notification)
428 ("xcb-util" ,xcb-util)
429 ("xcb-util-cursor" ,xcb-util-cursor)
430 ("xcb-util-image" ,xcb-util-image)
431 ("xcb-util-keysyms" ,xcb-util-keysyms)
432 ("xcb-util-renderutil" ,xcb-util-renderutil)
433 ("xcb-util-wm" ,xcb-util-wm)))
435 `(;; Let compression happen in our 'compress-documentation' phase so that
436 ;; '--no-name' is used, which removes timestamps from gzip output.
437 #:configure-flags '("-DCOMPRESS_MANPAGES=off")
439 #:phases (modify-phases %standard-phases
440 (add-before 'build 'xmlto-skip-validation
442 ;; We can't download the necessary schema, so so skip
443 ;; validation and assume they're valid.
444 (substitute* "../build/CMakeFiles/man.dir/build.make"
446 (string-append "/xmlto --skip-validation")))
450 ;; There aren't any tests, so just make sure the binary
451 ;; gets built and can be run successfully.
452 (zero? (system* "../build/awesome" "-v")))))))
453 (synopsis "Highly configurable window manager")
455 "awesome is a window manager for X. It manages windows in different
456 layouts, like floating or tiled. Any layout can be applied dynamically,
457 optimizing the environment for the application in use and the task currently
460 In a tiled layout, windows are managed in a master and stacking area. In a
461 floating layout windows can be resized and moved freely. Dialog windows are
462 always managed as floating, regardless of the layout currently applied.
464 Windows are grouped by tags in awesome. Each window can be tagged with one or
465 more tags. Selecting certain tags displays all windows with these tags.")
466 (license license:gpl2+)
467 (home-page "https://awesome.naquadah.org/")))