summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-08-23 14:18:25 +0200
committercashmere <cashmere@autistici.org>2026-08-23 14:18:25 +0200
commite8b0abed0711cefcd0c06b8e12e3a7a9224fb329 (patch)
treead99f2f528d6ba464ad9237e7a97f3b79d9805b9
parent32bccd667ae70130cf58929dfa07a255f38e03cf (diff)
downloademacs-e8b0abed0711cefcd0c06b8e12e3a7a9224fb329.tar.gz
md: 2026-08-23T14:18:31+02:00
-rw-r--r--config.el21
-rw-r--r--config.org21
-rw-r--r--lisp/fossil-ui.el11
-rw-r--r--lisp/my-mode-line.el36
-rw-r--r--themes/tinty-theme.el134
5 files changed, 139 insertions, 84 deletions
diff --git a/config.el b/config.el
index f330f7d..c853b14 100644
--- a/config.el
+++ b/config.el
@@ -24,6 +24,8 @@
Set per-host in the gitignored `local.el'.")
(defvar cashmere/frame-alpha-background nil
"Per-host frame opacity, or nil for the Emacs default.")
+ (defvar cashmere/font-family "Maple Mono NF"
+ "Per-host default monospace font family.")
(defvar cashmere/font-height 180
"Per-host default font height in tenths of a point.")
(defvar cashmere/theme nil
@@ -1088,10 +1090,13 @@ Temporarily disables notifications during the fetch."
(org-modern-internal-target nil)
(org-modern-radio-target nil)
:custom-face
- (org-modern-symbol
- ((t (:family "Maple Mono NF" :inherit shadow :weight regular))))
(org-modern-block-name
- ((t (:inherit (shadow fixed-pitch) :height 0.85 :weight regular)))))
+ ((t (:inherit (shadow fixed-pitch) :height 0.85 :weight regular))))
+ :config
+ (set-face-attribute 'org-modern-symbol nil
+ :family cashmere/font-family
+ :inherit 'shadow
+ :weight 'regular))
@@ -2887,9 +2892,9 @@ so the working-tree diff stays visible until the user explicitly stages."
:variable-pitch-height 1.12
:line-spacing 0.16)
(t
- :default-family "Maple Mono NF"
+ :default-family ,cashmere/font-family
:default-weight regular
- :fixed-pitch-family "Maple Mono NF"
+ :fixed-pitch-family ,cashmere/font-family
:variable-pitch-family "SF Pro Text"
:variable-pitch-weight regular
:variable-pitch-height 1.04
@@ -2900,7 +2905,7 @@ so the working-tree diff stays visible until the user explicitly stages."
:mode-line-inactive-height 0.92
:header-line-family "SFProText Nerd Font"
:header-line-weight regular
- :line-number-family "Maple Mono NF"
+ :line-number-family ,cashmere/font-family
:line-number-height 0.9
:bold-weight semibold
:line-spacing 0.08)))
@@ -2917,7 +2922,7 @@ so the working-tree diff stays visible until the user explicitly stages."
;; redisplay. This avoids fallback-font geometry and a visible layout jump;
;; Fontaine's global theme then supplies the remaining face attributes.
(add-to-list 'default-frame-alist
- `(font . ,(format "Maple Mono NF-%g"
+ `(font . ,(format "%s-%g" cashmere/font-family
(/ cashmere/font-height 10.0))))
@@ -4057,6 +4062,8 @@ reset is unnecessary, so do the handler resolution ourselves and skip
(use-package mu4e-alert
:ensure t
:after mu4e
+ :custom
+ (mu4e-alert-modeline-formatter #'my/mode-line-mu4e-formatter)
:config
;; Use libnotify for desktop notifications (notify-send / swaync)
(mu4e-alert-set-default-style 'libnotify)
diff --git a/config.org b/config.org
index aeb6442..a4002b1 100644
--- a/config.org
+++ b/config.org
@@ -42,6 +42,8 @@
Set per-host in the gitignored `local.el'.")
(defvar cashmere/frame-alpha-background nil
"Per-host frame opacity, or nil for the Emacs default.")
+ (defvar cashmere/font-family "Maple Mono NF"
+ "Per-host default monospace font family.")
(defvar cashmere/font-height 180
"Per-host default font height in tenths of a point.")
(defvar cashmere/theme nil
@@ -1236,10 +1238,13 @@ Use =org-modern= only for quiet structural markers in Org files. GTD labels, tim
(org-modern-internal-target nil)
(org-modern-radio-target nil)
:custom-face
- (org-modern-symbol
- ((t (:family "Maple Mono NF" :inherit shadow :weight regular))))
(org-modern-block-name
- ((t (:inherit (shadow fixed-pitch) :height 0.85 :weight regular)))))
+ ((t (:inherit (shadow fixed-pitch) :height 0.85 :weight regular))))
+ :config
+ (set-face-attribute 'org-modern-symbol nil
+ :family cashmere/font-family
+ :inherit 'shadow
+ :weight 'regular))
#+end_src
** org-agenda
@@ -3457,9 +3462,9 @@ Native =undo-redo= (via =evil-undo-system='undo-redo=); just raise the undo limi
:variable-pitch-height 1.12
:line-spacing 0.16)
(t
- :default-family "Maple Mono NF"
+ :default-family ,cashmere/font-family
:default-weight regular
- :fixed-pitch-family "Maple Mono NF"
+ :fixed-pitch-family ,cashmere/font-family
:variable-pitch-family "SF Pro Text"
:variable-pitch-weight regular
:variable-pitch-height 1.04
@@ -3470,7 +3475,7 @@ Native =undo-redo= (via =evil-undo-system='undo-redo=); just raise the undo limi
:mode-line-inactive-height 0.92
:header-line-family "SFProText Nerd Font"
:header-line-weight regular
- :line-number-family "Maple Mono NF"
+ :line-number-family ,cashmere/font-family
:line-number-height 0.9
:bold-weight semibold
:line-spacing 0.08)))
@@ -3487,7 +3492,7 @@ Native =undo-redo= (via =evil-undo-system='undo-redo=); just raise the undo limi
;; redisplay. This avoids fallback-font geometry and a visible layout jump;
;; Fontaine's global theme then supplies the remaining face attributes.
(add-to-list 'default-frame-alist
- `(font . ,(format "Maple Mono NF-%g"
+ `(font . ,(format "%s-%g" cashmere/font-family
(/ cashmere/font-height 10.0))))
#+end_src
@@ -4799,6 +4804,8 @@ reset is unnecessary, so do the handler resolution ourselves and skip
(use-package mu4e-alert
:ensure t
:after mu4e
+ :custom
+ (mu4e-alert-modeline-formatter #'my/mode-line-mu4e-formatter)
:config
;; Use libnotify for desktop notifications (notify-send / swaync)
(mu4e-alert-set-default-style 'libnotify)
diff --git a/lisp/fossil-ui.el b/lisp/fossil-ui.el
index 0982e4b..0305d3a 100644
--- a/lisp/fossil-ui.el
+++ b/lisp/fossil-ui.el
@@ -339,10 +339,14 @@ Paths may contain spaces. A dash in either count denotes binary data."
:busy nil
:error nil)))
+(defun fossil-ui--single-line (value)
+ "Return VALUE as a string without native-widget line breaks."
+ (replace-regexp-in-string "[\r\n]+" " " (format "%s" (or value ""))))
+
(defun fossil-ui--fit (value width &optional face)
"Return VALUE truncated or padded to WIDTH, optionally using FACE."
(let* ((width (max 0 width))
- (value (truncate-string-to-width (format "%s" (or value ""))
+ (value (truncate-string-to-width (fossil-ui--single-line value)
width nil nil "..."))
(result (concat value
(make-string (max 0 (- width (string-width value))) ?\s))))
@@ -350,8 +354,9 @@ Paths may contain spaces. A dash in either count denotes binary data."
(defun fossil-ui--item (value &optional face)
"Return a TextUI item for VALUE with optional FACE."
- `(:type item :format "%v"
- :value ,(if face (propertize value 'face face) value)))
+ (let ((value (fossil-ui--single-line value)))
+ `(:type item :format "%v"
+ :value ,(if face (propertize value 'face face) value))))
(defun fossil-ui--icons-p ()
"Return non-nil when dashboard Nerd Font icons should be used."
diff --git a/lisp/my-mode-line.el b/lisp/my-mode-line.el
index 11eb88b..f7cc66a 100644
--- a/lisp/my-mode-line.el
+++ b/lisp/my-mode-line.el
@@ -34,6 +34,10 @@
'((t (:inherit font-lock-builtin-face :weight bold)))
"Face for the IRC activity indicator.")
+(defface my/mode-line-clatter-face
+ '((t (:inherit font-lock-builtin-face :weight bold)))
+ "Face for the Clatter joined-channel indicator.")
+
(defface my/mode-line-mu4e-face
'((t (:inherit warning :weight bold)))
"Face for the unread mail indicator.")
@@ -56,6 +60,9 @@
(defvar-local my/mode-line--buffer-title nil)
+(defconst my/mode-line--missing (make-symbol "missing")
+ "Sentinel used when checking membership in package hash tables.")
+
(defun my/mode-line--update-title-cache ()
"Update the cached #+title for the current buffer."
(setq-local my/mode-line--buffer-title
@@ -153,6 +160,34 @@ of a literal dash."
(length erc-modified-channels-alist))
'face 'my/mode-line-irc-face))))
+(defun my/mode-line-clatter ()
+ "Clatter indicator showing the number of joined channels."
+ (when (featurep 'clatter)
+ (let ((count 0))
+ (dolist (buffer (clatter-all-buffers))
+ (when (with-current-buffer buffer
+ (and (eq clatter--buffer-type 'channel)
+ (hash-table-p clatter--nick-list)
+ (when-let* ((connection
+ (clatter-get-connection clatter--network))
+ ((eq (clatter-connection-state connection)
+ :connected))
+ (nick (clatter-connection-nick connection)))
+ (not (eq (gethash (downcase nick) clatter--nick-list
+ my/mode-line--missing)
+ my/mode-line--missing)))))
+ (setq count (1+ count))))
+ (when (> count 0)
+ (let ((icon (my/mode-line--icon "nf-md-forum_outline"
+ 'my/mode-line-clatter-face "irc")))
+ (propertize (format "%s %d" icon count)
+ 'face 'my/mode-line-clatter-face))))))
+
+(defun my/mode-line-mu4e-formatter (mail-count)
+ "Format MAIL-COUNT for the custom mode line without an extra icon."
+ (unless (zerop mail-count)
+ (number-to-string mail-count)))
+
(defun my/mode-line-mu4e ()
"Unread mail indicator from mu4e-alert, or nil when mu4e is not in use."
(when (bound-and-true-p mu4e-alert-mode-line)
@@ -215,6 +250,7 @@ the bottom mode-line is hidden."
'local-map mode-line-buffer-identification-keymap)) " "
mode-line-position)
'("" (:eval (my/mode-line-irc)) " "
+ (:eval (my/mode-line-clatter)) " "
(:eval (my/mode-line-mu4e)) " "
mode-line-process " "
(:eval (my/mode-line-time)) " "
diff --git a/themes/tinty-theme.el b/themes/tinty-theme.el
index 2aee854..cb04fa2 100644
--- a/themes/tinty-theme.el
+++ b/themes/tinty-theme.el
@@ -65,67 +65,67 @@
(deftheme tinty "Noctalia theme with proper color contrast.")
(let* (;; Tinted8 UI surface colors
- (ui-bg "#282a36")
- (ui-fg "#f8f8f2")
- (ui-fg-dim "#6272a4")
+ (ui-bg "#f5f5f5")
+ (ui-fg "#1f1f1f")
+ (ui-fg-dim "#635d97")
;; Use dim foreground for borders/muted chrome so they stay visible in
;; light variants (the raw border color is nearly white on latte).
- (ui-border "#6272a4")
- (ui-line-highlight "#353747")
- (ui-bg-dark "#191a21")
- (ui-bg-light "#343746")
+ (ui-border "#635d97")
+ (ui-line-highlight "#dcdeef")
+ (ui-bg-dark "#ece9df")
+ (ui-bg-light "#ffffff")
;; Tinted8 UI accent/status colors
- (ui-accent "#bd93f9")
- (ui-link "#8be9fd")
- (ui-info "#8be9fd")
- (ui-error "#ff5555")
- (ui-success "#50fa7b")
- (ui-warning "#ffb86c")
+ (ui-accent "#644ac9")
+ (ui-link "#036a96")
+ (ui-info "#036a96")
+ (ui-error "#cb3a2a")
+ (ui-success "#14720a")
+ (ui-warning "#a34d14")
;; Tinted8 UI container colors (for BACKGROUNDS only)
- (ui-selection-bg "#44475a")
- (ui-selection-fg "#f8f8f2")
- (ui-button-bg "#343746")
- (ui-button-fg "#f8f8f2")
- (ui-tooltip-bg "#343746")
- (ui-tooltip-fg "#f8f8f2")
- (ui-active-text-bg "#44475a")
- (ui-active-text-fg "#ffffff")
- (ui-search-bg "#ffb86c")
- (ui-search-fg "#282a36")
+ (ui-selection-bg "#cfcfde")
+ (ui-selection-fg "#1f1f1f")
+ (ui-button-bg "#ece9df")
+ (ui-button-fg "#1f1f1f")
+ (ui-tooltip-bg "#efeddc")
+ (ui-tooltip-fg "#1f1f1f")
+ (ui-active-text-bg "#cfcfde")
+ (ui-active-text-fg "#000000")
+ (ui-search-bg "#a34d14")
+ (ui-search-fg "#f5f5f5")
;; Tinted8 syntax colors
;; Comments use dim foreground instead of the raw syntax-comment gray,
;; which becomes almost invisible in light variants.
- (syntax-comment "#6272a4")
- (syntax-constant "#ffb86c")
- (syntax-function "#50fa7b")
- (syntax-keyword "#ff79c6")
- (syntax-string "#f1fa8c")
- (syntax-type "#8be9fd")
+ (syntax-comment "#635d97")
+ (syntax-constant "#a34d14")
+ (syntax-function "#14720a")
+ (syntax-keyword "#a3134d")
+ (syntax-string "#836e15")
+ (syntax-type "#036a96")
;; Give variables/imported names a distinct hue instead of blending into
;; the default foreground.
- (syntax-variable "#f8f8f2")
- (syntax-warning "#ff6e6e")
- (syntax-preprocessor "#9954fb")
- (syntax-annotation "#f1fa8c")
- (syntax-attribute "#8be9fd")
- (syntax-number "#ffb86c")
- (syntax-operator "#8be9fd")
+ (syntax-variable "#1f1f1f")
+ (syntax-warning "#d74c3d")
+ (syntax-preprocessor "#462da9")
+ (syntax-annotation "#836e15")
+ (syntax-attribute "#036a96")
+ (syntax-number "#a34d14")
+ (syntax-operator "#036a96")
;; Raw palette colors for rainbow headings, delimiters, terminal faces,
;; and anywhere else we need a predictable hue cycle.
- (pal-red "#ff5555")
- (pal-orange "#ffb86c")
- (pal-yellow "#f1fa8c")
- (pal-green "#50fa7b")
- (pal-cyan "#8be9fd")
- (pal-blue "#bd93f9")
- (pal-magenta "#ff79c6")
- (pal-gray "#6272a4")
- (pal-white "#f8f8f2")
- (pal-black "#21222c")
+ (pal-red "#cb3a2a")
+ (pal-orange "#a34d14")
+ (pal-yellow "#836e15")
+ (pal-green "#14720a")
+ (pal-cyan "#036a96")
+ (pal-blue "#644ac9")
+ (pal-magenta "#a3134d")
+ (pal-gray "#635d97")
+ (pal-white "#f5f5f5")
+ (pal-black "#1f1f1f")
(h1 (if tinty-scale-headings tinty-height-1 1.0))
(h2 (if tinty-scale-headings tinty-height-2 1.0))
(h3 (if tinty-scale-headings tinty-height-3 1.0))
@@ -344,13 +344,13 @@
;; === Terminal colors - mapped to the palette so they stay correct in both variants ===
`(term-color-black ((t (:foreground ,ui-bg-dark :background ,ui-bg-dark))))
- `(term-color-red ((t (:foreground "#ff5555" :background "#ff5555"))))
- `(term-color-green ((t (:foreground "#50fa7b" :background "#50fa7b"))))
- `(term-color-yellow ((t (:foreground "#f1fa8c" :background "#f1fa8c"))))
- `(term-color-blue ((t (:foreground "#bd93f9" :background "#bd93f9"))))
- `(term-color-magenta ((t (:foreground "#ff79c6" :background "#ff79c6"))))
- `(term-color-cyan ((t (:foreground "#8be9fd" :background "#8be9fd"))))
- `(term-color-white ((t (:foreground "#f8f8f2" :background "#f8f8f2"))))
+ `(term-color-red ((t (:foreground "#cb3a2a" :background "#cb3a2a"))))
+ `(term-color-green ((t (:foreground "#14720a" :background "#14720a"))))
+ `(term-color-yellow ((t (:foreground "#836e15" :background "#836e15"))))
+ `(term-color-blue ((t (:foreground "#644ac9" :background "#644ac9"))))
+ `(term-color-magenta ((t (:foreground "#a3134d" :background "#a3134d"))))
+ `(term-color-cyan ((t (:foreground "#036a96" :background "#036a96"))))
+ `(term-color-white ((t (:foreground "#f5f5f5" :background "#f5f5f5"))))
;; === EShell ===
`(eshell-prompt ((t (:foreground ,ui-accent :weight bold))))
@@ -556,13 +556,13 @@
`(ansi-color-magenta ((t (:foreground ,pal-magenta :background ,pal-magenta))))
`(ansi-color-cyan ((t (:foreground ,pal-cyan :background ,pal-cyan))))
`(ansi-color-white ((t (:foreground ,pal-white :background ,pal-white))))
- `(ansi-color-bright-black ((t (:foreground "#6272a4" :background "#6272a4"))))
- `(ansi-color-bright-red ((t (:foreground "#ff6e6e" :background "#ff6e6e"))))
- `(ansi-color-bright-green ((t (:foreground "#69ff94" :background "#69ff94"))))
- `(ansi-color-bright-yellow ((t (:foreground "#ffffa5" :background "#ffffa5"))))
- `(ansi-color-bright-blue ((t (:foreground "#d6acff" :background "#d6acff"))))
- `(ansi-color-bright-magenta ((t (:foreground "#ff92df" :background "#ff92df"))))
- `(ansi-color-bright-cyan ((t (:foreground "#a4ffff" :background "#a4ffff"))))
+ `(ansi-color-bright-black ((t (:foreground "#2c2b31" :background "#2c2b31"))))
+ `(ansi-color-bright-red ((t (:foreground "#d74c3d" :background "#d74c3d"))))
+ `(ansi-color-bright-green ((t (:foreground "#198d0c" :background "#198d0c"))))
+ `(ansi-color-bright-yellow ((t (:foreground "#9e841a" :background "#9e841a"))))
+ `(ansi-color-bright-blue ((t (:foreground "#7862d0" :background "#7862d0"))))
+ `(ansi-color-bright-magenta ((t (:foreground "#bf185a" :background "#bf185a"))))
+ `(ansi-color-bright-cyan ((t (:foreground "#047fb4" :background "#047fb4"))))
`(ansi-color-bright-white ((t (:foreground "#ffffff" :background "#ffffff"))))
;; === Anzu ===
@@ -1353,13 +1353,13 @@
;; === Term (extended) ===
`(term ((t (:foreground ,ui-fg :background ,ui-bg))))
`(term-bold ((t (:weight bold))))
- `(term-color-bright-black ((t (:foreground "#6272a4" :background "#6272a4"))))
- `(term-color-bright-red ((t (:foreground "#ff6e6e" :background "#ff6e6e"))))
- `(term-color-bright-green ((t (:foreground "#69ff94" :background "#69ff94"))))
- `(term-color-bright-yellow ((t (:foreground "#ffffa5" :background "#ffffa5"))))
- `(term-color-bright-blue ((t (:foreground "#d6acff" :background "#d6acff"))))
- `(term-color-bright-magenta ((t (:foreground "#ff92df" :background "#ff92df"))))
- `(term-color-bright-cyan ((t (:foreground "#a4ffff" :background "#a4ffff"))))
+ `(term-color-bright-black ((t (:foreground "#2c2b31" :background "#2c2b31"))))
+ `(term-color-bright-red ((t (:foreground "#d74c3d" :background "#d74c3d"))))
+ `(term-color-bright-green ((t (:foreground "#198d0c" :background "#198d0c"))))
+ `(term-color-bright-yellow ((t (:foreground "#9e841a" :background "#9e841a"))))
+ `(term-color-bright-blue ((t (:foreground "#7862d0" :background "#7862d0"))))
+ `(term-color-bright-magenta ((t (:foreground "#bf185a" :background "#bf185a"))))
+ `(term-color-bright-cyan ((t (:foreground "#047fb4" :background "#047fb4"))))
`(term-color-bright-white ((t (:foreground "#ffffff" :background "#ffffff"))))
;; === Transient ===