diff options
| author | Jakob L. Kreuze | 2020-05-12 23:28:29 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2020-05-12 23:28:29 -0400 |
| commit | 72f2877c0da6286c4030556f9d14f5d7119fe445 (patch) | |
| tree | 55e2ea7ecffe6f9e7815961d32438fff45e789cc /init.el | |
| parent | 4e8f3f73316296248a5c556c2a6e1a3ae1400444 (diff) | |
modeline: Remove unicode characters in `exwm-title'.
For characters not covered by Terminus, Emacs will default to a font
with a different glyph size, making the modeline undreadable.
Diffstat (limited to 'init.el')
| -rw-r--r-- | init.el | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -678,11 +678,15 @@ RIGHT aligned respectively." (escape-mode-line-construct (concat " " left padding right)) (concat " " left right)))) +(defun remove-unicode (s) + "Remove non-ASCII or non-printable ASCII characters from `S'." + (apply #'string (seq-filter #'(lambda (c) (and (>= c ? ) (<= c ?~))) s))) + (setq-default mode-line-format '((:eval (mode-line-render (cond ((eq major-mode 'exwm-mode) - (concat "%b: " exwm-title)) + (concat "%b: " (remove-unicode exwm-title))) ((eq major-mode 'pdf-view-mode) (concat "%b [" (number-to-string (pdf-view-current-page)) |