gnu: swayhide: Install shell completions.

* gnu/packages/rust-apps.scm (swayhide)[arguments]: Add a phase to
install the shell completions.

Change-Id: I143667394a9c4b8a6c0f5ed275f8c80a5508c305
This commit is contained in:
Efraim Flashner 2024-09-22 13:05:41 +03:00
parent 233d6732e4
commit 41e408eb1f
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -3025,7 +3025,22 @@ (define-public swayhide
`(#:install-source? #f
#:cargo-inputs
(("rust-exitcode" ,rust-exitcode-1)
("rust-swayipc" ,rust-swayipc-2))))
("rust-swayipc" ,rust-swayipc-2))
#:phases
(modify-phases %standard-phases
(add-after 'install 'install-completions
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bash (string-append out "/etc/bash_completion.d/"))
(fish (string-append out "/share/fish/vendor_completions.d/"))
(zsh (string-append out "/share/zsh/site-functions/")))
(mkdir-p bash)
(mkdir-p zsh)
(copy-file "completions/swayhide.bash"
(string-append bash "swayhide"))
(copy-file "completions/swayhide.zsh"
(string-append zsh "_swayhide"))
(install-file "completions/swayhide.fish" fish)))))))
(home-page "https://github.com/NomisIV/swayhide/")
(synopsis "Swallow windows on swaywm")
(description "swayhide hides the currently active terminal (by moving it