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