gnu: Add exercism and dependencies.
[jackhill/guix/guix.git] / gnu / packages / xdisorg.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2013, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
8 ;;; Copyright © 2015 Alexander I.Grafov <grafov@gmail.com>
9 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
10 ;;; Copyright © 2015 xd1le <elisp.vim@gmail.com>
11 ;;; Copyright © 2015 Florian Paul Schmidt <mista.tapas@gmx.net>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
14 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
15 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
16 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
17 ;;; Copyright © 2016, 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
18 ;;; Copyright © 2016 Petter <petter@mykolab.ch>
19 ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
20 ;;; Copyright © 2017 Nikita <nikita@n0.is>
21 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
22 ;;; Copyright © 2017 Marek Benc <dusxmt@gmx.com>
23 ;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org>
24 ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
25 ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
26 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
27 ;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
28 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
29 ;;; Copyright © 2019 Kyle Andrews <kyle.c.andrews@gmail.com>
30 ;;; Copyright © 2019, 2020 Josh Holland <josh@inv.alid.pw>
31 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
32 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
33 ;;; Copyright © 2020 David Wilson <david@daviwil.com>
34 ;;; Copyright © 2020 Ivan Vilata i Balaguer <ivan@selidor.net>
35 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
36 ;;; Copyright © 2020 Damien Cassou <damien@cassou.me>
37 ;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
38 ;;; Copyright © 2020 Boris A. Dekshteyn <boris.dekshteyn@gmail.com>
39 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
40 ;;;
41 ;;; This file is part of GNU Guix.
42 ;;;
43 ;;; GNU Guix is free software; you can redistribute it and/or modify it
44 ;;; under the terms of the GNU General Public License as published by
45 ;;; the Free Software Foundation; either version 3 of the License, or (at
46 ;;; your option) any later version.
47 ;;;
48 ;;; GNU Guix is distributed in the hope that it will be useful, but
49 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 ;;; GNU General Public License for more details.
52 ;;;
53 ;;; You should have received a copy of the GNU General Public License
54 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55
56 (define-module (gnu packages xdisorg)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix packages)
59 #:use-module (guix download)
60 #:use-module (guix git-download)
61 #:use-module (guix hg-download)
62 #:use-module (guix utils)
63 #:use-module (guix build-system cmake)
64 #:use-module (guix build-system gnu)
65 #:use-module (guix build-system glib-or-gtk)
66 #:use-module (guix build-system meson)
67 #:use-module (guix build-system python)
68 #:use-module (guix build-system scons)
69 #:use-module (gnu packages)
70 #:use-module (gnu packages documentation)
71 #:use-module (gnu packages admin)
72 #:use-module (gnu packages base)
73 #:use-module (gnu packages algebra)
74 #:use-module (gnu packages autotools)
75 #:use-module (gnu packages check)
76 #:use-module (gnu packages compression)
77 #:use-module (gnu packages image)
78 #:use-module (gnu packages pkg-config)
79 #:use-module (gnu packages flex)
80 #:use-module (gnu packages freedesktop)
81 #:use-module (gnu packages gawk)
82 #:use-module (gnu packages gettext)
83 #:use-module (gnu packages gl)
84 #:use-module (gnu packages glib)
85 #:use-module (gnu packages gnome)
86 #:use-module (gnu packages haskell-xyz)
87 #:use-module (gnu packages icu4c)
88 #:use-module (gnu packages man)
89 #:use-module (gnu packages maths)
90 #:use-module (gnu packages m4)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages python)
94 #:use-module (gnu packages python-xyz)
95 #:use-module (gnu packages linux)
96 #:use-module (gnu packages gl)
97 #:use-module (gnu packages guile)
98 #:use-module (gnu packages xml)
99 #:use-module (gnu packages gtk)
100 #:use-module (gnu packages qt)
101 #:use-module (gnu packages xorg)
102 #:use-module (gnu packages fontutils)
103 #:use-module (gnu packages bison)
104 #:use-module (ice-9 match))
105
106 ;; packages outside the x.org system proper
107
108 (define-public arandr
109 (package
110 (name "arandr")
111 (version "0.1.10")
112 (source (origin
113 (method url-fetch)
114 (uri (string-append "https://christian.amsuess.com/tools/arandr"
115 "/files/arandr-" version ".tar.gz"))
116 (sha256
117 (base32
118 "135q0llvm077jil2fr92ssw3p095m4r8jfj0lc5rr3m71n4srj6v"))
119 (modules '((guix build utils)))
120 (snippet
121 '(begin
122 ;; Do not record a timestamp and file name in gzipped man
123 ;; pages (this is equivalent to 'gzip --no-name'.)
124 (substitute* "setup.py"
125 (("gzip\\.open\\(gzfile, 'w', 9\\)")
126 "gzip.GzipFile('', 'wb', 9, open(gzfile, 'wb'), 0.)"))
127 #t))))
128 (build-system python-build-system)
129 (arguments
130 `(#:phases
131 (modify-phases %standard-phases
132 (add-before 'build 'configure
133 (lambda* (#:key inputs #:allow-other-keys)
134 (substitute* "screenlayout/xrandr.py"
135 (("\"xrandr\"") (string-append "\"" (assoc-ref inputs "xrandr")
136 "/bin/xrandr\"")))
137 #t))
138 (add-after 'install 'wrap-gi-typelib
139 (lambda* (#:key inputs outputs #:allow-other-keys)
140 (let ((out (assoc-ref outputs "out"))
141 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
142 (wrap-program (string-append out "/bin/arandr")
143 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
144 #t)))
145 #:tests? #f)) ;no tests
146 (inputs `(("gtk+" ,gtk+)
147 ("pycairo" ,python-pycairo)
148 ("pygobject" ,python-pygobject)
149 ("xrandr" ,xrandr)))
150 (native-inputs `(("gettext" ,gettext-minimal)
151 ("python-docutils" ,python-docutils)))
152 (home-page "https://christian.amsuess.com/tools/arandr/")
153 (synopsis "Another RandR graphical user interface")
154 ;; TRANSLATORS: "X11 resize-and-rotate" should not be translated.
155 (description "ARandR is designed to provide a simple visual front end for
156 the X11 resize-and-rotate (RandR) extension. Relative monitor positions are
157 shown graphically and can be changed in a drag-and-drop way. Configurations
158 are saved as executable shell scripts which can be loaded without using this
159 program.")
160 (license license:gpl3+)))
161
162 (define-public autorandr
163 (package
164 (name "autorandr")
165 (version "1.10.1")
166 (home-page "https://github.com/phillipberndt/autorandr")
167 (source
168 (origin
169 (method git-fetch)
170 (uri (git-reference
171 (url home-page)
172 (commit version)))
173 (file-name (git-file-name name version))
174 (sha256
175 (base32 "0msw9b1hdy3gbq9w5d04mfizhyirz1c648x84mlcbzl8salm7vpg"))))
176 (build-system python-build-system)
177 (native-inputs
178 `(("pkg-config" ,pkg-config)))
179 (inputs
180 `(("xrandr" ,xrandr)
181 ("libxcb" ,libxcb)))
182 (arguments
183 `(#:phases
184 (modify-phases %standard-phases
185 (add-before 'build 'configure
186 (lambda* (#:key inputs outputs #:allow-other-keys)
187 (let ((xrandr (string-append (assoc-ref inputs "xrandr")
188 "/bin/xrandr")))
189 (substitute* "contrib/etc/xdg/autostart/autorandr.desktop"
190 (("/usr") (assoc-ref outputs "out")))
191 (substitute* "autorandr.py"
192 (("popen\\(\"xrandr") (string-append "popen(\"" xrandr))
193 (("\\[\"xrandr") (string-append "[\"" xrandr)))
194 (substitute* "contrib/autorandr_launcher/autorandr_launcher.c"
195 (("/usr/bin/autorandr")
196 (string-append (assoc-ref outputs "out") "/bin/autorandr")))
197 (setenv "CC" "gcc"))
198 #t))
199 (add-after 'install 'install-contrib
200 (lambda* (#:key outputs #:allow-other-keys)
201 (invoke "make"
202 (string-append "DESTDIR=" (assoc-ref outputs "out"))
203 "PREFIX="
204 "BASH_COMPLETIONS_DIR=etc/bash_completion.d"
205 "install"
206 "TARGETS=autorandr launcher manpage bash_completion"))))))
207 (synopsis "Auto-detect connected displays and load appropriate setup")
208 (description "Autorandr wraps around xrandr to help with X11
209 multi-screen configuration management. It allows the user to create profiles
210 for various multi-screen setups. Autorandr automatically detects the profiles
211 that can be activated based on the connected hardware. Hook scripts can be
212 used to further tweak the behaviour of the different profiles.")
213 (license license:gpl3+)))
214
215 (define-public bemenu
216 (package
217 (name "bemenu")
218 (version "0.4.1")
219 (source
220 (origin
221 (method git-fetch)
222 (uri (git-reference
223 (url "https://github.com/Cloudef/bemenu.git")
224 (commit version)))
225 (file-name (git-file-name name version))
226 (sha256
227 (base32 "1fjcs9d3533ay3nz79cx3c0lmy2chgragr2lhsy0xl2ckr0iins0"))))
228 (build-system gnu-build-system)
229 (arguments
230 '(#:tests? #f
231 #:make-flags (list "CC=gcc"
232 "CFLAGS=-O2 -fPIC"
233 (string-append "LDFLAGS=-Wl,-rpath="
234 (assoc-ref %outputs "out") "/lib")
235 (string-append "PREFIX=" (assoc-ref %outputs "out")))
236 #:phases
237 (modify-phases %standard-phases
238 (delete 'configure))))
239 (inputs
240 `(("cairo" ,cairo)
241 ("libx11" ,libx11)
242 ("libxkbcomon" ,libxkbcommon)
243 ("libxinerama" ,libxinerama)
244 ("ncurses" ,ncurses)
245 ("pango" ,pango)
246 ("wayland" ,wayland)
247 ("wayland-protocols" ,wayland-protocols)))
248 (native-inputs
249 `(("doxygen" ,doxygen)
250 ("pkg-config" ,pkg-config)))
251 (home-page "https://github.com/Cloudef/bemenu")
252 (synopsis "Dynamic menu library and client program inspired by dmenu")
253 (description
254 "bemenu is a dynamic menu which allows the user to flexibly select from a
255 list of options (usually programs to launch). It renders the menu graphically
256 with X11 or Wayland, or in a text terminal with ncurses.")
257 (license (list license:gpl3+ ; client program[s] and other sources
258 license:lgpl3+)))) ; library and bindings
259
260 (define-public copyq
261 (package
262 (name "copyq")
263 (version "3.9.3")
264 (source (origin
265 (method git-fetch)
266 (uri (git-reference
267 (url "https://github.com/hluk/CopyQ.git")
268 (commit (string-append "v" version))))
269 (file-name (git-file-name name version))
270 (sha256
271 (base32
272 "0wlwq9xg8rzsbj0b29z358k4mbrqy04iraa8x0p26pa95yskgcma"))))
273 (build-system cmake-build-system)
274 (arguments
275 `(#:configure-flags '("-DCMAKE_BUILD_TYPE=Release")
276 #:tests? #f)) ; Test suite is a rather manual process.
277 (inputs
278 `(("qtbase" ,qtbase)
279 ("qtscript" ,qtscript)
280 ("qtsvg" ,qtsvg)
281 ("qtx11extras" ,qtx11extras)))
282 (synopsis "Clipboard manager with advanced features")
283 (description "CopyQ is clipboard manager with editing and scripting
284 features. CopyQ monitors system clipboard and saves its content in customized
285 tabs. Saved clipboard can be later copied and pasted directly into any
286 application.")
287 (home-page "https://hluk.github.io/CopyQ/")
288 (license license:gpl3+)))
289
290 (define-public xclip
291 (package
292 (name "xclip")
293 (version "0.13")
294 (source
295 (origin
296 (method git-fetch)
297 (uri (git-reference
298 (url "https://github.com/astrand/xclip.git")
299 (commit version)))
300 (file-name (git-file-name name version))
301 (sha256
302 (base32
303 "0q0hmvcjlv8arhh1pzhja2wglyj6n7z209jnpnzd281kqqv4czcs"))))
304 (build-system gnu-build-system)
305 (arguments
306 '(#:tests? #f)) ;there is no test suite
307 (native-inputs
308 `(("autoconf" ,autoconf)
309 ("automake" ,automake)))
310 (inputs `(("libxmu" ,libxmu)
311 ("libxt" ,libxt)))
312 (home-page "https://github.com/astrand/xclip")
313 (synopsis "Command line interface to X11 clipboard")
314 (description "Xclip is a command line interface to the X11 clipboard. It
315 can also be used for copying files, as an alternative to sftp/scp, thus
316 avoiding password prompts when X11 forwarding has already been setup.")
317 (license license:gpl2+)))
318
319 (define-public libxkbcommon
320 (package
321 (name "libxkbcommon")
322 (version "0.10.0")
323 (source (origin
324 (method url-fetch)
325 (uri (string-append "https://xkbcommon.org/download/libxkbcommon-"
326 version ".tar.xz"))
327 (sha256
328 (base32
329 "1wmnl0hngn6vrqrya4r8hvimlkr4jag39yjprls4gyrqvh667hsp"))))
330 (build-system meson-build-system)
331 (inputs
332 `(("libx11" ,libx11)
333 ("libxcb" ,libxcb)
334 ("wayland" ,wayland)
335 ("wayland-protocols" ,wayland-protocols)
336 ("xkeyboard-config" ,xkeyboard-config)))
337 (native-inputs
338 `(("bison" ,bison)
339 ("doxygen" ,doxygen)
340 ("pkg-config" ,pkg-config)))
341 (arguments
342 `(#:configure-flags
343 (list (string-append "-Dxkb-config-root="
344 (assoc-ref %build-inputs "xkeyboard-config")
345 "/share/X11/xkb")
346 (string-append "-Dx-locale-root="
347 (assoc-ref %build-inputs "libx11")
348 "/share/X11/locale"))))
349 (home-page "https://xkbcommon.org/")
350 (synopsis "Library to handle keyboard descriptions")
351 (description "Xkbcommon is a library to handle keyboard descriptions,
352 including loading them from disk, parsing them and handling their
353 state. It is mainly meant for client toolkits, window systems, and other
354 system applications; currently that includes Wayland, kmscon, GTK+, Qt,
355 Clutter, and more. Despite the name, it is not currently used by anything
356 X11 (yet).")
357 (license (license:x11-style "file://COPYING"
358 "See 'COPYING' in the distribution."))))
359
360 (define-public libfakekey
361 (package
362 (name "libfakekey")
363 (version "0.3")
364 (source
365 (origin
366 (method git-fetch)
367 (uri (git-reference
368 (url "https://git.yoctoproject.org/git/libfakekey")
369 (commit version)))
370 (file-name (git-file-name name version))
371 (sha256
372 (base32 "1jw1d4wc1ysiijirc7apnz3sryrxbl9akgb92mh06dvfkz2nblj0"))))
373 (build-system gnu-build-system)
374 (arguments
375 `(#:make-flags (list "AM_LDFLAGS=-lX11")
376 #:phases
377 (modify-phases %standard-phases
378 (replace 'bootstrap
379 ;; ./autogen.sh calls ./configure before shebangs have been patched.
380 (lambda _
381 (invoke "autoreconf" "-vfi"))))))
382 (native-inputs
383 `(("pkg-config" ,pkg-config)
384
385 ;; For bootstrapping from git.
386 ("autoconf" ,autoconf)
387 ("automake" ,automake)
388 ("libtool" ,libtool)))
389 (inputs
390 `(("libxtst" ,libxtst)
391 ("libx11" ,libx11)))
392 (home-page "https://www.yoctoproject.org/tools-resources/projects/matchbox")
393 (synopsis "X virtual keyboard library")
394 (description
395 "Libfakekey is a virtual keyboard library for X.")
396 (license license:gpl2)))
397
398 (define-public xdotool
399 (package
400 (name "xdotool")
401 (version "3.20160805.1")
402 (source
403 (origin
404 (method url-fetch)
405 (uri (string-append
406 "https://github.com/jordansissel/xdotool/releases/download/v"
407 version "/xdotool-" version ".tar.gz"))
408 (sha256
409 (base32
410 "1a6c1zr86zb53352yxv104l76l8x21gfl2bgw6h21iphxpv5zgim"))))
411 (build-system gnu-build-system)
412 (arguments
413 '(#:tests? #f ; Test suite requires a lot of black magic
414 #:phases
415 (modify-phases %standard-phases
416 (replace 'configure
417 (lambda* (#:key outputs #:allow-other-keys #:rest args)
418 (let ((out (assoc-ref outputs "out")))
419 (mkdir-p (string-append out "/lib"))
420 (setenv "PREFIX" out)
421 (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib"))
422 (setenv "CC" "gcc")
423 #t))))))
424 (native-inputs `(("perl" ,perl))) ; for pod2man
425 (inputs `(("libx11" ,libx11)
426 ("libxext" ,libxext)
427 ("libxi" ,libxi)
428 ("libxinerama" ,libxinerama)
429 ("libxtst" ,libxtst)
430 ("libxkbcommon" ,libxkbcommon)))
431 (home-page "https://www.semicomplete.com/projects/xdotool/")
432 (synopsis "Fake keyboard/mouse input, window management, and more")
433 (description "Xdotool lets you simulate keyboard input and mouse activity,
434 move and resize windows, etc. It does this using X11's XTEST extension and
435 other Xlib functions. Additionally, you can search for windows and move,
436 resize, hide, and modify window properties like the title. If your window
437 manager supports it, you can use xdotool to switch desktops, move windows
438 between desktops, and change the number of desktops.")
439 (license license:bsd-3)))
440
441 (define-public xeyes
442 (package
443 (name "xeyes")
444 (version "1.1.2")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (string-append "https://www.x.org/releases/individual/app/"
449 name "-" version ".tar.bz2"))
450 (sha256
451 (base32 "0lq5j7fryx1wn998jq6h3icz1h6pqrsbs3adskjzjyhn5l6yrg2p"))))
452 (build-system gnu-build-system)
453 (inputs
454 `(("libxext" ,libxext)
455 ("libxmu" ,libxmu)
456 ("libxrender" ,libxrender)
457 ("libxt" ,libxt)))
458 (native-inputs
459 `(("pkg-config" ,pkg-config)))
460 (home-page "https://www.x.org/") ; no dedicated Xeyes page exists
461 (synopsis "Follow-the-mouse X demo")
462 (description "Xeyes is a demo program for x.org. It shows eyes
463 following the mouse.")
464 (license license:x11)))
465
466
467 (define-public pixman
468 (package
469 (name "pixman")
470 (version "0.38.4")
471 (source (origin
472 (method url-fetch)
473 (uri (string-append
474 "https://www.cairographics.org/releases/pixman-"
475 version ".tar.gz"))
476 (sha256
477 (base32
478 "1ryxzdf048x7wsx4dlvrr1p00gzwfs7lybnhgc7ygbj0dvyxcrns"))
479 (patches (search-patches "pixman-CVE-2016-5296.patch"))))
480 (build-system gnu-build-system)
481 (arguments
482 '(#:configure-flags '("--disable-static")))
483 (inputs
484 `(("libpng" ,libpng)
485 ("zlib" ,zlib)))
486 (native-inputs
487 `(("pkg-config" ,pkg-config)))
488 (home-page "http://www.pixman.org/")
489 (synopsis "Low-level pixel manipulation library")
490 (description "Pixman is a low-level software library for pixel
491 manipulation, providing features such as image compositing and trapezoid
492 rasterisation.")
493 (license license:x11)))
494
495 (define-public libdrm
496 (package
497 (name "libdrm")
498 (version "2.4.100")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (string-append
503 "https://dri.freedesktop.org/libdrm/libdrm-"
504 version
505 ".tar.bz2"))
506 (sha256
507 (base32
508 "0p8a1l3a3s40i81mawm8nhrbk7p97ss05qkawp1yx73c30lchz67"))
509 (patches (search-patches "libdrm-symbol-check.patch"))))
510 (build-system meson-build-system)
511 (arguments
512 `(#:configure-flags
513 '(,@(match (%current-system)
514 ((or "armhf-linux" "aarch64-linux")
515 '("-Dexynos=true"
516 "-Domap=true"
517 "-Detnaviv=true"
518 "-Dtegra=true"
519 "-Dfreedreno-kgsl=true"))
520 (_ '())))
521
522 #:phases (modify-phases %standard-phases
523 (replace 'check
524 (lambda _
525 (invoke "meson" "test" "--timeout-multiplier" "5"))))))
526 (inputs
527 `(("libpciaccess" ,libpciaccess)))
528 (native-inputs
529 `(("pkg-config" ,pkg-config)))
530 (home-page "https://dri.freedesktop.org/wiki/")
531 (synopsis "Direct rendering userspace library")
532 (description "The Direct Rendering Infrastructure, also known as the DRI,
533 is a framework for allowing direct access to graphics hardware under the
534 X Window System in a safe and efficient manner. It includes changes to the
535 X server, to several client libraries, and to the kernel (DRM, Direct
536 Rendering Manager). The most important use for the DRI is to create fast
537 OpenGL implementations providing hardware acceleration for Mesa.
538 Several 3D accelerated drivers have been written to the DRI specification,
539 including drivers for chipsets produced by 3DFX, AMD (formerly ATI), Intel
540 and Matrox.")
541 (license license:x11)))
542
543
544 (define-public mtdev
545 (package
546 (name "mtdev")
547 (version "1.1.6")
548 (source
549 (origin
550 (method url-fetch)
551 (uri (string-append
552 "http://bitmath.org/code/mtdev/mtdev-"
553 version ".tar.bz2"))
554 (sha256
555 (base32
556 "1q700h9dqcm3zl6c3gj0qxxjcx6ibw2c51wjijydhwdcm26v5mqm"))))
557 (build-system gnu-build-system)
558 (arguments '(#:configure-flags '("--disable-static")))
559 (home-page "http://bitmath.org/code/mtdev/")
560 (synopsis "Multitouch protocol translation library")
561 (description "Mtdev is a stand-alone library which transforms all
562 variants of kernel MT events to the slotted type B protocol. The events
563 put into mtdev may be from any MT device, specifically type A without
564 contact tracking, type A with contact tracking, or type B with contact
565 tracking.")
566 (license license:x11)))
567
568 (define-public startup-notification
569 (package
570 (name "startup-notification")
571 (version "0.12")
572 (source
573 (origin
574 (method url-fetch)
575 (uri (string-append "https://www.freedesktop.org/software/" name
576 "/releases/" name "-" version ".tar.gz"))
577 (sha256
578 (base32
579 "0jmyryrpqb35y9hd5sgxqy2z0r1snw7d3ljw0jak0n0cjdz1yf9w"))))
580 (build-system gnu-build-system)
581 (native-inputs `(("pkg-config" ,pkg-config)))
582 (inputs
583 `(("libx11" ,libx11)
584 ("xcb-util" ,xcb-util)))
585 (home-page "https://www.freedesktop.org/wiki/Software/startup-notification/")
586 (synopsis "Application startup notification and feedback library")
587 (description
588 "Startup-notification contains a reference implementation of the startup
589 notification protocol. The reference implementation is mostly under an X Window
590 System style license, and has no special dependencies.")
591 ;; Most of the code is provided under x11 license.
592 (license license:lgpl2.0+)))
593
594 (define-public wmctrl
595 (package
596 (name "wmctrl")
597 (version "1.07")
598 (source (origin
599 (method url-fetch)
600 (uri (string-append
601 "https://sites.google.com/site/tstyblo/wmctrl/wmctrl-"
602 version ".tar.gz"))
603 (sha256
604 (base32
605 "1afclc57b9017a73mfs9w7lbdvdipmf9q0xdk116f61gnvyix2np"))
606 (patches (search-patches "wmctrl-64-fix.patch"))))
607 (build-system gnu-build-system)
608 (arguments
609 '(#:configure-flags
610 (list (string-append "--mandir="
611 (assoc-ref %outputs "out")
612 "/share/man"))))
613 (native-inputs
614 `(("pkg-config" ,pkg-config)))
615 (inputs
616 `(("libx11" ,libx11)
617 ("libxmu" ,libxmu)
618 ("glib" ,glib)))
619 (home-page "http://tomas.styblo.name/wmctrl/")
620 (synopsis "Command-line tool to control X window managers")
621 (description
622 "Wmctrl interacts with an X window manager that is compatible
623 with the EWMH/NetWM specification. It can query the window manager for
624 information, and request for certain window management actions (resize and
625 move windows, switch between desktops, etc.).")
626 (license license:gpl2+)))
627
628 (define-public scrot
629 (package
630 (name "scrot")
631 (version "1.3")
632 (source
633 (origin
634 (method git-fetch)
635 (uri
636 (git-reference
637 (url "https://github.com/resurrecting-open-source-projects/scrot.git")
638 (commit version)))
639 (file-name (git-file-name name version))
640 (sha256
641 (base32 "0x70hd59ik37kqd8xqpwrz46np01jv324iz28x2s0kk36d7sblsj"))))
642 (build-system gnu-build-system)
643 (native-inputs
644 `(("autoconf" ,autoconf)
645 ("autoconf-archive" ,autoconf-archive)
646 ("automake" ,automake)))
647 (inputs
648 `(("giblib" ,giblib)
649 ("libx11" ,libx11)
650 ("libXcursor" ,libxcursor)
651 ("libXfixes" ,libxfixes)))
652 (home-page "https://github.com/resurrecting-open-source-projects/scrot")
653 (synopsis "Command-line screen capture utility for X Window System")
654 (description
655 "Scrot saves a screenshot of a full screen, a window or a part
656 of the screen selected by mouse.")
657 ;; This license removes a clause about X Consortium from the original
658 ;; X11 license.
659 (license (license:x11-style "file://COPYING"
660 "See 'COPYING' in the distribution."))))
661
662 (define-public slop
663 (package
664 (name "slop")
665 (version "7.5")
666 (source (origin
667 (method git-fetch)
668 (uri (git-reference
669 (url "https://github.com/naelstrof/slop.git")
670 (commit (string-append "v" version))))
671 (file-name (git-file-name name version))
672 (sha256
673 (base32
674 "1k8xxb4rj2fylr4vj16yvsf73cyywliz9cy78pl4ibmi03jhg837"))))
675 (build-system cmake-build-system)
676 (arguments
677 '(#:tests? #f)) ; no "check" target
678 (inputs
679 `(("glew" ,glew)
680 ("glm" ,glm)
681 ("icu4c" ,icu4c)
682 ("libxext" ,libxext)
683 ("libxrender" ,libxrender)
684 ("mesa" ,mesa)))
685 (home-page "https://github.com/naelstrof/slop")
686 (synopsis "Select a region and print its bounds to stdout")
687 (description
688 "slop (Select Operation) is a tool that queries for a selection from a
689 user and prints the region to stdout. It grabs the mouse and turns it into a
690 crosshair, lets the user click and drag to make a selection (or click on a
691 window) while drawing a pretty box around it, then finally prints the
692 selection's dimensions to stdout.")
693 (license license:gpl3+)))
694
695 (define-public maim
696 (package
697 (name "maim")
698 (version "5.6.3")
699 (source (origin
700 (method git-fetch)
701 (uri (git-reference
702 (url "https://github.com/naelstrof/maim.git")
703 (commit (string-append "v" version))))
704 (file-name (git-file-name name version))
705 (sha256
706 (base32
707 "181mjjrjb9fs1ficcv9miqbk94v95j1yli7fjp2dj514g7nj9l3x"))))
708 (build-system cmake-build-system)
709 (arguments
710 '(#:tests? #f)) ; no "check" target
711 (inputs
712 `(("glm" ,glm)
713 ("libjpeg" ,libjpeg-turbo)
714 ("libpng" ,libpng)
715 ("libxcomposite" ,libxcomposite)
716 ("libxfixes" ,libxfixes)
717 ("libxrandr" ,libxrandr)
718 ("mesa" ,mesa)
719 ("slop" ,slop)
720 ("zlib" ,zlib)))
721 (home-page "https://github.com/naelstrof/maim")
722 (synopsis "Screenshot utility for X Window System")
723 (description
724 "maim (Make Image) is a tool that takes screenshots of your desktop and
725 saves it in any format. Along with a full screen, it allows you to capture a
726 predefined region or a particular window. Also, it makes it possible to
727 include cursor in the resulting image.")
728 (license license:gpl3+)))
729
730 (define-public unclutter
731 (package
732 (name "unclutter")
733 (version "8")
734 (source (origin
735 (method url-fetch)
736 (uri (string-append
737 "http://ftp.x.org/contrib/utilities/unclutter-"
738 version ".tar.Z"))
739 (sha256
740 (base32
741 "0ahrr5z6wxqqfyihm112hnq0859zlxisrb3y5232zav58j6sfmdq"))))
742 (build-system gnu-build-system)
743 (arguments
744 '(#:tests? #f ; no check target
745 #:phases
746 (modify-phases %standard-phases
747 (delete 'configure)
748 (replace 'install
749 (lambda* (#:key inputs outputs #:allow-other-keys)
750 (let* ((out (assoc-ref outputs "out"))
751 (bin (string-append out "/bin"))
752 (man1 (string-append out "/share/man/man1")))
753 (mkdir-p bin)
754 (mkdir-p man1)
755 (invoke "make" "install" "install.man"
756 (string-append "BINDIR=" bin)
757 (string-append "MANDIR=" man1))))))))
758 (inputs `(("libx11" ,libx11)))
759 (home-page "http://ftp.x.org/contrib/utilities/")
760 (synopsis "Hide idle mouse cursor")
761 (description
762 "Unclutter is a program which runs permanently in the background of an
763 X11 session. It checks on the X11 pointer (cursor) position every few
764 seconds, and when it finds it has not moved (and no buttons are pressed
765 on the mouse, and the cursor is not in the root window) it creates a
766 small sub-window as a child of the window the cursor is in. The new
767 window installs a cursor of size 1x1 but a mask of all 0, i.e. an
768 invisible cursor. This allows you to see all the text in an xterm or
769 xedit, for example. The human factors crowd would agree it should make
770 things less distracting.")
771 (license license:public-domain)))
772
773 (define-public xautomation
774 (package
775 (name "xautomation")
776 (version "1.09")
777 (source
778 (origin
779 (method url-fetch)
780 (uri (string-append "https://www.hoopajoo.net/static/projects/"
781 "xautomation-" version ".tar.gz"))
782
783 (sha256
784 (base32
785 "03azv5wpg65h40ip2kk1kdh58vix4vy1r9bihgsq59jx2rhjr3zf"))))
786 (build-system gnu-build-system)
787 (inputs
788 `(("libpng" ,libpng)
789 ("libx11" ,libx11)
790 ("libxi" ,libxi)
791 ("libxtst" ,libxtst)))
792 (native-inputs
793 `(("xorgproto" ,xorgproto)))
794 (synopsis "Tools to automate tasks in X such as detecting on screen images")
795 (description
796 "Xautomation can control X from the command line for scripts, and
797 do visual scraping to find things on the screen. The control interface
798 allows mouse movement, clicking, button up/down, key up/down, etc, and
799 uses the XTest extension so you don't have the annoying problems that
800 xse has when apps ignore sent events. The visgrep program can find
801 images inside of images and reports the coordinates, allowing programs
802 to find buttons, etc, on the screen to click on.")
803 (home-page "https://www.hoopajoo.net/projects/xautomation.html")
804 (license license:gpl2+)))
805
806 (define-public xbanish
807 (package
808 (name "xbanish")
809 (version "1.7")
810 (home-page "https://github.com/jcs/xbanish")
811 (source (origin
812 (method git-fetch)
813 (uri (git-reference (url home-page)
814 (commit (string-append "v" version))))
815 (file-name (git-file-name name version))
816 (sha256
817 (base32
818 "0ic5f7zgc32p5g1wxas9y5h8dhik0pvsa8wmn6skdry56gw9vg9q"))))
819 (build-system gnu-build-system)
820 (arguments
821 `(#:tests? #f ; no tests
822 #:make-flags (list "CC=gcc"
823 (string-append "PREFIX=" (assoc-ref %outputs "out")))
824 #:phases (modify-phases %standard-phases
825 (delete 'configure)))) ; no configure script
826 (inputs
827 `(("libx11" ,libx11)
828 ("libxfixes" ,libxfixes)
829 ("libxi" ,libxi)
830 ("libxt" ,libxt)))
831 (synopsis "Banish the mouse cursor")
832 (description
833 "@command{xbanish} hides the mouse cursor when you start typing, and
834 shows it again when the mouse cursor moves or a mouse button is pressed.")
835 (license license:bsd-3)))
836
837 (define-public xlockmore
838 (package
839 (name "xlockmore")
840 (version "5.62")
841 (source (origin
842 (method url-fetch)
843 (uri (list (string-append "http://sillycycle.com/xlock/"
844 "xlockmore-" version ".tar.xz")
845 ;; Previous releases are moved to a subdirectory.
846 (string-append "http://sillycycle.com/xlock/"
847 "recent-releases/"
848 "xlockmore-" version ".tar.xz")))
849 (sha256
850 (base32
851 "0b05wgj4mpssy4hd7km5c48i454dfg45p11mfmsr7xjd2gnz5gqi"))))
852 (build-system gnu-build-system)
853 (arguments
854 '(#:configure-flags (list (string-append "--enable-appdefaultdir="
855 (assoc-ref %outputs "out")
856 "/lib/X11/app-defaults"))
857 #:tests? #f)) ;no such thing as a test suite
858 (inputs
859 `(("libX11" ,libx11)
860 ("libXext" ,libxext)
861 ("libXt" ,libxt)
862 ("linux-pam" ,linux-pam)))
863 (home-page "https://sillycycle.com/xlockmore.html")
864 (synopsis "Screen locker for the X Window System")
865 (description
866 "XLockMore is a classic screen locker and screen saver for the
867 X Window System.")
868 (license (license:non-copyleft #f "See xlock.c.")
869 ))) ; + GPLv2 in modes/glx/biof.c.
870
871 (define-public xosd
872 (package
873 (name "xosd")
874 (version "2.2.14")
875 (source (origin
876 (method url-fetch)
877 (uri (string-append
878 "mirror://sourceforge/libxosd/libxosd/xosd-" version "/"
879 name "-" version ".tar.gz"))
880 (sha256
881 (base32
882 "025m7ha89q29swkc7s38knnbn8ysl24g2h5s7imfxflm91psj7sg"))))
883 (build-system gnu-build-system)
884 (arguments
885 '(#:configure-flags
886 (list (string-append "--mandir=" %output "/share/man"))))
887 (inputs
888 `(("libx11" ,libx11)
889 ("libxt" ,libxt)
890 ("libxext" ,libxext)
891 ("libxinerama" ,libxinerama)))
892 (home-page "https://sourceforge.net/projects/libxosd/")
893 (synopsis "X On Screen Display")
894 (description
895 "XOSD provides a C library and a simple utility (osd_cat) for displaying
896 transparent text on your screen.")
897 (license license:gpl2+)))
898
899 (define-public xbindkeys
900 (package
901 (name "xbindkeys")
902 (version "1.8.7")
903 (source (origin
904 (method url-fetch)
905 ;; Download from the savannah mirror list fails
906 (uri (string-append
907 "http://www.nongnu.org/xbindkeys/xbindkeys-"
908 version
909 ".tar.gz"))
910 (sha256
911 (base32
912 "1wl2vc5alisiwyk8m07y1ryq8w3ll9ym83j27g4apm4ixjl8d6x2"))))
913 (build-system gnu-build-system)
914 (native-inputs
915 `(("pkg-config" ,pkg-config)))
916 (inputs
917 `(("libx11" ,libx11)
918 ("guile" ,guile-2.2)))
919 (home-page "https://www.nongnu.org/xbindkeys/")
920 (synopsis "Associate a combination of keys with a shell command")
921 (description
922 "XBindKeys is a program that allows you to launch shell commands with
923 your keyboard or your mouse under the X Window System. It links commands to
924 keys or mouse buttons, using a configuration file. It's independent of the
925 window manager and can capture all keyboard keys (ex: Power, Wake...). It
926 optionally supports a Guile-based configuration file layout, which enables you
927 to access all XBindKeys internals, so you can have key combinations, double
928 clicks or timed double clicks take actions. Also all functions that work in
929 Guile will work for XBindKeys.")
930 (license license:gpl2+)))
931
932 (define-public sxhkd
933 (package
934 (name "sxhkd")
935 (version "0.6.1")
936 (source
937 (origin
938 (method git-fetch)
939 (uri (git-reference
940 (url "https://github.com/baskerville/sxhkd")
941 (commit version)))
942 (file-name (git-file-name name version))
943 (sha256
944 (base32 "0j7bl2l06r0arrjzpz7al9j6cwzc730knbsijp7ixzz96pq7xa2h"))))
945 (build-system gnu-build-system)
946 (inputs
947 `(("asciidoc" ,asciidoc)
948 ("libxcb" ,libxcb)
949 ("xcb-util" ,xcb-util)
950 ("xcb-util-keysyms" ,xcb-util-keysyms)
951 ("xcb-util-wm" ,xcb-util-wm)))
952 (arguments
953 `(#:phases (modify-phases %standard-phases (delete 'configure))
954 #:tests? #f ; no check target
955 #:make-flags
956 (list "CC=gcc"
957 (string-append "PREFIX=" %output)
958 ;; Keep the documentation where the build system installs LICENSE.
959 (string-append "DOCPREFIX=" %output
960 "/share/doc/" ,name "-" ,version))))
961 (home-page "https://github.com/baskerville/sxhkd")
962 (synopsis "Simple X hotkey daemon")
963 (description "sxhkd is a simple X hotkey daemon with a powerful and
964 compact configuration syntax.")
965 (license license:bsd-2)))
966
967 (define-public rxvt-unicode
968 (package
969 (name "rxvt-unicode")
970 (version "9.22")
971 (source (origin
972 (method url-fetch)
973 (uri (string-append "http://dist.schmorp.de/rxvt-unicode/Attic/"
974 name "-" version ".tar.bz2"))
975 (patches (search-patches "rxvt-unicode-escape-sequences.patch"))
976 (sha256
977 (base32
978 "1pddjn5ynblwfrdmskylrsxb9vfnk3w4jdnq2l8xn2pspkljhip9"))))
979 (build-system gnu-build-system)
980 (arguments
981 ;; This sets the destination when installing the necessary terminal
982 ;; capability data, which are not provided by 'ncurses'. See
983 ;; https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html
984 `(#:make-flags (list (string-append "TERMINFO="
985 (assoc-ref %outputs "out")
986 "/share/terminfo"))
987 #:phases
988 (modify-phases %standard-phases
989 (add-after 'install 'install-desktop-urxvt
990 (lambda* (#:key outputs #:allow-other-keys)
991 (let* ((output (assoc-ref outputs "out"))
992 (desktop (string-append output "/share/applications")))
993 (mkdir-p desktop)
994 (with-output-to-file
995 (string-append desktop "/urxvt.desktop")
996 (lambda _
997 (format #t
998 "[Desktop Entry]~@
999 Name=rxvt-unicode~@
1000 Comment=~@
1001 Exec=~a/bin/urxvt~@
1002 TryExec=~@*~a/bin/urxvt~@
1003 Icon=~@
1004 Type=Application~%"
1005 output)))
1006 #t)))
1007 (add-after 'install 'install-desktop-urxvtc
1008 (lambda* (#:key outputs #:allow-other-keys)
1009 (let* ((output (assoc-ref outputs "out"))
1010 (desktop (string-append output "/share/applications")))
1011 (mkdir-p desktop)
1012 (with-output-to-file
1013 (string-append desktop "/urxvtc.desktop")
1014 (lambda _
1015 (format #t
1016 "[Desktop Entry]~@
1017 Name=rxvt-unicode (client)~@
1018 Comment=Rxvt clone with XFT and unicode support~@
1019 Exec=~a/bin/urxvtc~@
1020 TryExec=~@*~a/bin/urxvtc~@
1021 Icon=~@
1022 Type=Application~%"
1023 output)))
1024 #t))))))
1025 (inputs
1026 `(("libXft" ,libxft)
1027 ("libX11" ,libx11)))
1028 (native-inputs
1029 `(("ncurses" ,ncurses) ;trigger the installation of terminfo data
1030 ("perl" ,perl)
1031 ("pkg-config" ,pkg-config)))
1032 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
1033 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
1034 (native-search-paths
1035 (list (search-path-specification
1036 (variable "TERMINFO_DIRS")
1037 (files '("share/terminfo")))))
1038 (home-page "http://software.schmorp.de/pkg/rxvt-unicode.html")
1039 (synopsis "Rxvt clone with XFT and unicode support")
1040 (description "Rxvt-unicode (urxvt) is a colour vt102 terminal emulator
1041 intended as an xterm replacement for users who do not require features such as
1042 Tektronix 4014 emulation and toolkit-style configurability. It supports
1043 unicode, XFT and may be extended with Perl plugins. It also comes with a
1044 client/daemon pair that lets you open any number of terminal windows from
1045 within a single process.")
1046 (license license:gpl3+)))
1047
1048 (define-public xcape
1049 (package
1050 (name "xcape")
1051 (version "1.2")
1052 (source (origin
1053 (method git-fetch)
1054 (uri (git-reference
1055 (url "https://github.com/alols/xcape.git")
1056 (commit (string-append "v" version))))
1057 (file-name (git-file-name name version))
1058 (sha256
1059 (base32
1060 "09a05cxgrip6nqy1qmwblamp2bhknqnqmxn7i2a1rgxa0nba95dm"))))
1061 (build-system gnu-build-system)
1062 (arguments
1063 `(#:tests? #f ; no check target
1064 ;; no configure script
1065 #:phases (modify-phases %standard-phases (delete 'configure))
1066 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1067 "MANDIR=/share/man/man1"
1068 "CC=gcc")))
1069 (inputs
1070 `(("libxtst" ,libxtst)
1071 ("libx11" ,libx11)))
1072 (native-inputs
1073 `(("pkg-config" ,pkg-config)))
1074 (home-page "https://github.com/alols/xcape")
1075 (synopsis "Use a modifier key in X.org as another key")
1076 (description
1077 "This utility for X.org uses a modifier key as another key when
1078 pressed and released on its own. The default behaviour is to generate the
1079 Escape key when Left Control is pressed and released on its own.")
1080 (license license:gpl3+)))
1081
1082 (define-public libwacom
1083 (package
1084 (name "libwacom")
1085 (version "1.3")
1086 (source (origin
1087 (method url-fetch)
1088 (uri (string-append
1089 "https://github.com/linuxwacom/libwacom/releases/download/"
1090 "libwacom-" version "/libwacom-" version ".tar.bz2"))
1091 (sha256
1092 (base32
1093 "0g48cdg2qpvrr2nk8ccibjg3iv7iqskdv66izxacqx70w47y1771"))))
1094 (build-system glib-or-gtk-build-system)
1095 (arguments
1096 `(#:configure-flags '("--disable-static")))
1097 (native-inputs
1098 `(("pkg-config" ,pkg-config)))
1099 (inputs
1100 `(("gtk+" ,gtk+)
1101 ("libgudev" ,libgudev)
1102 ("eudev" ,eudev)
1103 ("libxml2" ,libxml2)))
1104 (propagated-inputs
1105 ;; libwacom includes header files that include GLib, and libinput uses
1106 ;; those header files.
1107 `(("glib" ,glib)))
1108 (home-page "https://linuxwacom.github.io/")
1109 (synopsis "Helper library for Wacom tablet settings")
1110 (description
1111 "Libwacom is a library to help implement Wacom tablet settings. It is
1112 intended to be used by client-programs that need model identification. It is
1113 already being used by the gnome-settings-daemon and the GNOME Control Center
1114 Wacom tablet applet.")
1115 (license license:x11)))
1116
1117 (define-public xf86-input-wacom
1118 (package
1119 (name "xf86-input-wacom")
1120 (version "0.39.0")
1121 (source
1122 (origin
1123 (method url-fetch)
1124 (uri (string-append
1125 "https://github.com/linuxwacom/xf86-input-wacom/releases/download/"
1126 "xf86-input-wacom-" version "/"
1127 "xf86-input-wacom-" version ".tar.bz2"))
1128 (sha256
1129 (base32 "11qk58az6qwii774ga45h5yqzipwn56f0d74kdbajqdv45p85gqj"))))
1130 (arguments
1131 `(#:configure-flags
1132 (list (string-append "--with-sdkdir="
1133 (assoc-ref %outputs "out")
1134 "/include/xorg")
1135 (string-append "--with-xorg-conf-dir="
1136 (assoc-ref %outputs "out")
1137 "/share/X11/xorg.conf.d"))))
1138 (build-system gnu-build-system)
1139 (native-inputs
1140 `(("pkg-config" ,pkg-config)))
1141 (inputs
1142 `(("xorg-server" ,xorg-server)
1143 ("libxrandr" ,libxrandr)
1144 ("libxinerama" ,libxinerama)
1145 ("libxi" ,libxi)
1146 ("eudev" ,eudev)))
1147 (home-page "https://linuxwacom.github.io/")
1148 (synopsis "Wacom input driver for X")
1149 (description
1150 "The xf86-input-wacom driver is the wacom-specific X11 input driver for
1151 the X.Org X Server version 1.7 and later (X11R7.5 or later).")
1152 (license license:x11)))
1153
1154 (define-public redshift
1155 (package
1156 (name "redshift")
1157 (version "1.12")
1158 (source
1159 (origin
1160 (method url-fetch)
1161 (uri
1162 (string-append "https://github.com/jonls/redshift/"
1163 "releases/download/v" version
1164 "/redshift-" version ".tar.xz"))
1165 (sha256
1166 (base32
1167 "1fi27b73x85qqar526dbd33av7mahca2ykaqwr7siqiw1qqcby6j"))))
1168 (build-system gnu-build-system)
1169 (arguments
1170 `(#:imported-modules (,@%gnu-build-system-modules
1171 (guix build python-build-system))
1172 #:phases
1173 (modify-phases %standard-phases
1174 (add-after 'install 'split-outputs
1175 (lambda* (#:key outputs #:allow-other-keys)
1176 (let ((out (assoc-ref outputs "out"))
1177 (gtk (assoc-ref outputs "gtk"))
1178 (desktop-file "/share/applications/redshift-gtk.desktop"))
1179 (mkdir-p (string-append gtk "/bin"))
1180 (link (string-append out "/bin/redshift-gtk")
1181 (string-append gtk "/bin/redshift-gtk"))
1182 (delete-file (string-append out "/bin/redshift-gtk"))
1183 (copy-recursively (string-append out "/lib")
1184 (string-append gtk "/lib"))
1185 (delete-file-recursively (string-append out "/lib"))
1186 (mkdir-p (string-append gtk "/share/applications"))
1187 (link (string-append out desktop-file)
1188 (string-append gtk desktop-file))
1189 (delete-file (string-append out desktop-file))
1190 (with-directory-excursion (string-append out "/share")
1191 (for-each (lambda (dir)
1192 (copy-recursively
1193 (string-append out "/share/" dir)
1194 (string-append gtk "/share/" dir))
1195 (delete-file-recursively dir))
1196 '("appdata" "icons")))
1197 #t)))
1198 (add-after 'split-outputs 'wrap
1199 (lambda* (#:key inputs outputs #:allow-other-keys)
1200 (let* ((gtk (assoc-ref outputs "gtk"))
1201 (python-version
1202 (@ (guix build python-build-system) python-version))
1203 (python (assoc-ref inputs "python"))
1204 (sitedir (string-append gtk "/lib/python"
1205 (python-version python)
1206 "/site-packages")))
1207 (wrap-program (string-append gtk "/bin/redshift-gtk")
1208 `("PYTHONPATH" ":" prefix
1209 (,(string-append sitedir ":" (getenv "PYTHONPATH"))))
1210 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
1211 #t))))))
1212 (outputs '("out" "gtk"))
1213 (native-inputs
1214 `(("pkg-config" ,pkg-config)
1215 ("intltool" ,intltool)))
1216 (inputs
1217 `(("libdrm" ,libdrm)
1218 ("libx11" ,libx11)
1219 ("libxcb" ,libxcb)
1220 ("libxxf86vm" ,libxxf86vm)
1221 ("glib" ,glib) ;for Geoclue2 support
1222
1223 ;; To build the GTK3 GUI, we need these.
1224 ("gtk+" ,gtk+)
1225 ("python" ,python)
1226 ("python-pygobject" ,python-pygobject)
1227 ("python-pyxdg" ,python-pyxdg)))
1228 (home-page "https://github.com/jonls/redshift")
1229 (synopsis "Adjust the color temperature of your screen")
1230 (description
1231 "Redshift adjusts the color temperature according to the position of the
1232 sun. A different color temperature is set during night and daytime. During
1233 twilight and early morning, the color temperature transitions smoothly from
1234 night to daytime temperature to allow your eyes to slowly adapt. At night the
1235 color temperature should be set to match the lamps in your room.")
1236 (license license:gpl3+)))
1237
1238 (define-public redshift-wayland
1239 (let ((commit "7da875d34854a6a34612d5ce4bd8718c32bec804")
1240 (revision "1"))
1241 (package
1242 (name "redshift-wayland")
1243 (version (string-append "1.12-"
1244 revision "." (string-take commit 7)))
1245 (source (origin
1246 (method git-fetch)
1247 (uri (git-reference
1248 (url "https://github.com/minus7/redshift.git")
1249 (commit commit)))
1250 (file-name (string-append name "-" version))
1251 (sha256
1252 (base32
1253 "0nbkcw3avmzjg1jr1g9yfpm80kzisy55idl09b6wvzv2sz27n957"))))
1254 (build-system gnu-build-system)
1255 (arguments
1256 '(#:phases (modify-phases %standard-phases
1257 (add-after 'install 'create-desktop-file
1258 (lambda* (#:key outputs #:allow-other-keys)
1259 ;; For the GeoClue provider to work, a .desktop file
1260 ;; needs to be provided. A template is available,
1261 ;; but it only gets installed when the GUI is enabled.
1262 ;; Install it manually for this Wayland variant.
1263 (let* ((out (assoc-ref outputs "out"))
1264 (desktop-file
1265 (string-append
1266 out "/share/applications/redshift.desktop")))
1267 (mkdir-p (dirname desktop-file))
1268 (copy-file "data/applications/redshift.desktop.in"
1269 desktop-file)
1270 (substitute* desktop-file
1271 (("^_") ""))
1272 #t))))))
1273 (native-inputs
1274 `(("autoconf" ,autoconf)
1275 ("automake" ,automake)
1276 ("libtool" ,libtool)
1277 ("pkg-config" ,pkg-config)
1278 ("intltool" ,intltool)))
1279 (inputs
1280 `(("libdrm" ,libdrm)
1281 ("libx11" ,libx11)
1282 ("libxcb" ,libxcb)
1283 ("libxxf86vm" ,libxxf86vm)
1284 ("glib" ,glib) ; for Geoclue2 support
1285 ("wayland" ,wayland)))
1286 (home-page "https://github.com/minus7/redshift")
1287 (synopsis "Adjust the color temperature of your screen (with Wayland support)")
1288 (description
1289 "Redshift adjusts the color temperature according to the position of the
1290 sun. A different color temperature is set during night and daytime. During
1291 twilight and early morning, the color temperature transitions smoothly from
1292 night to daytime temperature to allow your eyes to slowly adapt. At night the
1293 color temperature should be set to match the lamps in your room.
1294
1295 This is a fork with added support for Wayland using the wlr-gamma-control
1296 protocol.")
1297 (license license:gpl3+))))
1298
1299 (define-public xscreensaver
1300 (package
1301 (name "xscreensaver")
1302 (version "5.44")
1303 (source
1304 (origin
1305 (method url-fetch)
1306 (uri
1307 (string-append "https://www.jwz.org/xscreensaver/xscreensaver-"
1308 version ".tar.gz"))
1309 (sha256
1310 (base32 "15bv05vpfjwsrqbazrjmm382jd7vvw0mp6y9vasn6wvxzjf0in3k"))))
1311 (build-system gnu-build-system)
1312 (arguments
1313 `(#:tests? #f ; no check target
1314 #:phases
1315 (modify-phases %standard-phases
1316 (add-before 'configure 'adjust-gtk-resource-paths
1317 (lambda _
1318 (substitute* '("driver/Makefile.in" "po/Makefile.in.in")
1319 (("@GTK_DATADIR@") "@datadir@")
1320 (("@PO_DATADIR@") "@datadir@"))
1321 #t)))
1322 #:configure-flags '("--with-pam" "--with-proc-interrupts"
1323 "--without-readdisplay")
1324 #:make-flags (list (string-append "AD_DIR="
1325 (assoc-ref %outputs "out")
1326 "/lib/X11/app-defaults"))))
1327 (native-inputs
1328 `(("pkg-config" ,pkg-config)
1329 ("intltool" ,intltool)))
1330 (inputs
1331 `(("libx11" ,libx11)
1332 ("libxext" ,libxext)
1333 ("libxi" ,libxi)
1334 ("libxt" ,libxt)
1335 ("libxft" ,libxft)
1336 ("libxmu" ,libxmu)
1337 ("libxpm" ,libxpm)
1338 ("libglade" ,libglade)
1339 ("libxml2" ,libxml2)
1340 ("libsm" ,libsm)
1341 ("libjpeg" ,libjpeg-turbo)
1342 ("linux-pam" ,linux-pam)
1343 ("pango" ,pango)
1344 ("gtk+" ,gtk+)
1345 ("perl" ,perl)
1346 ("cairo" ,cairo)
1347 ("bc" ,bc)
1348 ("libxrandr" ,libxrandr)
1349 ("glu" ,glu)
1350 ("glib" ,glib)))
1351 (home-page "https://www.jwz.org/xscreensaver/")
1352 (synopsis "Classic screen saver suite supporting screen locking")
1353 (description
1354 "xscreensaver is a popular screen saver collection with many entertaining
1355 demos. It also acts as a nice screen locker.")
1356 ;; xscreensaver doesn't have a single copyright file and instead relies on
1357 ;; source comment headers, though most files have the same lax
1358 ;; permissions. To reduce complexity, we're pointing at Debian's
1359 ;; breakdown of the copyright information.
1360 (license (license:non-copyleft
1361 (string-append
1362 "http://metadata.ftp-master.debian.org/changelogs/"
1363 "/main/x/xscreensaver/xscreensaver_5.36-1_copyright")))))
1364
1365 (define-public xsel
1366 (package
1367 (name "xsel")
1368 (version "1.2.0")
1369 (source (origin
1370 (method url-fetch)
1371 (uri (string-append "http://www.vergenet.net/~conrad/software"
1372 "/xsel/download/xsel-" version ".tar.gz"))
1373 (sha256
1374 (base32
1375 "070lbcpw77j143jrbkh0y1v10ppn1jwmjf92800w7x42vh4cw9xr"))))
1376 (build-system gnu-build-system)
1377 (inputs
1378 `(("libxt" ,libxt)))
1379 (home-page "http://www.vergenet.net/~conrad/software/xsel/")
1380 (synopsis "Manipulate X selection")
1381 (description
1382 "XSel is a command-line program for getting and setting the contents of
1383 the X selection. Normally this is only accessible by manually highlighting
1384 information and pasting it with the middle mouse button.
1385
1386 XSel reads from standard input and writes to standard output by default,
1387 but can also follow a growing file, display contents, delete entries and more.")
1388 (license (license:x11-style "file://COPYING"
1389 "See COPYING in the distribution."))))
1390
1391 (define-public xdpyprobe
1392 (package
1393 (name "xdpyprobe")
1394 (version "0.1")
1395 (source (origin
1396 (method url-fetch)
1397 (uri (string-append "https://github.com/alezost/" name
1398 "/releases/download/v" version
1399 "/" name "-" version ".tar.gz"))
1400 (sha256
1401 (base32
1402 "1h09wd2qcg08rj5hcakvdh9q01hkrj8vxly94ax3ch2x06lm0zq8"))))
1403 (build-system gnu-build-system)
1404 (inputs
1405 `(("libx11" ,libx11)))
1406 (home-page "https://github.com/alezost/xdpyprobe")
1407 (synopsis "Probe X server for connectivity")
1408 (description
1409 "Xdpyprobe is a tiny C program whose only purpose is to probe a
1410 connectivity of the X server running on a particular @code{DISPLAY}.")
1411 (license license:gpl3+)))
1412
1413 (define-public rofi
1414 (package
1415 (name "rofi")
1416 (version "1.5.4")
1417 (source (origin
1418 (method url-fetch)
1419 (uri (string-append "https://github.com/DaveDavenport/rofi/"
1420 "releases/download/"
1421 version "/rofi-" version ".tar.xz"))
1422 (sha256
1423 (base32
1424 "1nslmyqyzhfr4hxd4llqkkkb8ap8apkdna32rllvar7r576059ci"))))
1425 (build-system gnu-build-system)
1426 (inputs
1427 `(("pango" ,pango)
1428 ("cairo" ,cairo)
1429 ("glib" ,glib)
1430 ("startup-notification" ,startup-notification)
1431 ("librsvg" ,librsvg)
1432 ("libxkbcommon" ,libxkbcommon)
1433 ("libxcb" ,libxcb)
1434 ("xcb-util" ,xcb-util)
1435 ("xcb-util-xrm" ,xcb-util-xrm)
1436 ("xcb-util-wm" ,xcb-util-wm)))
1437 (native-inputs
1438 `(("bison" ,bison)
1439 ("check" ,check)
1440 ("flex" ,flex)
1441 ("glib:bin" ,glib "bin")
1442 ("pkg-config" ,pkg-config)))
1443 (arguments
1444 `(#:parallel-tests? #f ; fails in some circumstances
1445 #:phases
1446 (modify-phases %standard-phases
1447 (add-before 'configure 'adjust-tests
1448 (lambda _
1449 (substitute* '("test/helper-expand.c")
1450 (("~root") "/root")
1451 (("~") "")
1452 (("g_get_home_dir \\(\\)") "\"/\""))
1453 #t)))))
1454 (home-page "https://github.com/DaveDavenport/rofi")
1455 (synopsis "Application launcher")
1456 (description "Rofi is a minimalist application launcher. It memorizes which
1457 applications you regularly use and also allows you to search for an application
1458 by name.")
1459 (license license:expat)))
1460
1461 (define-public tint2
1462 (package
1463 (name "tint2")
1464 (version "0.14.6")
1465 (source (origin
1466 (method url-fetch)
1467 (uri (string-append "https://gitlab.com/o9000/" name
1468 "/repository/archive.tar.gz?ref=" version))
1469 (file-name (string-append name "-" version ".tar.gz"))
1470 (sha256
1471 (base32
1472 "1kwzwxy4myagybm3rc7dgynfgp75742n348qibn1p2an9ggyivda"))))
1473 (build-system cmake-build-system)
1474 (arguments
1475 '(#:tests? #f ;no test target
1476 #:phases
1477 (modify-phases %standard-phases
1478 (add-after 'unpack 'fix-installation-prefix
1479 (lambda _
1480 (substitute* "CMakeLists.txt"
1481 (("/etc") "${CMAKE_INSTALL_PREFIX}/etc"))
1482 #t)))))
1483 (inputs
1484 `(("gtk+" ,gtk+-2)
1485 ("imlib2" ,imlib2)
1486 ("librsvg" ,librsvg)
1487 ("libxcomposite" ,libxcomposite)
1488 ("libxdamage" ,libxdamage)
1489 ("libxft" ,libxft)
1490 ("libxinerama" ,libxinerama)
1491 ("libxrandr" ,libxrandr)
1492 ("startup-notification" ,startup-notification)))
1493 (native-inputs
1494 `(("gettext" ,gettext-minimal)
1495 ("pkg-config" ,pkg-config)))
1496 (home-page "https://gitlab.com/o9000/tint2")
1497 (synopsis "Lightweight task bar")
1498 (description
1499 "Tint2 is a simple task bar made for modern X window managers. It was
1500 specifically made for Openbox but it should also work with other window
1501 managers (GNOME, KDE, XFCE etc.).
1502
1503 The taskbar includes transparency and color settings for the font, icons,
1504 border, and background. It also supports multihead setups, customized mouse
1505 actions, a built-in clock, a battery monitor and a system tray.")
1506 (license license:gpl2)))
1507
1508 (define-public dzen
1509 (let ((commit "488ab66019f475e35e067646621827c18a879ba1")
1510 (revision "1"))
1511 (package
1512 (name "dzen")
1513 (version (string-append "0.9.5-" ; Taken from `config.mk`.
1514 revision "." (string-take commit 7)))
1515 (source (origin
1516 (method git-fetch)
1517 (uri (git-reference
1518 (url "https://github.com/robm/dzen.git")
1519 (commit commit)))
1520 (file-name (string-append name "-" version))
1521 (sha256
1522 (base32
1523 "0y47d6ii87vf4a517gi4fh0yl06f8b085sra77immnsasbq9pxnw"))))
1524 (build-system gnu-build-system)
1525 (arguments
1526 `(#:tests? #f ; No test suite.
1527 #:make-flags ; Replacement for `config.mk`.
1528 (list
1529 (string-append "VERSION = " ,version)
1530 (string-append "PREFIX = " %output)
1531 "MANPREFIX = ${PREFIX}/share/man"
1532 "INCS = -I."
1533 "LIBS = -lc -lX11 -lXinerama -lXpm $(shell pkg-config --libs xft)"
1534 "CFLAGS = -Wall -Os ${INCS} -DVERSION=\\\"${VERSION}\\\"\
1535 -DDZEN_XINERAMA -DDZEN_XPM -DDZEN_XFT $(shell pkg-config --cflags xft)"
1536 "LDFLAGS = ${LIBS}"
1537 "CC = gcc"
1538 "LD = ${CC}")
1539 #:phases
1540 (modify-phases %standard-phases
1541 (delete 'configure) ; No configuration script.
1542 ;; Use own make-flags instead of `config.mk`.
1543 (add-before 'build 'dont-include-config-mk
1544 (lambda _
1545 (substitute* "Makefile" (("include config.mk") ""))
1546 #t)))))
1547 (inputs
1548 `(("libx11" ,libx11)
1549 ("libxft" ,libxft)
1550 ("libxpm" ,libxpm)
1551 ("libxinerama" ,libxinerama)))
1552 (native-inputs `(("pkg-config" ,pkg-config)))
1553 (synopsis "General purpose messaging, notification and menuing program for X11")
1554 (description "Dzen is a general purpose messaging, notification and menuing
1555 program for X11. It was designed to be fast, tiny and scriptable in any language.")
1556 (home-page "https://github.com/robm/dzen")
1557 (license license:expat))))
1558
1559 (define-public xftwidth
1560 (package
1561 (name "xftwidth")
1562 (version "20170402")
1563 (source
1564 (origin
1565 (method git-fetch)
1566 (uri (git-reference
1567 (url "http://github.com/vixus0/xftwidth")
1568 (commit "35ff963908d41a8a6a7101c434c88255728025ee")))
1569 (sha256
1570 (base32
1571 "1jwl25785li24kbp0m1wxfwk4dgxkliynn03nsj813cjr34kq16h"))
1572 (file-name (string-append name "-" version "-checkout"))))
1573 (build-system gnu-build-system)
1574 (inputs `(("freetype" ,freetype)
1575 ("libx11" ,libx11)
1576 ("fontconfig" ,fontconfig)
1577 ("libxft" ,libxft)))
1578 (native-inputs
1579 `(("pkg-config" ,pkg-config)))
1580 (arguments
1581 '(#:phases
1582 (modify-phases %standard-phases
1583 (add-after 'unpack 'fix-makefile ; /usr/bin doesn't show up in PATH
1584 (lambda _ (substitute* "Makefile" (("usr/") "")) #t))
1585 (delete 'check) ; no check included in Makefile
1586 (delete 'configure))
1587 #:make-flags
1588 (let ((out (assoc-ref %outputs "out")))
1589 (list (string-append "DESTDIR=" out)))))
1590 (home-page "https://github.com/vixus0/xftwidth")
1591 (synopsis "Calculator for determining pixel widths of displayed text using Xft fonts")
1592 (description "xftwidth is a small C program for calculating the pixel
1593 widths of displayed text using Xft fonts. It is especially useful in scripts
1594 for displaying text in graphical panels, menus, popups, and notification
1595 windows generated using dzen. These scripts are often used in conjunction with
1596 minimalistic tiling window managers such as herbstluftwm and bspwm.")
1597 (license license:expat)))
1598
1599 (define-public xcb-util-xrm
1600 (package
1601 (name "xcb-util-xrm")
1602 (version "1.3")
1603 (source (origin
1604 (method url-fetch)
1605 (uri (string-append
1606 "https://github.com/Airblader/xcb-util-xrm/releases"
1607 "/download/v" version "/xcb-util-xrm-" version ".tar.bz2"))
1608 (sha256
1609 (base32
1610 "118cj1ybw86pgw0l5whn9vbg5n5b0ijcpx295mwahzi004vz671h"))
1611 (modules '((guix build utils)))
1612 (snippet
1613 ;; Drop bundled m4.
1614 '(begin
1615 (delete-file-recursively "m4")
1616 #t))))
1617 (build-system gnu-build-system)
1618 (native-inputs
1619 `(("pkg-config" ,pkg-config)
1620 ("m4" ,m4)
1621 ("libx11" ,libx11))) ; for tests
1622 (inputs
1623 `(("libxcb" ,libxcb)
1624 ("xcb-util" ,xcb-util)))
1625 (home-page "https://github.com/Airblader/xcb-util-xrm")
1626 (synopsis "XCB utility functions for the X resource manager")
1627 (description
1628 "The XCB util module provides a number of libraries which sit on
1629 top of libxcb, the core X protocol library, and some of the extension
1630 libraries. These experimental libraries provide convenience functions
1631 and interfaces which make the raw X protocol more usable. Some of the
1632 libraries also provide client-side code which is not strictly part of
1633 the X protocol but which has traditionally been provided by Xlib.
1634
1635 XCB util-xrm module provides the following libraries:
1636
1637 - xrm: utility functions for the X resource manager.")
1638 (license license:x11)))
1639
1640 (define-public xcalib
1641 (package
1642 (name "xcalib")
1643 (version "0.10")
1644 (home-page "https://github.com/OpenICC/xcalib")
1645 (source (origin
1646 (method git-fetch)
1647 (uri (git-reference
1648 (url home-page)
1649 (commit version)))
1650 (file-name (git-file-name name version))
1651 (sha256
1652 (base32
1653 "05fzdjmhiafgi2jf0k41i3nm0837a78sb6yv59cwc23nla8g0bhr"))
1654 (patches
1655 (list
1656 ;; Add missing documentation for the new --output option.
1657 ;; This upstream patch can be removed on the next update.
1658 (origin
1659 (method url-fetch)
1660 (uri (string-append
1661 home-page "/commit/"
1662 "ae03889b91fe984b18e925ad2b5e6f2f7354e058.patch"))
1663 (file-name "xcalib-update-man-page.patch")
1664 (sha256
1665 (base32
1666 "0f7b4d5484x4b9n1bwhqmar0kcaa029ffff7bp3xpr734n1qgqb6")))))))
1667 (build-system cmake-build-system)
1668 (arguments
1669 '(#:tests? #f)) ; no test suite
1670 (inputs `(("libx11" ,libx11)
1671 ("libxext" ,libxext)
1672 ("libxrandr" ,libxrandr)
1673 ("libxxf86vm" ,libxxf86vm)))
1674 (synopsis "Tiny monitor calibration loader for XFree86 (or X.org)")
1675 (description "xcalib is a tiny tool to load the content of vcgt-Tags in ICC
1676 profiles to the video card's gamma ramp. It does work with most video card
1677 drivers except the generic VESA driver. Alter brightness, contrast, RGB, and
1678 invert colors on a specific display/screen.")
1679 (license license:gpl2)))
1680
1681 (define-public nxbelld
1682 (package
1683 (name "nxbelld")
1684 (version "0.1.2")
1685 (source (origin
1686 (method git-fetch)
1687 (uri (git-reference
1688 (url "https://github.com/dusxmt/nxbelld.git")
1689 (commit version)))
1690 (sha256
1691 (base32
1692 "04qwhmjs51irinz5mjlxdb3dc6vr79dqmc5fkj80x1ll3ylh5n3z"))
1693 (file-name (git-file-name name version))))
1694 (build-system gnu-build-system)
1695 (arguments '(#:configure-flags `("--enable-sound"
1696 "--enable-wave"
1697 "--enable-alsa")))
1698 (native-inputs `(("autoconf" ,autoconf)
1699 ("automake" ,automake)
1700 ("pkg-config" ,pkg-config)
1701 ("perl" ,perl)))
1702 (inputs `(("libx11" ,libx11)
1703 ("alsa-lib" ,alsa-lib)))
1704 (synopsis "Daemon that performs an action every time the X11 bell is rung")
1705 (description "nxbelld is a tiny utility to aid people who either don't
1706 like the default PC speaker beep, or use a sound driver that doesn't have
1707 support for the PC speaker. The utility performs a given action every time
1708 the X bell is rung. The actions nxbelld can currently perform include running
1709 a specified program, emulating the PC speaker beep using the sound card (default),
1710 or playing a PCM encoded WAVE file.")
1711 (home-page "https://github.com/dusxmt/nxbelld")
1712 (license license:gpl3+)))
1713
1714 (define-public xautolock
1715 (package
1716 (name "xautolock")
1717 (version "2.2")
1718 (source (origin
1719 (method url-fetch)
1720 (uri (string-append "https://www.ibiblio.org/pub/linux/X11/"
1721 "screensavers/xautolock-" version ".tgz"))
1722 (sha256
1723 (base32
1724 "18jd3k3pvlm5x1adyqw63z2b3f4ixh9mfvz9asvnskk3fm8jgw0i"))))
1725 (build-system gnu-build-system)
1726 (native-inputs
1727 `(("imake" ,imake)))
1728 (inputs
1729 `(("libx11" ,libx11)
1730 ("libxext" ,libxext)
1731 ("libxscrnsaver" ,libxscrnsaver)))
1732 (arguments
1733 `(#:tests? #f
1734 #:phases
1735 (modify-phases %standard-phases
1736 (replace 'configure
1737 (lambda* (#:key inputs outputs #:allow-other-keys)
1738 (let ((imake (assoc-ref inputs "imake"))
1739 (out (assoc-ref outputs "out")))
1740 ;; Generate Makefile
1741 (invoke "xmkmf")
1742 (substitute* "Makefile"
1743 ;; These imake variables somehow remain undefined
1744 (("DefaultGcc2[[:graph:]]*Opt") "-O2")
1745 ;; Reset a few variable defaults that are set in imake templates
1746 ((imake) out)
1747 (("(MANPATH = )[[:graph:]]*" _ front)
1748 (string-append front out "/share/man")))
1749 ;; Old BSD-style 'union wait' is unneeded (defining
1750 ;; _USE_BSD did not seem to fix it)
1751 (substitute* "src/engine.c"
1752 (("union wait status") "int status = 0"))
1753 #t)))
1754 (add-after 'install 'install/man
1755 (lambda _
1756 (invoke "make" "install.man"))))))
1757 (home-page "https://ibiblio.org/pub/Linux/X11/screensavers/")
1758 (synopsis "Program launcher for idle X sessions")
1759 (description "Xautolock monitors input devices under the X Window
1760 System, and launches a program of your choice if there is no activity after
1761 a user-configurable period of time.")
1762 (license license:gpl2)))
1763
1764 (define-public screen-message
1765 (package
1766 (name "screen-message")
1767 (version "0.25")
1768 (source (origin
1769 (method url-fetch)
1770 (uri (string-append
1771 "https://www.joachim-breitner.de/archive/screen-message"
1772 "/screen-message-" version ".tar.gz"))
1773 (sha256
1774 (base32
1775 "1lw955qq5pq010lzmaf32ylj2iprgsri9ih4hx672c3f794ilab0"))))
1776 (build-system gnu-build-system)
1777 (inputs `(("gtk3" ,gtk+)
1778 ("gdk" ,gdk-pixbuf)
1779 ("pango" ,pango)))
1780 (native-inputs `(("pkg-config" ,pkg-config)))
1781 (arguments
1782 ;; The default configure puts the 'sm' binary in games/ instead of bin/ -
1783 ;; this fixes it:
1784 `(#:make-flags (list (string-append "execgamesdir=" %output "/bin"))))
1785 (synopsis "Print messages on your screen")
1786 (description "@code{screen-message} is a tool for displaying text on
1787 your screen. It will make the text as large as possible and display it
1788 with black color on a white background (colors are configurable on the
1789 commandline).")
1790 (home-page "https://www.joachim-breitner.de/projects#screen-message")
1791 (license license:gpl2+)))
1792
1793 (define-public xss-lock
1794 ;; xss-lock does not seem to be maintained any longer, but the last commits
1795 ;; fix important issues so we package them.
1796 (let ((version "0.3.0")
1797 (revision "1")
1798 (commit "1e158fb20108058dbd62bd51d8e8c003c0a48717"))
1799 (package
1800 (name "xss-lock")
1801 (version (git-version version revision commit))
1802 (source (origin
1803 (method git-fetch)
1804 (uri (git-reference
1805 (url "https://bitbucket.org/raymonad/xss-lock.git")
1806 (commit commit)))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32
1810 "10hx7k7ga8g08akwz8qrsvj8iqr5nd4siiva6sjx789jvf0sak7r"))))
1811 (build-system cmake-build-system)
1812 (inputs `(("glib" ,glib)
1813 ("xcb-util" ,xcb-util)))
1814 (native-inputs
1815 `(("python-docutils" ,python-docutils)
1816 ("pkg-config" ,pkg-config)))
1817 (arguments
1818 `(#:tests? #f))
1819 (synopsis "Use external screen locker on events")
1820 (description "@code{xss-lock} listens to X signals to fire up a
1821 user-defined screensaver. In effect this automatically locks the
1822 screen when closing a laptop lid or after a period of user inactivity (as set
1823 with @code{xset s TIMEOUT}). The notifier command, if specified, is executed
1824 first. Additionally, xss-lock uses the inhibition logic to lock the screen
1825 before the system goes to sleep.")
1826 (home-page "https://bitbucket.org/raymonad/xss-lock")
1827 (license license:expat))))
1828
1829 (define-public python-pyperclip
1830 (package
1831 (name "python-pyperclip")
1832 (version "1.6.4")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "pyperclip" version))
1837 (sha256
1838 (base32
1839 "1p505c23ji06r28k1y67siihsbdzdf1brhlqpyv9ams4gk9863pp"))))
1840 (build-system python-build-system)
1841 (arguments
1842 '(#:tests? #f)) ; Not clear how to make tests pass.
1843 (inputs
1844 `(("xclip" ,xclip)
1845 ("xsel" ,xsel)))
1846 (home-page "https://github.com/asweigart/pyperclip")
1847 (synopsis "Python clipboard module")
1848 (description
1849 "Pyperclip is a clipboard module for Python, handling copy/pasting from
1850 the X11 clipboard")
1851 (license license:bsd-3)))
1852
1853 (define-public numlockx
1854 (package
1855 (name "numlockx")
1856 (version "1.2")
1857 (source (origin
1858 (method git-fetch)
1859 (uri (git-reference
1860 ;; It seems that upstream is gone.
1861 (url "https://github.com/rg3/numlockx")
1862 (commit version)))
1863 (file-name (git-file-name name version))
1864 (sha256
1865 (base32
1866 "1w49fayhwzn5rx0z1q2lrvm7z8jrd34lgb89p853a024bixc3cf2"))))
1867 (build-system gnu-build-system)
1868 (inputs
1869 `(("xorg-server" ,xorg-server)))
1870 (home-page "https://github.com/rg3/numlockx")
1871 (synopsis "Turns on the numlock key in X11")
1872 (description "@command{numlockx} is a tiny program that lets you turn on
1873 the numlock key in X11. It can be called from the user's initialization files
1874 to automatically turn it on on login.")
1875 (license license:expat)))
1876
1877 (define-public xrandr-invert-colors
1878 (package
1879 (name "xrandr-invert-colors")
1880 (version "0.01")
1881 (source (origin
1882 (method git-fetch)
1883 (uri (git-reference
1884 (url "https://github.com/zoltanp/xrandr-invert-colors.git")
1885 (commit (string-append "v" version))))
1886 (file-name (git-file-name name version))
1887 (sha256
1888 (base32
1889 "1br3x9vr6xm4ika06n8cfxx1b3wdchdqvyzjl4y1chmivrml8x9h"))))
1890 (build-system gnu-build-system)
1891 (arguments
1892 `(#:make-flags (list "CC=gcc")
1893 #:tests? #f ; there are none
1894 #:phases
1895 (modify-phases %standard-phases
1896 (delete 'configure)
1897 (replace 'install
1898 (lambda* (#:key outputs #:allow-other-keys)
1899 (let* ((out (assoc-ref outputs "out"))
1900 (bin (string-append out "/bin")))
1901 (install-file "xrandr-invert-colors.bin" bin)
1902 #t))))))
1903 (inputs
1904 `(("libxrandr" ,libxrandr)))
1905 (home-page "https://github.com/zoltanp/xrandr-invert-colors")
1906 (synopsis "Invert display colors")
1907 (description "This package provides a small utility for inverting the
1908 colors on all monitors attached to an XRandR-capable X11 display server.")
1909 (license license:gpl3+)))
1910
1911 (define-public sct
1912 (package
1913 (name "sct")
1914 (version "0.5")
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri
1919 (string-append "https://www.umaxx.net/dl/sct-"
1920 version ".tar.gz"))
1921 (sha256
1922 (base32 "0lrhx771iccbw04wrhj0ygids1pzmjfc4hvklm30m3p3flvhqf0m"))))
1923 (build-system gnu-build-system)
1924 (arguments
1925 `(#:make-flags
1926 (list ,(string-append "CC=" (cc-for-target)))
1927 #:tests? #f ; no test suite
1928 #:phases
1929 (modify-phases %standard-phases
1930 (delete 'configure)
1931 (add-after 'unpack 'fix-sctd-paths
1932 (lambda* (#:key outputs inputs #:allow-other-keys)
1933 (let ((out (assoc-ref outputs "out"))
1934 (coreutils (assoc-ref inputs "coreutils"))
1935 (inetutils (assoc-ref inputs "inetutils"))
1936 (sed (assoc-ref inputs "sed")))
1937 (substitute* "sctd.sh"
1938 (("\\$\\(which sct\\)") (string-append out "/bin/sct"))
1939 (("date") (string-append coreutils "/bin/date"))
1940 (("printf") (string-append coreutils "/bin/printf"))
1941 (("sleep") (string-append coreutils "/bin/sleep"))
1942 (("logger") (string-append inetutils "/bin/logger"))
1943 (("sed") (string-append sed "/bin/sed"))))))
1944 (replace 'install
1945 (lambda* (#:key outputs #:allow-other-keys)
1946 (let ((out (assoc-ref outputs "out")))
1947 (install-file "sct" (string-append out "/bin"))
1948 (install-file "sctd.sh" (string-append out "/bin"))
1949 (install-file "sct.1" (string-append out "/man/man1"))
1950 (install-file "sctd.1" (string-append out "/man/man1"))
1951 (rename-file (string-append out "/bin/sctd.sh")
1952 (string-append out "/bin/sctd"))
1953 #t))))))
1954 (inputs
1955 `(("coreutils" ,coreutils) ; sctd uses "date", "printf" and "sleep"
1956 ("inetutils" ,inetutils) ; sctd uses "logger"
1957 ("libxrandr" ,libxrandr)
1958 ("sed" ,sed))) ; sctd uses "sed"
1959 (home-page "https://www.umaxx.net")
1960 (synopsis "Set the color temperature of the screen")
1961 (description "@code{sct} is a lightweight utility to set the color
1962 temperature of the screen.")
1963 (license (license:non-copyleft "file://sct.c")))) ; "OpenBSD" license
1964
1965 (define-public xsecurelock
1966 (package
1967 (name "xsecurelock")
1968 (version "1.6.0")
1969 (source (origin
1970 (method url-fetch)
1971 (uri (string-append
1972 "https://github.com/google/xsecurelock/releases"
1973 "/download/v" version "/xsecurelock-" version ".tar.gz"))
1974 (sha256
1975 (base32 "070gknyv0s5hz9hkc6v73m2v7ssyjwgl93b5hd4glayfqxqjbmdp"))))
1976 (build-system gnu-build-system)
1977 (arguments
1978 '(#:configure-flags
1979 '("--with-pam-service-name=login"
1980 "--with-xkb"
1981 "--with-default-authproto-module=/run/setuid-programs/authproto_pam")))
1982 (native-inputs
1983 `(("pandoc" ,ghc-pandoc)
1984 ("pkg-config" ,pkg-config)))
1985 (inputs
1986 `(("fontconfig" ,fontconfig)
1987 ("libX11" ,libx11)
1988 ("libxcomposite" ,libxcomposite)
1989 ("libxext" ,libxext)
1990 ("libxfixes" ,libxfixes)
1991 ("libxft" ,libxft)
1992 ("libxmu" ,libxmu)
1993 ("libxrandr" ,libxrandr)
1994 ("libxscrnsaver" ,libxscrnsaver)
1995 ("linux-pam" ,linux-pam)))
1996 (home-page "https://github.com/google/xsecurelock")
1997 (synopsis "X11 screen lock utility with the primary goal of security")
1998 (description "@code{xsecurelock} is an X11 screen locker which uses
1999 a modular design to avoid the usual pitfalls of screen locking utility design.
2000
2001 As a consequence of the modular design, the usual screen locker service
2002 shouldn't be used with @code{xsecurelock}. Instead, you need to add a helper
2003 binary to setuid-binaries:
2004 @example
2005 (setuid-programs (cons*
2006 (file-append xsecurelock \"/libexec/xsecurelock/authproto_pam\")
2007 %setuid-programs))
2008 @end example")
2009 (license license:asl2.0)))
2010
2011 (define-public wl-clipboard
2012 (package
2013 (name "wl-clipboard")
2014 (version "2.0.0")
2015 (source
2016 (origin
2017 (method git-fetch)
2018 (uri (git-reference
2019 (url "https://github.com/bugaevc/wl-clipboard.git")
2020 (commit (string-append "v" version))))
2021 (file-name (git-file-name name version))
2022 (sha256
2023 (base32 "0c4w87ipsw09aii34szj9p0xfy0m00wyjpll0gb0aqmwa60p0c5d"))))
2024 (build-system meson-build-system)
2025 (native-inputs
2026 `(("pkg-config" ,pkg-config)))
2027 (inputs
2028 `(("wayland" ,wayland)
2029 ("wayland-protocols" ,wayland-protocols)))
2030 (home-page "https://github.com/bugaevc/wl-clipboard")
2031 (synopsis "Command-line copy/paste utilities for Wayland")
2032 (description "Wl-clipboard is a set of command-line copy/paste utilities for
2033 Wayland.")
2034 (license license:gpl3+)))
2035
2036 (define-public autocutsel
2037 (package
2038 (name "autocutsel")
2039 (version "0.10.0")
2040 (source (origin
2041 (method url-fetch)
2042 (uri (string-append "https://github.com/sigmike/autocutsel"
2043 "/releases/download/" version "/"
2044 "autocutsel-" version ".tar.gz"))
2045 (sha256
2046 (base32
2047 "0gsys2dzh4az51ndcsabhlbbrjn2nm75lnjr45kg6r8sm8q66dx2"))))
2048 (build-system gnu-build-system)
2049 (arguments
2050 '(#:tests? #f)) ; no "check" target
2051 (native-inputs `(("libx11" ,libx11)
2052 ("libxaw" ,libxaw)))
2053 (home-page "https://www.nongnu.org/autocutsel/")
2054 (synopsis "Automated X11 clipboard and cutbuffer synchronization")
2055 (description "@code{autocutsel} tracks changes in the server's cutbuffer
2056 and clipboard selection. When the clipboard is changed, it updates the
2057 cutbuffer. When the cutbuffer is changed, it owns the clipboard selection.
2058 The cutbuffer and clipboard selection are always synchronized.")
2059 (license license:gpl2+)))
2060
2061 (define-public jgmenu
2062 (package
2063 (name "jgmenu")
2064 (version "4.1.0")
2065 (source
2066 (origin
2067 (method git-fetch)
2068 (uri (git-reference
2069 (url "https://github.com/johanmalm/jgmenu.git")
2070 (commit (string-append "v" version))))
2071 (file-name (git-file-name name version))
2072 (sha256
2073 (base32
2074 "1wsh37rapb1bszlq36hvwxqvfds39hbvbl152m8as4zlh93wfvvk"))))
2075 (build-system gnu-build-system)
2076 (native-inputs
2077 `(("cppcheck" ,cppcheck)
2078 ("perl" ,perl)
2079 ("pkg-config" ,pkg-config)))
2080 (inputs
2081 `(("cairo" ,cairo)
2082 ("glib" ,glib)
2083 ("librsvg" ,librsvg)
2084 ("libx11" ,libx11)
2085 ("libxml2" ,libxml2)
2086 ("libxrandr" ,libxrandr)
2087 ("pango" ,pango)))
2088 (arguments
2089 `(#:phases
2090 (modify-phases %standard-phases
2091 (add-after 'unpack 'fix-tests
2092 (lambda _
2093 (substitute* "scripts/cppcheck-wrapper.sh"
2094 (("--library=/usr/share/cppcheck/cfg/gnu\\.cfg")
2095 ""))
2096 #t))
2097 (replace 'configure
2098 (lambda* (#:key outputs #:allow-other-keys)
2099 (setenv "CC" "gcc")
2100 (invoke "./configure"
2101 (string-append "--prefix=" (assoc-ref outputs "out")))
2102 #t)))))
2103 (synopsis "Simple X11 menu")
2104 (description
2105 "This is a simple menu for X11 designed for scripting and tweaking. It
2106 can optionally use some appearance settings from XSettings, tint2 and GTK.")
2107 (home-page "https://jgmenu.github.io/")
2108 (license license:gpl2)))
2109
2110 (define-public xwallpaper
2111 (package
2112 (name "xwallpaper")
2113 (version "0.6.4")
2114 (source
2115 (origin
2116 (method git-fetch)
2117 (uri (git-reference
2118 (url "https://github.com/stoeckmann/xwallpaper")
2119 (commit (string-append "v" version))))
2120 (file-name (git-file-name name version))
2121 (sha256
2122 (base32
2123 "175fzifvia58vah2x7509drvfn3xfv5d9szgh9x1w1a1w8rcs2hx"))))
2124 (build-system gnu-build-system)
2125 (native-inputs
2126 `(("autoconf" ,autoconf)
2127 ("automake" ,automake)
2128 ("pkg-config" ,pkg-config)))
2129 (inputs
2130 `(("libjpeg-turbo" ,libjpeg-turbo)
2131 ("libpng" ,libpng)
2132 ("libxpm" ,libxpm)
2133 ("pixman" ,pixman)
2134 ("xcb-util" ,xcb-util)
2135 ("xcb-util-image" ,xcb-util-image)))
2136 (home-page "https://github.com/stoeckmann/xwallpaper")
2137 (synopsis "Wallpaper setting utility for X")
2138 (description
2139 "The xwallpaper utility allows you to set image files as your X
2140 wallpaper. JPEG, PNG, and XPM file formats are supported.
2141
2142 The wallpaper is also advertised to programs which support semi-transparent
2143 backgrounds.")
2144 (license license:isc)))
2145
2146 (define-public xwrits
2147 (package
2148 (name "xwrits")
2149 (version "2.26")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (string-append "https://www.lcdf.org/~eddietwo/xwrits/"
2154 "xwrits-" version ".tar.gz"))
2155 (sha256
2156 (base32 "1n7y0fqpcvmzznvbsn14hzy5ddaa3lilm8aw6ckscqndnh4lijma"))))
2157 (build-system gnu-build-system)
2158 (arguments
2159 `(#:phases
2160 (modify-phases %standard-phases
2161 (add-after 'install 'install-docs
2162 (lambda* (#:key outputs #:allow-other-keys)
2163 (let* ((out (assoc-ref outputs "out"))
2164 (doc (string-append out "/share/doc/xwrits")))
2165 (install-file "GESTURES" doc)
2166 (install-file "README" doc)
2167 #t))))))
2168 (inputs
2169 `(("libx11" ,libx11)
2170 ("libxinerama" ,libxinerama)))
2171 (home-page "https://www.lcdf.org/~eddietwo/xwrits/")
2172 (synopsis "Reminds you to take wrist breaks")
2173 (description "Xwrits reminds you to take wrist breaks for prevention or
2174 management of repetitive stress injuries. When you should take a break, it
2175 pops up an X window, the warning window. You click on the warning window,
2176 then take a break. The window changes appearance while you take the break.
2177 It changes again when your break is over. Then you just resume typing.
2178 Xwrits hides itself until you should take another break.")
2179 (license license:gpl2)))
2180
2181 (define-public xsettingsd
2182 (package
2183 (name "xsettingsd")
2184 (version "1.0.0")
2185 (source
2186 (origin
2187 (method git-fetch)
2188 (uri (git-reference
2189 (url "https://github.com/derat/xsettingsd.git")
2190 (commit (string-append "v" version))))
2191 (file-name (git-file-name name version))
2192 (sha256
2193 (base32
2194 "05m4jlw0mgwp24cvyklncpziq1prr2lg0cq9c055sh4n9d93d07v"))))
2195 (build-system scons-build-system)
2196 (inputs
2197 `(("libx11" ,libx11)))
2198 (native-inputs
2199 `(("pkg-config" ,pkg-config)
2200 ("googletest" ,googletest)
2201 ("googletest-source" ,(package-source googletest))))
2202 (arguments
2203 `(#:scons ,scons-python2
2204 #:scons-flags
2205 (list "CC=gcc")
2206 #:phases
2207 (modify-phases %standard-phases
2208 (add-before 'build 'patch-sconstruct
2209 (lambda* (#:key inputs #:allow-other-keys)
2210 (substitute* "SConstruct"
2211 ;; scons doesn't pick up environment variables automatically
2212 ;; so it needs help to find path variables
2213 (("env = Environment\\(")
2214 "env = Environment(
2215 ENV = {
2216 'PATH': os.environ['PATH'],
2217 'CPATH': os.environ['C_INCLUDE_PATH'],
2218 'LIBRARY_PATH': os.environ['LIBRARY_PATH'],
2219 'PKG_CONFIG_PATH': os.environ['PKG_CONFIG_PATH']
2220 },")
2221 ;; Update path to gtest source files used in tests
2222 (("/usr/src/gtest") (string-append
2223 (assoc-ref inputs "googletest-source")
2224 "/googletest"))
2225 ;; Exclude one warning that causes a build error
2226 (("-Werror") "-Werror -Wno-error=sign-compare"))
2227 #t))
2228 ;; The SConstruct script doesn't configure installation so
2229 ;; binaries must be copied to the output path directly
2230 (replace 'install
2231 (lambda* (#:key outputs #:allow-other-keys)
2232 (let* ((out (assoc-ref outputs "out"))
2233 (bin (string-append out "/bin")))
2234 (mkdir-p bin)
2235 (install-file "xsettingsd" bin)
2236 (install-file "dump_xsettings" bin)
2237 #t))))))
2238 (home-page "https://github.com/derat/xsettingsd")
2239 (synopsis "Xorg settings daemon")
2240 (description "@command{xsettingsd} is a lightweight daemon that provides settings to
2241 Xorg applications via the XSETTINGS specification. It is used for defining
2242 font and theme settings when a complete desktop environment (GNOME, KDE) is
2243 not running. With a simple @file{.xsettingsd} configuration file one can avoid
2244 configuring visual settings in different UI toolkits separately.")
2245 (license license:bsd-3)))
2246
2247 (define-public clipnotify
2248 (package
2249 (name "clipnotify")
2250 (version "1.0.2")
2251 (source
2252 (origin
2253 (method git-fetch)
2254 (uri (git-reference
2255 (url "https://github.com/cdown/clipnotify.git")
2256 (commit version)))
2257 (file-name (git-file-name name version))
2258 (sha256
2259 (base32
2260 "1v3ydm5ljy8z1savmdxrjyx7a5bm5013rzw80frp3qbbjaci0wbg"))))
2261 (build-system gnu-build-system)
2262 (arguments
2263 `(#:phases
2264 (modify-phases %standard-phases
2265 (delete 'configure)
2266 (replace 'install
2267 (lambda* (#:key inputs outputs #:allow-other-keys)
2268 (let* ((out (assoc-ref outputs "out"))
2269 (bin (string-append out "/bin"))
2270 (doc (string-append %output "/share/doc/" ,name "-" ,version)))
2271 (install-file "clipnotify" bin)
2272 (install-file "README.md" doc)
2273 #t))))
2274 #:make-flags
2275 (list ,(string-append "CC=" (cc-for-target)))
2276 #:tests? #f)) ; no test suite
2277 (inputs
2278 `(("libx11" ,libx11)
2279 ("libXfixes" ,libxfixes)))
2280 (home-page "https://github.com/cdown/clipnotify")
2281 (synopsis "Notify on new X clipboard events")
2282 (description "@command{clipnotify} is a simple program that, using the
2283 XFIXES extension to X11, waits until a new selection is available and then
2284 exits.
2285
2286 It was primarily designed for clipmenu, to avoid polling for new selections.
2287
2288 @command{clipnotify} doesn't try to print anything about the contents of the
2289 selection, it just exits when it changes. This is intentional -- X11's
2290 selection API is verging on the insane, and there are plenty of others who
2291 have already lost their sanity to bring us xclip/xsel/etc. Use one of those
2292 tools to complement clipnotify.")
2293 (license license:public-domain)))
2294
2295 (define-public clipmenu
2296 (let ((commit "bcbe7b144598db4a103f14e8408c4b7327d6d5e1")
2297 (revision "1"))
2298 (package
2299 (name "clipmenu")
2300 (version (string-append "6.0.1-"
2301 revision "." (string-take commit 7)))
2302 (source
2303 (origin
2304 (method git-fetch)
2305 (uri (git-reference
2306 (url "https://github.com/cdown/clipmenu.git")
2307 (commit commit)))
2308 (file-name (git-file-name name version))
2309 (sha256
2310 (base32
2311 "0053j4i14lz5m2bzc5sch5id5ilr1bl196mp8fp0q8x74w3vavs9"))))
2312 (build-system gnu-build-system)
2313 (arguments
2314 `(#:phases
2315 (modify-phases %standard-phases
2316 (delete 'configure)
2317 (delete 'build)
2318 (replace 'install
2319 (lambda* (#:key inputs outputs #:allow-other-keys)
2320 (let* ((out (assoc-ref outputs "out"))
2321 (bin (string-append out "/bin"))
2322 (doc (string-append %output "/share/doc/"
2323 ,name "-" ,version)))
2324 (install-file "clipdel" bin)
2325 (install-file "clipmenu" bin)
2326 (install-file "clipmenud" bin)
2327 (install-file "README.md" doc)
2328 #t)))
2329 (add-after 'install 'wrap-script
2330 (lambda* (#:key inputs outputs #:allow-other-keys)
2331 (let* ((out (assoc-ref outputs "out"))
2332 (clipnotify (assoc-ref inputs "clipnotify"))
2333 (coreutils-minimal (assoc-ref inputs "coreutils-minimal"))
2334 (gawk (assoc-ref inputs "gawk"))
2335 (util-linux (assoc-ref inputs "util-linux"))
2336 (xdotool (assoc-ref inputs "xdotool"))
2337 (xsel (assoc-ref inputs "xsel")))
2338 (for-each
2339 (lambda (prog)
2340 (wrap-script (string-append out "/bin/" prog)
2341 `("PATH" ":" prefix
2342 ,(map (lambda (dir)
2343 (string-append dir "/bin"))
2344 (list clipnotify coreutils-minimal
2345 gawk util-linux xdotool xsel)))))
2346 '("clipmenu" "clipmenud" "clipdel")))
2347 #t))
2348 (replace 'check
2349 (lambda* (#:key inputs outputs #:allow-other-keys)
2350 ;; substitute a shebang appearing inside a string (the test
2351 ;; file writes this string to a temporary file):
2352 (substitute* "tests/test-clipmenu"
2353 (("#!/usr/bin/env bash")
2354 (string-append "#!" (which "bash"))))
2355 (invoke "tests/test-clipmenu")
2356 #t)))))
2357 (inputs
2358 `(("clipnotify" ,clipnotify)
2359 ("coreutils-minimal" ,coreutils-minimal)
2360 ("gawk" ,gawk)
2361 ("guile" ,guile-3.0) ; for wrap-script
2362 ("util-linux" ,util-linux)
2363 ("xdotool" ,xdotool)
2364 ("xsel" ,xsel)))
2365 (home-page "https://github.com/cdown/clipmenu")
2366 (synopsis "Simple clipboard manager using dmenu or rofi and xsel")
2367 (description "Start @command{clipmenud}, then run @command{clipmenu} to
2368 select something to put on the clipboard.
2369
2370 When @command{clipmenud} detects changes to the clipboard contents, it writes
2371 them out to the cache directory. @command{clipmenu} reads the cache directory
2372 to find all available clips and launches @command{dmenu} (or @command{rofi},
2373 depending on the value of @code{CM_LAUNCHER}) to let the user select a clip.
2374 After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.")
2375 (license license:public-domain))))
2376
2377 (define-public kbdd
2378 (package
2379 (name "kbdd")
2380 (version "0.7.1")
2381 (source
2382 (origin
2383 (method git-fetch)
2384 (uri (git-reference
2385 (url "https://github.com/qnikst/kbdd.git")
2386 (commit (string-append "v" version))))
2387 (file-name (git-file-name name version))
2388 (sha256
2389 (base32
2390 "0qkq75grbd4wkx4nlvswgavpijk9ad0pzqyj89a0ayjsbsn36pqy"))))
2391 (build-system gnu-build-system)
2392 (native-inputs
2393 `(("autoconf" ,autoconf)
2394 ("automake" ,automake)
2395 ("glib" ,glib "bin")
2396 ("pkg-config" ,pkg-config)))
2397 (inputs
2398 `(("dbus-glib", dbus-glib)
2399 ("glib" ,glib)
2400 ("libx11" ,libx11)))
2401 (home-page "https://github.com/qnikst/kbdd")
2402 (synopsis "Per-window keyboard layout switching daemon for X")
2403 (description "@command{kbdd} is a simple keyboard layout switching
2404 program, which is designed to run in an X11 session and remember
2405 keyboard layouts on a per-window basis. That can be very handy for a
2406 user of a non-US keyboard who does not want to jump through layouts back
2407 and forth while typing in terminals (mostly in a latin alphabet) and
2408 some kind of chat (in native language).
2409
2410 @command{kbdd} also supports D-Bus signals, which makes it possible to
2411 create layout indicator widgets.")
2412 (license license:bsd-2)))
2413
2414 (define-public j4-dmenu-desktop
2415 (package
2416 (name "j4-dmenu-desktop")
2417 (version "2.17")
2418 (source (origin
2419 (method git-fetch)
2420 (uri (git-reference
2421 (url "https://github.com/enkore/j4-dmenu-desktop.git")
2422 (commit (string-append "r" version))))
2423 (file-name (git-file-name name version))
2424 (sha256
2425 (base32
2426 "0v23fimkn83dcm5p53y2ymhklff3kwppxhf75sm8xmswrzkixpgc"))))
2427 (build-system cmake-build-system)
2428 (native-inputs
2429 `(("catch2" ,catch-framework2)))
2430 (arguments
2431 `(#:configure-flags '("-DWITH_GIT_CATCH=off")
2432 #:phases
2433 (modify-phases %standard-phases
2434 (replace 'check
2435 (lambda _
2436 (invoke "./j4-dmenu-tests" "exclude:SearchPath/XDG_DATA_HOME"))))))
2437 (synopsis "Fast desktop menu")
2438 (description
2439 "j4-dmenu-desktop is a replacement for i3-dmenu-desktop. Its purpose
2440 is to find @file{.desktop} files and offer you a menu to start an application
2441 using @command{dmenu}.")
2442 (home-page "https://github.com/enkore/j4-dmenu-desktop")
2443 (license license:gpl3+)))
2444
2445 (define-public wofi
2446 (package
2447 (name "wofi")
2448 (version "1.1.2")
2449 (source (origin
2450 (method hg-fetch)
2451 (uri (hg-reference
2452 (url "https://hg.sr.ht/~scoopta/wofi")
2453 (changeset (string-append "v" version))))
2454 (file-name (git-file-name name version))
2455 (sha256
2456 (base32
2457 "086j5wshawjbwdmmmldivfagc2rr7g5a2gk11l0snqqslm294xsn"))))
2458 (build-system meson-build-system)
2459 (arguments
2460 `(#:glib-or-gtk? #t))
2461 (native-inputs
2462 `(("pkg-config" ,pkg-config)))
2463 (inputs
2464 `(("gtk3" ,gtk+)
2465 ("wayland" ,wayland)))
2466 (synopsis "Launcher/menu program for wayland")
2467 (description
2468 "Wofi is a launcher/menu program for wlroots based wayland compositors
2469 such as sway, similar to @command{rofi}.")
2470 (home-page "https://hg.sr.ht/~scoopta/wofi")
2471 (license license:gpl3+)))