diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2024-09-22 13:05:41 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2024-09-23 07:04:55 +0300 |
commit | 41e408eb1f93d96b549d345e2de74143220b7b76 (patch) | |
tree | 30588c2ee3076539aae0c85ada72d322c21ac3df | |
parent | 233d6732e4b8b44ddd0ea778fdc85cdb0ba337f5 (diff) | |
download | guix-41e408eb1f93d96b549d345e2de74143220b7b76.tar.gz guix-41e408eb1f93d96b549d345e2de74143220b7b76.zip |
gnu: swayhide: Install shell completions.
* gnu/packages/rust-apps.scm (swayhide)[arguments]: Add a phase to
install the shell completions.
Change-Id: I143667394a9c4b8a6c0f5ed275f8c80a5508c305
-rw-r--r-- | gnu/packages/rust-apps.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index ad9afb1923..e6cce4d372 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -3025,7 +3025,22 @@ files.") `(#: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 |