diff options
author | Timo Wilken | 2022-12-30 10:54:17 +0100 |
---|---|---|
committer | Timo Wilken | 2022-12-30 10:54:17 +0100 |
commit | 0f308b1c90444f5f0293bf40aa1ef177bc51036c (patch) | |
tree | b052860a66b8bf3b094fa16e4538887003c37ada /sessionmenu | |
parent | da1ff8a0816e430d2c035217d80db3be5cc919ab (diff) |
Reorganise Guix home declaration into module tree
Diffstat (limited to 'sessionmenu')
-rwxr-xr-x | sessionmenu | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/sessionmenu b/sessionmenu deleted file mode 100755 index 552c2b3c..00000000 --- a/sessionmenu +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env -S guile --no-auto-compile -!# -(use-modules (ice-9 format) - (ice-9 match) - (ice-9 ports)) - -(define (call-command/stderr . command) - "Call COMMAND using `system*', but redirect all output to stderr." - (with-output-to-port (current-error-port) - (lambda () (apply system* command)))) - -(match (command-line) - ((_ "quit") - (exit 0)) - ((_ "Reload i3 configuration") - (call-command/stderr "i3-msg" "reload")) - ((_ "Log out") - (call-command/stderr "i3-msg" "exit")) - ((_ "Shutdown") - (call-command/stderr "sudo" "-n" "/run/current-system/profile/sbin/shutdown")) - ((_ "Reboot") - (call-command/stderr "sudo" "-n" "/run/current-system/profile/sbin/reboot")) - (_ - (format #t "\0~a\x1f~a~%~{~a\0icon\x1f~a~%~}" - "prompt" "Session" - '("Reload i3 configuration" "reload" - "Log out" "system-log-out" - "Shutdown" "system-shutdown" - "Reboot" "system-reboot")))) |