From a7acefc5065558de2d301700c23d71f83bffdc83 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 15 Jun 2026 21:51:00 -0500 Subject: feat(dashboard): g refreshes, Telegram moves to G, F1 refreshes on show - g on the dashboard now runs dashboard-refresh-buffer (the dired/magit convention) instead of opening Telegram. Telegram moves to G in the launcher table. - cj/dashboard-only (F1) refreshes before showing, so re-displaying the dashboard always lands on fresh content. --- modules/dashboard-config.el | 9 ++++++++- tests/test-dashboard-config-launchers.el | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el index 24c688389..5a3ae012f 100644 --- a/modules/dashboard-config.el +++ b/modules/dashboard-config.el @@ -90,7 +90,7 @@ Adjust this if the title doesn't appear centered under the banner image.") (list "m" #'nerd-icons-mdicon "nf-md-music" "Music" "EMMS Music Player" (lambda () (cj/music-playlist-toggle) (cj/music-playlist-load))) (list "e" #'nerd-icons-faicon "nf-fa-envelope" "Email" "Mu4e Email Client" (lambda () (mu4e))) (list "i" #'nerd-icons-faicon "nf-fa-comments" "IRC" "Emacs Relay Chat" (lambda () (cj/erc-switch-to-buffer-with-completion))) - (list "g" #'nerd-icons-faicon "nf-fa-telegram" "Telegram" "Telega Telegram Client" (lambda () (cj/telega))) + (list "G" #'nerd-icons-faicon "nf-fa-telegram" "Telegram" "Telega Telegram Client" (lambda () (cj/telega))) (list "s" #'nerd-icons-faicon "nf-fa-slack" "Slack" "Slack Client" (lambda () (cj/slack-start))) (list "l" #'nerd-icons-octicon "nf-oct-issue_tracks" "Linear" "Linear Issue Tracker" (lambda () (pearl-list-issues)))) "Dashboard launcher table: (KEY ICON-FN ICON-NAME LABEL TOOLTIP ACTION). @@ -144,6 +144,9 @@ window." (cj/kill-all-other-buffers-and-windows)) (when (fboundp 'dashboard-open) (dashboard-open))) + ;; Refresh so re-showing the dashboard always lands on fresh content. + (when (fboundp 'dashboard-refresh-buffer) + (dashboard-refresh-buffer)) (goto-char (point-min)) (set-window-start (selected-window) (point-min))) @@ -228,6 +231,10 @@ system-defaults) are preserved rather than overwritten." ;; Disable 'q' to quit dashboard (define-key dashboard-mode-map (kbd "q") nil) + ;; 'g' refreshes the dashboard (the dired/magit convention). Telegram moved to + ;; 'G' in the launcher table to free it. + (define-key dashboard-mode-map (kbd "g") #'dashboard-refresh-buffer) + ;; Launcher keys, derived from `cj/dashboard--launchers' (same source as the ;; navigator icons, so key order can't drift from the icon-row order). (cj/dashboard--bind-launchers dashboard-mode-map)) diff --git a/tests/test-dashboard-config-launchers.el b/tests/test-dashboard-config-launchers.el index 0ac37f878..397a8fcf1 100644 --- a/tests/test-dashboard-config-launchers.el +++ b/tests/test-dashboard-config-launchers.el @@ -25,7 +25,8 @@ (require 'dashboard-config) -(defconst test-dash--keys '("c" "d" "t" "a" "r" "b" "f" "m" "e" "i" "g" "s" "l")) +;; Telegram moved from "g" to "G" so "g" is free for dashboard refresh. +(defconst test-dash--keys '("c" "d" "t" "a" "r" "b" "f" "m" "e" "i" "G" "s" "l")) ;; ----------------------------- launcher table -------------------------------- -- cgit v1.2.3