minmo : minmo-use-ascii call tty-type once on load
This commit is contained in:
parent
a25bdc9a7c
commit
836a72fbf6
1 changed files with 8 additions and 4 deletions
|
|
@ -63,13 +63,17 @@
|
||||||
and their respective faces.")
|
and their respective faces.")
|
||||||
|
|
||||||
(defcustom minmo-use-ascii nil
|
(defcustom minmo-use-ascii nil
|
||||||
"whether to use ascii symbols instead of unicode"
|
"Whether to use ascii symbols instead of unicode. Defaults to ascii if
|
||||||
:type '(boolean))
|
`tty-type' is not an xterm derivative."
|
||||||
|
:type '(boolean)
|
||||||
|
:set (lambda (sym val)
|
||||||
|
(if (not (string-prefix-p "xterm" (tty-type)))
|
||||||
|
(set sym t)
|
||||||
|
(set sym val))))
|
||||||
|
|
||||||
(defun minmo--status-string-face (status fstype)
|
(defun minmo--status-string-face (status fstype)
|
||||||
(let* (
|
(let* (
|
||||||
(encoding (if (or minmo-use-ascii (not (string-prefix-p "xterm" (tty-type))))
|
(encoding (if minmo-use-ascii 'ascii 'unicode))
|
||||||
'ascii 'unicode))
|
|
||||||
(row (cdr (assoc status minmo-status-alist)))
|
(row (cdr (assoc status minmo-status-alist)))
|
||||||
(str (cdr (assoc encoding (car row))))
|
(str (cdr (assoc encoding (car row))))
|
||||||
(face (cdr (assoc fstype (cdr row))))
|
(face (cdr (assoc fstype (cdr row))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue