Emacs: Xah Fly Keys Mode Status Customization
This is how you customize Xah Fly Keys command/insert activation status indicator.
change mode indicator in mode line
(setq xah-fly-command-mode-indicator "🔺") (setq xah-fly-insert-mode-indicator "✏" )
or, you can add background color like this:
(setq xah-fly-command-mode-indicator (propertize "⦿" 'face '(:foreground "red")))
(2023-01-24 thanks to jamesni)
you need proper font setup for unicode. [see Emacs: Font Setup]
change current line highlight
(defun my-highlight-line-on () (global-hl-line-mode 1)) (defun my-highlight-line-off () (global-hl-line-mode 0)) (add-hook 'xah-fly-command-mode-activate-hook 'my-highlight-line-on) (add-hook 'xah-fly-insert-mode-activate-hook 'my-highlight-line-off) ;; (remove-hook 'xah-fly-command-mode-activate-hook 'my-highlight-line-on) ;; (remove-hook 'xah-fly-insert-mode-activate-hook 'my-highlight-line-off)
[see Emacs: What is Hook]
change mode line background color
(defun my-modeline-color-on () (set-face-background 'mode-line "firebrick")) (defun my-modeline-color-off () (set-face-background 'mode-line "grey")) (add-hook 'xah-fly-command-mode-activate-hook 'my-modeline-color-on) (add-hook 'xah-fly-insert-mode-activate-hook 'my-modeline-color-off)
change background color
(defun my-xfk-command-color () (set-background-color "lightgrey")) (defun my-xfk-insert-color () (set-background-color "white")) (add-hook 'xah-fly-command-mode-activate-hook 'my-xfk-command-color) (add-hook 'xah-fly-insert-mode-activate-hook 'my-xfk-insert-color)
See also: Emacs: Set Color Theme
2022-01-22 thanks to Christian Tietze https://christiantietze.de/, jamesni, yusz.