indentation
This commit is contained in:
@@ -32,16 +32,3 @@
|
||||
:init
|
||||
(setq fci-rule-column 80))
|
||||
(use-package all-the-icons)
|
||||
;; (use-package neotree
|
||||
;; :init
|
||||
;; (setq neo-smart-open 1
|
||||
;; neo-auto-indent-point nil
|
||||
;; neo-mode-line-type 'none
|
||||
;; neo-persist-show nil
|
||||
;; neo-window-width 25
|
||||
;; neo-banner-message nil
|
||||
;; neo-show-updir-line nil)
|
||||
;; :config
|
||||
;; (add-hook 'neotree-mode-hook (lambda () (setq-local tab-width 1)))
|
||||
;; (eval-after-load "neotree" (load "~/.emacs.d/my-neotree.elc"))
|
||||
;; )
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
(if (eq (get-buffer-window) powerline-current-window)
|
||||
(cond ((evil-normal-state-p) "#86261c")
|
||||
((evil-visual-state-p) "DarkSlateGray")
|
||||
((evil-insert-state-p) "firebrick")
|
||||
((evil-insert-state-p) "#ff2222")
|
||||
((evil-emacs-state-p) "SeaGreen")
|
||||
((evil-operator-state-p) "SeaGreen")
|
||||
((evil-motion-state-p) "SeaGreen")
|
||||
((evil-replace-state-p) "firebrick"))
|
||||
((evil-replace-state-p) "#ff2222"))
|
||||
(face-background 'mode-line-inactive)))
|
||||
|
||||
(defun branch-tag-bg-color ()
|
||||
@@ -64,15 +64,17 @@ can be used to add a number of spaces to the front and back of the string."
|
||||
((evil-operator-state-p) (format " OPERATOR " ))
|
||||
((evil-motion-state-p) (format " MOTION " ))
|
||||
((evil-replace-state-p) (format " REPLACE " )))))
|
||||
(propertize str 'face `(:height 1.0 :background ,(evil-tag-color) :weight bold))))
|
||||
(propertize
|
||||
str
|
||||
'face `(:height 1.0 :background ,(evil-tag-color) :weight bold))))
|
||||
|
||||
(defun vc-mode-branch-state ()
|
||||
(let ((bufname (buffer-file-name (current-buffer))))
|
||||
(when bufname
|
||||
(when (magit-get-current-branch)
|
||||
(propertize (format " %s " (magit-get-current-branch))
|
||||
'face `(:weight bold :background ,(branch-tag-bg-color)))))))
|
||||
;;(vc-state bufname)))))))
|
||||
(propertize
|
||||
(format " %s " (magit-get-current-branch))
|
||||
'face `(:weight bold :background ,(branch-tag-bg-color)))))))
|
||||
|
||||
(defun powerline-modified ()
|
||||
(let* ((config-alist
|
||||
@@ -83,9 +85,15 @@ can be used to add a number of spaces to the front and back of the string."
|
||||
("%" all-the-icons-octicon-family
|
||||
all-the-icons-octicon "lock" :height 1.2 :v-adjust 0.1)))
|
||||
(result (cdr (assoc (format-mode-line "%*") config-alist))))
|
||||
(let ((res (propertize (apply (cadr result) (cddr result))
|
||||
'face `(:background ,(evil-tag-color) :family ,(funcall (car result))))))
|
||||
(propertize (format " %s" res) 'face `(:background ,(evil-tag-color) :family ,(funcall (car result)))))))
|
||||
(let ((res
|
||||
(propertize
|
||||
(apply (cadr result) (cddr result))
|
||||
'face
|
||||
`(:background ,(evil-tag-color) :family ,(funcall (car result))))))
|
||||
(propertize
|
||||
(format " %s" res)
|
||||
'face
|
||||
`(:background ,(evil-tag-color) :family ,(funcall (car result)))))))
|
||||
|
||||
(defun custom-modeline-mode-icon ()
|
||||
(let ((icon (all-the-icons-icon-for-buffer)))
|
||||
@@ -97,41 +105,48 @@ can be used to add a number of spaces to the front and back of the string."
|
||||
`(:height 1.0 :family ,(all-the-icons-icon-family-for-buffer))
|
||||
'display '(raise 0.0))))))
|
||||
|
||||
(defun powerline-mode-default ()
|
||||
(let ((icon (all-the-icons-icon-for-buffer)))
|
||||
(when (symbolp icon) ;; This implies it's the major mode
|
||||
(propertize
|
||||
(format-mode-line "%m ")
|
||||
'face `(:height 0.8);; :foreground ,(powerline-fg) :background ,(powerline-c1))
|
||||
'display '(raise 0.1)))))
|
||||
|
||||
(defun line-count-line ()
|
||||
(let* ((bg (time-tag-bg-color))
|
||||
(fg (time-tag-fg-color)))
|
||||
(concat (propertize
|
||||
(all-the-icons-faicon "rebel")
|
||||
'face `(:height 0.8 :background ,bg :foreground ,fg) 'display '(raise 0.2))
|
||||
(propertize
|
||||
(format " %%l/%d "
|
||||
(count-lines (point-min) (point-max)))
|
||||
'face `(:background ,bg :foreground ,fg)))))
|
||||
(concat
|
||||
(propertize
|
||||
(all-the-icons-faicon "rebel")
|
||||
'face
|
||||
`(:height 0.8 :background ,bg :foreground ,fg) 'display '(raise 0.2))
|
||||
(propertize
|
||||
(format " %%l/%d "
|
||||
(count-lines (point-min) (point-max)))
|
||||
'face `(:background ,bg :foreground ,fg)))))
|
||||
|
||||
(defun powerline-time ()
|
||||
(let* ((hour (string-to-number (format-time-string "%I")))
|
||||
(icon (all-the-icons-wicon (format "time-%s" hour) :height 1.0 :v-adjust 0.0))
|
||||
(icon (all-the-icons-wicon
|
||||
(format "time-%s" hour) :height 1.0 :v-adjust 0.0))
|
||||
(bg (time-tag-bg-color))
|
||||
(fg (time-tag-fg-color)))
|
||||
(concat
|
||||
(propertize (format-time-string " %H:%M ")
|
||||
'face `(:height 1.0 :background ,bg :foreground ,fg))
|
||||
(propertize (format "%s" icon)
|
||||
'face `(:height 1.0 :family "Weather Icons" :background ,bg :foreground ,fg)
|
||||
'display '(raise -0.0))
|
||||
(propertize " · " 'face `(:height 1.0 :background ,bg :foreground ,fg)))))
|
||||
(propertize
|
||||
(format-time-string " %H:%M ")
|
||||
'face
|
||||
`(:height 1.0 :background ,bg :foreground ,fg))
|
||||
(propertize
|
||||
(format "%s" icon)
|
||||
'face
|
||||
`(:height 1.0 :family "Weather Icons" :background ,bg :foreground ,fg)
|
||||
'display '(raise -0.0))
|
||||
(propertize
|
||||
" · "
|
||||
'face `(:height 1.0 :background ,bg :foreground ,fg)))))
|
||||
|
||||
(defvar separator-left (propertize "" 'face `(:height 1.1 :foreground "#86261c") 'display '(raise -0.0)))
|
||||
(defvar separator-left
|
||||
(propertize
|
||||
""
|
||||
'face `(:height 1.1 :foreground "#86261c") 'display '(raise -0.0)))
|
||||
|
||||
(defvar separator-right (propertize "" 'face `(:height 1.1 :foreground "#86261c") 'display '(raise -0.0)))
|
||||
(defvar separator-right
|
||||
(propertize
|
||||
""
|
||||
'face `(:height 1.1 :foreground "#86261c") 'display '(raise -0.0)))
|
||||
|
||||
(setq-default mode-line-format
|
||||
(list
|
||||
|
||||
Reference in New Issue
Block a user