Compare commits
No commits in common. "3294ba546e1db8615af0ec3f4434ea7c07a50fc6" and "150287217404b66a177cb2a8c4819b08016f5fc4" have entirely different histories.
3294ba546e
...
1502872174
40
p11k.el
40
p11k.el
@ -1,8 +1,8 @@
|
||||
;;; p11k.el --- PowerLevel10k prompt for Eshell -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2023 Miranda Marquez
|
||||
;; Copyright (C) 2023 Mitchell Marquez
|
||||
|
||||
;; Author: Miranda Marquez <mirmarq428@gmail.com>
|
||||
;; Author: Mitchell Marquez <dr.m.perseos@gmail.com>
|
||||
;; Keywords: terminals, convenience, faces
|
||||
;; Package-Requires: ((dash) (all-the-icons) (eshell-prompt-extras) (f) (shrink-path))
|
||||
|
||||
@ -242,15 +242,12 @@ Use 'window-width' to calculate the total final width."
|
||||
it) nil)))
|
||||
(branch (--> "git branch"
|
||||
(shell-command-to-string it)
|
||||
(split-string it)
|
||||
(cadr it)
|
||||
;; (split-string it "\n" 'omit-nulls search-whitespace-regexp)
|
||||
;; (if it (progn
|
||||
;; (--filter (string-match-p (rx bol "* " (+ word)) it) it)
|
||||
;; (split-string (car it))
|
||||
;; (cadr it))
|
||||
;; "")
|
||||
))
|
||||
(split-string it "\n" 'omit-nulls search-whitespace-regexp)
|
||||
(if it (progn
|
||||
(--filter (string-match-p (rx bol "* " (+ word)) it) it)
|
||||
(split-string (car it))
|
||||
(cadr it))
|
||||
"")))
|
||||
(modcount (--> status-alist
|
||||
(--map (car it) it)
|
||||
(--count (string-match-p "M" it) it)
|
||||
@ -265,7 +262,7 @@ Use 'window-width' to calculate the total final width."
|
||||
nil))))
|
||||
(p11k/spaced-concat
|
||||
(if (eq p11k/prompt-flow 'fluent) "on" "")
|
||||
(if branch (propertize branch 'face 'p11k/green) "")
|
||||
(propertize branch 'face 'p11k/green)
|
||||
(if modcount (propertize modcount 'face 'p11k/yellow) "")
|
||||
(if untracked (propertize untracked 'face 'p11k/blue) "")))
|
||||
""))
|
||||
@ -303,16 +300,15 @@ Use 'window-width' to calculate the total final width."
|
||||
"Toggle the direction that the prompt points according to `p11k/get-modal-status'."
|
||||
(save-match-data
|
||||
(save-mark-and-excursion
|
||||
(if (re-search-backward eshell-prompt-regexp nil 'no-error)
|
||||
(let ((inhibit-read-only t)
|
||||
(new-caret
|
||||
(p11k/caret-color-status
|
||||
eshell-last-command-status)))
|
||||
(goto-char (point-max))
|
||||
(re-search-backward eshell-prompt-regexp)
|
||||
(goto-char (point-at-bol))
|
||||
(delete-forward-char 1)
|
||||
(insert new-caret)))
|
||||
(let ((inhibit-read-only t)
|
||||
(new-caret
|
||||
(p11k/caret-color-status
|
||||
eshell-last-command-status)))
|
||||
(goto-char (point-max))
|
||||
(re-search-backward eshell-prompt-regexp)
|
||||
(goto-char (point-at-bol))
|
||||
(delete-forward-char 1)
|
||||
(insert new-caret))
|
||||
)))
|
||||
|
||||
(defun p11k/esh-transient-prompt ()
|
||||
|
Loading…
Reference in New Issue
Block a user