Advertisement
Guest User

Xah Fly Key Emacs Mode-Line Config

a guest
Dec 19th, 2018
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 2.30 KB | None | 0 0
  1. (setq display-time-mail-file 0)
  2. (setq display-time-default-load-average nil)
  3. (setq display-time-24hr-format t)
  4.  
  5. (display-time-mode 1)
  6. (display-battery-mode 1)
  7. (setq battery-mode-line-format " %b%p%%")
  8.  
  9. ;; Xah Fly Keys Mode-Line faces                                                    
  10. (make-face 'mode-line-xfk-insert-face)
  11. (set-face-attribute 'mode-line-xfk-insert-face nil
  12.                     :inherit 'mode-line-face
  13.                     :background "darkgreen"
  14.                     :foreground "green"
  15.                     :weight 'bold)
  16. (make-face 'mode-line-xfk-command-face)
  17. (set-face-attribute 'mode-line-xfk-command-face nil
  18.                     :inherit 'mode-line-face
  19.                     :background "darkred"
  20.                     :foreground "red"
  21.                     :weight 'bold)
  22.  
  23. ;; Other Mode-Line faces                                                            
  24. (make-face 'mode-line-major-mode-face)
  25. (set-face-attribute 'mode-line-major-mode-face nil
  26.                     :inherit 'mode-line-face
  27.                     :weight 'bold)
  28. (set-face-attribute 'mode-line-buffer-id nil
  29.                     :inherit 'mode-line-face
  30.                     :weight 'bold
  31.                     :inverse-video nil
  32.                     :background "gray"
  33.                     :foreground "darkblue")
  34.  
  35. (setq-default mode-line-format
  36.               (list "%e"
  37.                     '(:eval (if xah-fly-insert-state-q
  38.                                 (propertize "INS>"
  39.                                             'face 'mode-line-xfk-insert-face)
  40.                               (propertize "COM>"
  41.                                           'face 'mode-line-xfk-command-face)))
  42.                     "%+%*"
  43.                     '(:propertize " %b " face mode-line-buffer-id)
  44.                     "[L%l/%I]("
  45.                     '(:propertize mode-name face mode-line-major-mode-face)
  46.                     '(:propertize minor-mode-alist)
  47.                     ") "
  48.                     mode-line-misc-info
  49.                     ;; "%-"                                                        
  50.                     ))
  51.  
  52. ;; Use for testing                                                                  
  53. ;; (setq xah-fly-insert-state-q nil)                                                
  54. ;; (setq xah-fly-insert-state-q t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement