From e421dc63ae7147bd8eef2147b0fbca593a25e1f0 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 13 Oct 2022 20:45:32 -0700 Subject: [PATCH] Add shutdown-rofi script --- oni/home/config/common.scm | 3 ++- oni/home/config/data.scm | 6 +++-- oni/home/config/rincewind.scm | 4 +++- oni/packages/count-emails.scm | 4 ++-- oni/packages/shutdown-rofi.scm | 40 ++++++++++++++++++++++++++++++++++ 5 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 oni/packages/shutdown-rofi.scm diff --git a/oni/home/config/common.scm b/oni/home/config/common.scm index d1c946e..ddb6d86 100644 --- a/oni/home/config/common.scm +++ b/oni/home/config/common.scm @@ -30,7 +30,8 @@ (service home-xbindkeys-service-type (home-xbindkeys-configuration (keybindings - '(((mod4 k) . "hersbtclient close") + '(((mod4 q) . "shutdown-rofi") + ((mod4 k) . "hersbtclient close") ((mod4 mod1 k) . "herbstclient remove") ((mod4 Return) . "herbstclient spawn kitty") ((mod4 t) . "herbstclient spawn hlwm-run-or-raise \"\\(URxct\\|Hyper\\|kitty\\)\" kitty") diff --git a/oni/home/config/data.scm b/oni/home/config/data.scm index 18d5108..97d5e4f 100644 --- a/oni/home/config/data.scm +++ b/oni/home/config/data.scm @@ -23,14 +23,16 @@ #:use-module (oni home services environment) #:use-module (oni packages hlwm-run-or-raise) #:use-module (oni packages pick-random-wallpaper) - #:use-module (oni home config common)) + #:use-module (oni home config common) + #:use-module (oni packages shutdown-rofi)) (home-environment (packages (list (specification->package+output "glibc-locales") (specification->package+output "font-fantasque-sans") (specification->package+output "font-comic-neue") hlwm-run-or-raise - pick-random-wallpaper)) + pick-random-wallpaper + shutdown-rofi)) (services (list diff --git a/oni/home/config/rincewind.scm b/oni/home/config/rincewind.scm index be107da..c093f66 100644 --- a/oni/home/config/rincewind.scm +++ b/oni/home/config/rincewind.scm @@ -31,7 +31,8 @@ #:use-module (oni packages inbox-size) #:use-module (oni packages notmuch-collect-tasks) #:use-module (oni packages notmuch-tag-mailinglists) - #:use-module (oni packages pick-random-wallpaper)) + #:use-module (oni packages pick-random-wallpaper) + #:use-module (oni packages shutdown-rofi)) (define (with-master-branch package) "Apply a transformation to PACKAGE so that it uses the master branch." @@ -50,6 +51,7 @@ notmuch-tag-mailinglists (inbox-size emacs-next) count-emails + shutdown-rofi emacs-org-roam emacs-vterm fakeroot ; Needed for build arch packages diff --git a/oni/packages/count-emails.scm b/oni/packages/count-emails.scm index e3991d2..e6b70f2 100644 --- a/oni/packages/count-emails.scm +++ b/oni/packages/count-emails.scm @@ -9,7 +9,7 @@ #:use-module (gnu packages mail)) (define-public count-emails - (let ((commit "de8d1094fca307b44020ae85ef0acf0d467cd8c4") + (let ((commit "66165bdecea54888967fcc6a8c29a3df09a18256") (revision "0")) (package (name "count-emails") @@ -21,7 +21,7 @@ (commit commit))) (method git-fetch) (sha256 - (base32 "1wkppgkwp6rd7bx9zbyyljq4px47jb2flfgiflvjh1qxwdz9m25a")) + (base32 "0pv4wbxbg0szs2jiskmxvivrq44ha5ljdn18j3j2pi8q1dp9rmb3")) (file-name (git-file-name name version)))) (propagated-inputs (list bash scsh notmuch)) diff --git a/oni/packages/shutdown-rofi.scm b/oni/packages/shutdown-rofi.scm new file mode 100644 index 0000000..d8d970c --- /dev/null +++ b/oni/packages/shutdown-rofi.scm @@ -0,0 +1,40 @@ +(define-module (oni packages shutdown-rofi) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages wm) + #:use-module (gnu packages xdisorg) + #:use-module (guix build-system gnu) + #:use-module (guix git-download) + #:use-module (guix packages)) + +(define-public shutdown-rofi + (let ((commit "79cc1bdbabe5d4a1521723de1a5b9c32a1df1c7c") + (revision "0")) + (package + (name "shutdown-rofi") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (uri (git-reference + (url "git://ryuslash.org/util/tom/shutdown-rofi") + (commit commit))) + (method git-fetch) + (sha256 + (base32 "17c5hr3yrafmmgcxi6m0njhp113yfcylv7ifpgds06sxxn8wdzv0")) + (file-name (git-file-name name version)))) + (propagated-inputs + (list herbstluftwm rofi)) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (install-file "shutdown-rofi" bin))))))) + (home-page "https://ryuslash.org/") + (synopsis "A simple script that shows a shutdown menu using rofi.") + (description "Uses rofi to show a simple shutdown menu.") + (license license:gpl3+))))