Selaa lähdekoodia

Show nyan in mode-line

master
10sr 4 vuotta sitten
vanhempi
commit
72b5914725
Allekirjoittanut: 10sr GPG Key ID: 7BEC428194130EB2
1 muutettua tiedostoa jossa 17 lisäystä ja 25 poistoa
  1. +17
    -25
      emacs.el

+ 17
- 25
emacs.el Näytä tiedosto

@@ -787,6 +787,23 @@ THEM are function and its args."
(git-ps1-mode-get-current " [GIT:%s]")))
" "
(:eval (format-time-string display-time-format))))

(when (eval-and-compile (require 'nyan-mode nil t))
(set-variable 'minibuffer-line-format
'((:eval (progn
(list (nyan-create))))))
(defun my-nyan-set-length (&rest _)
"Set `nyan-mode' length to window width."
(set-variable 'nyan-bar-length
(- (frame-parameter nil 'width) 4)))
;; (my-nyan-set-length)
;; (add-hook 'after-init-hook
;; 'my-nyan-set-length)
(add-hook 'window-configuration-change-hook
'my-nyan-set-length)
(add-hook 'switch-buffer-functions
'my-nyan-set-length)
)
(minibuffer-line-mode 1)
)

@@ -820,31 +837,6 @@ THEM are function and its args."
(when f
(abbreviate-file-name f)))))

(when (eval-and-compile (require 'nyan-mode nil t))
(setq-default header-line-format
'(
;; (:eval (file-name-nondirectory(directory-file-name (or buffer-file-name
;; default-directory))))
;; "["
(:eval (progn
(list (nyan-create))))
;; "]"
;; (:eval (let ((f (or (buffer-file-name)
;; default-directory)))
;; (when f
;; (abbreviate-file-name f))))
))
(defun my-nyan-set-length (&rest _)
"Set `nyan-mode' length to window width."
(set-variable 'nyan-bar-length
(- (window-size nil t) 4)
t))
(add-hook 'window-configuration-change-hook
'my-nyan-set-length)
(add-hook 'switch-buffer-functions
'my-nyan-set-length)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; letters, font-lock mode and fonts



Ladataan…
Peruuta
Tallenna