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