From a37c079ecc9afe896d00e461ab46eacb7a52009a Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 8 Mar 2020 10:47:38 -0400 Subject: [PATCH] Don't use sudo for shutdown command, add prompt --- stumpwm/.stumpwm.d/init.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stumpwm/.stumpwm.d/init.lisp b/stumpwm/.stumpwm.d/init.lisp index 75c19a1..8a4455e 100644 --- a/stumpwm/.stumpwm.d/init.lisp +++ b/stumpwm/.stumpwm.d/init.lisp @@ -22,7 +22,11 @@ ;; Commands (defcommand shutdown () () - (run-sudo-command "shutdown now")) + (when (y-or-n-p (format nil "~@{~a~^~%~}" + "You are about to shut down the computer." + "Really ^1^Bshutdown^b^n?" + "^B^6Confirm?^n ")) + (run-shell-command "shutdown now"))) (defcommand firefox () () (run-or-raise "firefox" '(:class "firefox")))