aboutsummaryrefslogtreecommitdiffstats
path: root/.stumpwmrc
diff options
context:
space:
mode:
Diffstat (limited to '.stumpwmrc')
-rw-r--r--.stumpwmrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/.stumpwmrc b/.stumpwmrc
index 0ecc3ee..18227e5 100644
--- a/.stumpwmrc
+++ b/.stumpwmrc
@@ -48,6 +48,11 @@
"Hook run right before the screen gets locked.")
(defvar *screen-unlocked-hook* nil
"Hook run right after the screen is unlocked.")
+(defvar *desktop-bindings*
+ (let ((m (make-sparse-keymap)))
+ (define-key m (kbd "s") "save-desktop-configuration")
+ m)
+ "Special keymap for desktop management commands.")
(defun get-mail-count (mailbox &optional (inbox "inbox"))
"Check how many new messages there are in MAILBOX."
@@ -147,6 +152,10 @@ itself."
"Open URxvt"
(run-or-raise *urxvt-program* '(:class "URxvt")))
+(defcommand save-desktop-configuration () ()
+ "Save the current desktop configuration."
+ (dump-desktop-to-file "~/.stumpwm.d/desktop.lisp"))
+
(defun run-stumpwm-hook-on-exit (process)
"Run `*screen-unlocked-hook*' if PROCESS' status is `:exited'."
(when (eq (sb-ext:process-status process) :exited)
@@ -231,6 +240,7 @@ Run `*lock-screen-hook*' before locking it and run
(define-key *root-map* (kbd "p") "move-focus up")
(define-key *root-map* (kbd "SPC") "next-in-frame")
(define-key *root-map* (kbd "C-z") "other-in-frame")
+(define-key *root-map* (kbd "d") '*desktop-bindings*)
(undefine-key *root-map* (kbd "C-a"))
(undefine-key *root-map* (kbd "C-c"))