blob: be14e6e1f0aee7cf93707a738e4f224a04bce83e (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/env -S guile --no-auto-compile
!#
(use-modules (ice-9 format)
(ice-9 match))
(match (command-line)
((_ "quit")
(exit 0))
((_ "Reload i3 configuration")
(system* "i3-msg" "reload"))
((_ "Log out")
(system* "i3-msg" "exit"))
((_ "Shutdown")
(system* "sudo" "-n" "/run/current-system/profile/sbin/shutdown"))
((_ "Reboot")
(system* "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"))))
|