From 3d1918b060a75b173b72425780f921c62f9d50ec Mon Sep 17 00:00:00 2001 From: bth Date: Wed, 3 Jun 2026 20:48:37 -0700 Subject: [PATCH] minmo : minmo-use-ascii --- packages/minmo.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/minmo.el b/packages/minmo.el index 74353f6..67b1b90 100644 --- a/packages/minmo.el +++ b/packages/minmo.el @@ -36,13 +36,13 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; unified symbol set for git and disk status on tty and pts ;; -;; git disk -;; ---------------------------------------- -;; unmodified : ◻ : shadow : shadow -;; modified : ◱ : warning : error -;; ignored/readonly : ◳ : success : success -;; staged/orphan : ◰ : link : warning -;; untracked/buffer : ◲ : error : link +;; status u : a : git : disk +;; -------------------------------------------- +;; unmodified : ◻ : . : nil : nil +;; modified : ◱ : * : warning : error +;; ignored/readonly : ◳ : _ : success : success +;; staged/orphan : ◰ : + : link : warning +;; untracked/buffer : ◲ : ! : error : link ;; quadrant semantics: ;; @@ -62,9 +62,14 @@ "Unified symbol set for git and disk status with unicode and ascii variants and their respective faces.") +(defcustom minmo-use-ascii nil + "whether to use ascii symbols instead of unicode" + :type '(boolean)) + (defun minmo--status-string-face (status fstype) (let* ( - (encoding (if (string-prefix-p "xterm" (tty-type)) 'unicode 'ascii)) + (encoding (if (or minmo-use-ascii (not (string-prefix-p "xterm" (tty-type)))) + 'ascii 'unicode)) (row (cdr (assoc status minmo-status-alist))) (str (cdr (assoc encoding (car row)))) (face (cdr (assoc fstype (cdr row))))