summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.el b/init.el
index 59eee42..cff580e 100644
--- a/init.el
+++ b/init.el
@@ -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))

© 2015 - 2026 Jakob L. Kreuze