Tons of changes

This commit is contained in:
2024-06-22 02:26:08 +01:00
parent 3ef303fb67
commit a89353eeb8
9 changed files with 209 additions and 90 deletions

View File

@@ -53,5 +53,30 @@
(eshell/cd dir)
(eshell-send-input))))
(defun +eshell/--current-instances ()
(cl-loop for buffer being the buffers
if (with-current-buffer buffer
(eq major-mode 'eshell-mode))
collect
(cons (buffer-name buffer) buffer)))
(defun +eshell/open (&optional ARG)
"If no arg is given, run EShell as per usual.
If an arg is given, then interactively open a new Eshell instance
or a currently opened one, naming it in the process."
(interactive "P")
(if (null ARG)
(eshell)
(let* ((current-instances (+eshell/--current-instances))
(answer (completing-read "Enter name: " (mapcar #'car current-instances)))
(result (assoc answer current-instances)))
(cond
(result (switch-to-buffer (cdr result)))
((not (string= answer ""))
(let ((eshell-buffer-name (format "*%s-eshell*" answer)))
(eshell)))
(t
(eshell))))))
(provide 'eshell-additions)
;;; eshell-additions.el ends here

View File

@@ -51,8 +51,8 @@
'(link-visited ((t (:foreground "violet" :inherit (link)))))
'(match ((t (:background "RoyalBlue3"))))
'(minibuffer-prompt ((t (:foreground "cyan"))))
'(mode-line ((t (:box t :foreground "LightSkyBlue" :background "black"))))
'(mode-line-inactive ((t (:box nil :weight light :foreground "CadetBlue" :background "grey7"))))
'(mode-line ((t (:box t :foreground "LightSkyBlue" :background "black" :inherit (default)))))
'(mode-line-inactive ((t (:box nil :weight light :foreground "CadetBlue" :background "grey7" :inherit (default)))))
'(mode-line-buffer-id ((t (:weight bold))))
'(mode-line-emphasis ((t (:weight bold))))
'(next-error ((t (:inherit (region)))))
@@ -67,6 +67,16 @@
'(pdf-isearch-batch ((t (:foreground "black" :background "white"))))
'(query-replace ((t (:inherit (isearch)))))
'(region ((t (:extend t :background "grey25"))))
'(rainbow-delimiters-depth-1-face ((t (:extend t :foreground "red"))))
'(rainbow-delimiters-depth-2-face ((t (:extend t :foreground "darkorange"))))
'(rainbow-delimiters-depth-3-face ((t (:extend t :foreground "yellow"))))
'(rainbow-delimiters-depth-4-face ((t (:extend t :foreground "green"))))
'(rainbow-delimiters-depth-5-face ((t (:extend t :foreground "DeepSkyBlue"))))
'(rainbow-delimiters-depth-6-face ((t (:extend t :foreground "purple"))))
'(rainbow-delimiters-depth-7-face ((t (:extend t :foreground "violet"))))
'(rainbow-delimiters-mismatched-face ((t (:extend t :foreground "white" :background "red1"))))
'(rainbow-delimiters-unmatched-face ((t (:inherit rainbow-delimiters-mismatched-face))))
'(rainbow-delimiters-base-error-face ((t (:inherit rainbow-delimiters-mismatched-face))))
'(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50"))
(((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70"))
(((class color) (min-colors 8) (background light)) (:foreground "green"))

View File

@@ -42,7 +42,8 @@ Returns a list of files with the directory preprended to them."
names)))
(defun +search/get-all-candidates ()
(string-join
(cl-reduce
#'(lambda (x y) (append x y))
(mapcar #'(lambda (directory)
(+search/get-candidates (expand-file-name directory)))
+search/directories)))
@@ -58,8 +59,7 @@ Returns a list of files with the directory preprended to them."
(string-join
(mapcar
#'(lambda (x) (concat "\"" x "\""))
(cl-remove-if #'directory-name-p (+search/get-all-candidates)))
" "))
(cl-remove-if #'directory-name-p (+search/get-all-candidates)))))
(defun +search/search-all ()
(interactive)