From 081d76e4b9935217d650ae142bce6e8200e97b48 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 23 Jun 2026 22:56:05 -0400 Subject: 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. --- docs/CONFIGURATION.org | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'docs') 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: -- cgit v1.2.3