summaryrefslogtreecommitdiff
path: root/.emacs.d/snippets/apollo-eshell.el
blob: aba141dd06b6deb527730a9e06816c2e7e355c1d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

(defun with-face (str &rest face-plist)
  (propertize str 'face face-plist))

(defun apollo-eshell-prompt ()
  (let ((winter-blue "#3F3B6C")
	(white-summer "#E5E5CB")
	(green-night "#03C988")
	(orange-summer "#FFB100")
	(green-summer "#A3BB98")
	(summer-sea "#2192FF")
	(black "#000000"))
    (concat
     (with-face (concat "[" user-login-name) :foreground orange-summer :background black)
     (with-face "@" :foreground orange-summer :background black)
     (with-face (concat system-name "]\n") :foreground orange-summer :background black)
     (with-face (concat "|" (eshell/pwd) ) :foreground "#F0E9D2" :background winter-blue)
     (with-face (format-time-string " | %H:%M" (current-time)) :background winter-blue :foreground "#888")
     (with-face "\n -> "))))

(setq eshell-prompt-function 'apollo-eshell-prompt)
(setq eshell-highlight-prompt t)