Don't use sudo for shutdown command, add prompt

This commit is contained in:
Jeremy Dormitzer 2020-03-08 10:47:38 -04:00
parent 226271860c
commit a37c079ecc

View File

@ -22,7 +22,11 @@
;; Commands ;; Commands
(defcommand shutdown () () (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 () () (defcommand firefox () ()
(run-or-raise "firefox" '(:class "firefox"))) (run-or-raise "firefox" '(:class "firefox")))