From 0930c7b9639c5fcb85b8c7a25bc2f4e42c30a286 Mon Sep 17 00:00:00 2001 From: Krzysztof Drewniak Date: Sun, 27 Feb 2011 21:34:24 -0600 Subject: [PATCH] Added logout command bindings.lisp: Added keybinding (C-T C-L) for logout command stumpwm.text.in: Added documentation for logout command user.lisp: Defined logout command --- bindings.lisp | 3 ++- stumpwm.texi.in | 1 + user.lisp | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bindings.lisp b/bindings.lisp index e8d11b6..6cd739e 100644 --- a/bindings.lisp +++ b/bindings.lisp @@ -107,7 +107,8 @@ from most specific groups to most general groups.") (kbd "F8") "gselect 8" (kbd "F9") "gselect 9" (kbd "F10") "gselect 10" - (kbd "h") '*help-map*) + (kbd "h") '*help-map* + (kbd "C-L") "logout") (fill-keymap *group-top-map* *escape-key* '*group-root-map*) diff --git a/stumpwm.texi.in b/stumpwm.texi.in index 4b6cdd1..269a027 100644 --- a/stumpwm.texi.in +++ b/stumpwm.texi.in @@ -1169,6 +1169,7 @@ section. !!! loadrc !!! keyboard-quit !!! quit +!!! logout !!! restart-hard !!! restart-soft !!! getsel diff --git a/user.lisp b/user.lisp index e9ca71c..d0eb6b8 100644 --- a/user.lisp +++ b/user.lisp @@ -217,11 +217,15 @@ such a case, kill the shell command to resume StumpWM." (defcommand-alias abort keyboard-quit) - (defcommand quit () () "Quit StumpWM." (throw :top-level :quit)) +(defcommand logout (surep) + ((:y-or-n "Are you sure you want to logout, killing all your programs?")) + "Quit StumpWM, after making sure you really want to do that." + (if surep (quit) t)) + (defcommand restart-soft () () "Soft Restart StumpWM. The lisp process isn't restarted. Instead, control jumps to the very beginning of the stumpwm program. This -- 1.7.1