diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-28 13:55:36 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-28 13:55:36 -0400 |
| commit | 49dc4b6d4cb91c3a2b3370a7ab667acec3595297 (patch) | |
| tree | 3124959fc141189cd96e25ff098fa1ddd4e3028a /modules/dashboard-config.el | |
| parent | 8e376fc615b4aced8e8e0ddd4f1e3c61eec22902 (diff) | |
| download | dotemacs-49dc4b6d4cb91c3a2b3370a7ab667acec3595297.tar.gz dotemacs-49dc4b6d4cb91c3a2b3370a7ab667acec3595297.zip | |
feat(dashboard): add a weather launcher (wttrin)
A Weather launcher joins the dashboard's top row after Agenda, on key w, drawn with the nf-weather-day_sunny_overcast Weather Icons glyph. It opens the wttrin forecast through call-interactively so wttrin's location prompt runs. A bare (wttrin) call errors, since the command takes the location as a required argument that its interactive form supplies.
Row sizes move from 4-4-3-3 to 5-4-3-3. The launcher table stays the single source for both the navigator icons and the keymap.
Diffstat (limited to 'modules/dashboard-config.el')
| -rw-r--r-- | modules/dashboard-config.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el index daa75fe9..53f19b72 100644 --- a/modules/dashboard-config.el +++ b/modules/dashboard-config.el @@ -54,6 +54,7 @@ (declare-function nerd-icons-mdicon "nerd-icons") (declare-function nerd-icons-codicon "nerd-icons") (declare-function nerd-icons-octicon "nerd-icons") +(declare-function nerd-icons-wicon "nerd-icons") ;; user-constants.el provides the home-directory constant. (defvar user-home-dir) @@ -139,6 +140,7 @@ Adjust this if the title doesn't appear centered under the banner image.") (list "d" #'nerd-icons-faicon "nf-fa-folder_o" "Files" "Dirvish File Manager" (lambda () (dirvish user-home-dir))) (list "t" #'nerd-icons-devicon "nf-dev-terminal" "Terminal" "Launch Terminal" (lambda () (cj/term-toggle))) (list "a" #'nerd-icons-mdicon "nf-md-calendar" "Agenda" "Main Org Agenda" (lambda () (cj/main-agenda-display))) + (list "w" #'nerd-icons-wicon "nf-weather-day_sunny_overcast" "Weather" "Wttrin Weather Forecast" (lambda () (call-interactively #'wttrin))) (list "r" #'nerd-icons-faicon "nf-fa-rss_square" "Feeds" "Elfeed Feed Reader" (lambda () (cj/elfeed-open))) (list "b" #'nerd-icons-codicon "nf-cod-library" "Books" "Calibre Ebook Reader" (lambda () (calibredb))) (list "f" #'nerd-icons-mdicon "nf-md-school" "Flashcards" "Org-Drill" (lambda () (cj/drill-start))) @@ -152,9 +154,10 @@ Adjust this if the title doesn't appear centered under the banner image.") "Dashboard launcher table: (KEY ICON-FN ICON-NAME LABEL TOOLTIP ACTION). Drives both `dashboard-navigator-buttons' and the dashboard-mode-map keys.") -(defconst cj/dashboard--row-sizes '(4 4 3 3) +(defconst cj/dashboard--row-sizes '(5 4 3 3) "Navigator row lengths. Must sum to the number of `cj/dashboard--launchers'. -The last row groups Slack, Linear, and Signal together.") +The top row carries Weather alongside the core tools; the last row groups +Slack, Linear, and Signal together.") (defun cj/dashboard--navigator-button (l) "Build a `dashboard-navigator-buttons' entry from launcher L." |
