summaryrefslogtreecommitdiff
path: root/src/gizmo/wasp-mandarin.el
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-07-21 00:14:25 -0400
committerLLLL Colonq <llll@colonq>2026-07-21 00:14:25 -0400
commitf04ada478f4bfa5637744876f00ff56f85dcf552 (patch)
tree50cde49222fdddf4274b3e123568fe2c75c5e155 /src/gizmo/wasp-mandarin.el
parent75e005e81b73d8471f16dc5fad7bbdc312bdbfe7 (diff)
Update
Diffstat (limited to 'src/gizmo/wasp-mandarin.el')
-rw-r--r--src/gizmo/wasp-mandarin.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gizmo/wasp-mandarin.el b/src/gizmo/wasp-mandarin.el
new file mode 100644
index 00000000..f00cb2bc
--- /dev/null
+++ b/src/gizmo/wasp-mandarin.el
@@ -0,0 +1,28 @@
+;;; wasp-mandarin --- description -*- lexical-binding: t; -*-
+;;; Commentary:
+;;; Code:
+
+(defun w/mandarin ()
+ "Modify the interface to support language learning."
+ (interactive)
+ (defun mode-line-render (left right)
+ "Return a string of `window-width' length containing LEFT and RIGHT."
+ (let* ((available-width (- (window-width) (length left) 10)))
+ (format (format " %%s %%%ds " available-width) left right)))
+ (setq mode-line-format
+ (setq-default mode-line-format
+ `((:eval
+ (mode-line-render
+ (concat
+ (propertize (format-mode-line (buffer-name)) 'face 'bold)
+ " —— "
+ (format-mode-line mode-name)
+ "模式 —— "
+ (s-replace "~" "家园" (c/replace-home default-directory)))
+ (format-mode-line
+ '(line-number-mode
+ (" 排%l" (column-number-mode " 柱%c")))))))))
+ )
+
+(provide 'wasp-mandarin)
+;;; wasp-mandarin.el ends here