diff options
author | JSDurand <mmemmew@gmail.com> | 2023-06-03 12:33:12 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-06-03 12:33:12 +0800 |
commit | d888686eee635d87a45cb50bae4c115a92afd147 (patch) | |
tree | 8a0b2d3e9d5f1ce27daf0cecc8610caa8b208a6f | |
parent | a1fe20b19a0438b2c694137d6bd93d9ea8032c08 (diff) |
dashboard: bind 'c' to `dashboard-clear`
* dashboard.el (dashboard-mode-map, dashboard-clear): This function
runs `ibuffer` and then runs `durand-ibuffer-clear`. Its effect is
to clear every buffer and then stays in the dashboard. This can be
used as a final key before leaving the computer.
-rw-r--r-- | dashboard.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/dashboard.el b/dashboard.el index 5cd4255..b2ddede 100644 --- a/dashboard.el +++ b/dashboard.el @@ -81,7 +81,7 @@ common functionalities more conveniently.") (define-key dashboard-mode-map (vector ?o) #'durand-open-object) (define-key dashboard-mode-map (vector ?g) #'gnus) (define-key dashboard-mode-map (vector ?a) #'dashboard-org-agenda) -(define-key dashboard-mode-map (vector ?c) #'dashboard-org-capture) +(define-key dashboard-mode-map (vector ?c) #'dashboard-clear) ;; load Org if not loaded already @@ -109,6 +109,15 @@ calls `%s' otherwise." (dashboard-preload org-capture "org-conf.el") (dashboard-preload org-store-link "org-conf.el") +;; ibuffer clear + +(defun dashboard-clear () + "Run `durand-ibuffer-clear' while in the dashboard." + (interactive) + (let ((inhibit-message t)) + (ibuffer) + (durand-ibuffer-clear))) + ;;; Modify killing buffers ;;;###autoload |