diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-23 22:56:05 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-23 22:56:05 -0400 |
| commit | 081d76e4b9935217d650ae142bce6e8200e97b48 (patch) | |
| tree | 5f968a68a5c322abbfcdb4c250fa5ee412d7af7a /docs | |
| parent | 1587c119ceeba4698974f402eda17482e68202e8 (diff) | |
| download | chime-081d76e4b9935217d650ae142bce6e8200e97b48.tar.gz chime-081d76e4b9935217d650ae142bce6e8200e97b48.zip | |
feat: add themeable faces to the modeline event display
The modeline event text inherited the mode-line face with no way to style it. I added four faces (chime-modeline-face, chime-modeline-soon-face, chime-modeline-urgent-face, chime-modeline-no-events-face) that color the display by how soon the next event is.
Two thresholds, chime-modeline-soon-threshold-minutes (30) and chime-modeline-urgent-threshold-minutes (5), drive the urgency mapping. The default and idle faces inherit mode-line, so the modeline looks unchanged until you theme it. Soon inherits warning and urgent inherits error, so imminent events stand out across themes without configuration.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/CONFIGURATION.org | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/CONFIGURATION.org b/docs/CONFIGURATION.org index a6dc979..3565c4a 100644 --- a/docs/CONFIGURATION.org +++ b/docs/CONFIGURATION.org @@ -208,6 +208,38 @@ Larger values increase the agenda span fetched by the async subprocess and can s (setq chime-calendar-url "https://calendar.google.com") #+END_SRC +** Faces + +The modeline event display is themeable. Chime colors it by how soon the next +event is, using three faces, plus a fourth for the idle indicator: + +- =chime-modeline-face= — the next event is more than + =chime-modeline-soon-threshold-minutes= away. Inherits =mode-line=, so the + modeline looks unchanged until you theme it. +- =chime-modeline-soon-face= — the next event is within the soon threshold. + Inherits =warning=. +- =chime-modeline-urgent-face= — the next event is within + =chime-modeline-urgent-threshold-minutes=. Inherits =error=. +- =chime-modeline-no-events-face= — shown for the idle indicator + (=chime-modeline-no-events-text=, and the loading and error icons). + Inherits =mode-line=. + +The two thresholds control where the soon and urgent faces kick in (in +minutes until the event): + +#+BEGIN_SRC elisp +(setq chime-modeline-soon-threshold-minutes 30) ;; soon face at 30 min or less +(setq chime-modeline-urgent-threshold-minutes 5) ;; urgent face at 5 min or less +#+END_SRC + +Customize the faces like any other. They inherit sensible built-ins, so they +adapt to your theme out of the box; override when you want something specific: + +#+BEGIN_SRC elisp +(custom-set-faces + '(chime-modeline-urgent-face ((t :foreground "red" :weight bold)))) +#+END_SRC + * Notification Text Control what appears in notifications and the modeline event text: |
