diff options
author | Thanos Apollo <[email protected]> | 2023-01-21 14:12:59 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-01-21 14:12:59 +0200 |
commit | bd1dd4e45548fb8bf1478cac0ace26eb62b8db5c (patch) | |
tree | 58edd6bac129eb95d7e4abbfff40abd5c5de6f3c /.emacs.d/snippets/apollo-eshell.el | |
parent | e89a53edeaa7e4777465726937dc83ea605bd703 (diff) |
eshell: Add custom eshell prompt
Diffstat (limited to '.emacs.d/snippets/apollo-eshell.el')
-rw-r--r-- | .emacs.d/snippets/apollo-eshell.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.emacs.d/snippets/apollo-eshell.el b/.emacs.d/snippets/apollo-eshell.el new file mode 100644 index 0000000..aba141d --- /dev/null +++ b/.emacs.d/snippets/apollo-eshell.el @@ -0,0 +1,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) + |