aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/elisp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-06-22 02:26:08 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-06-22 02:26:08 +0100
commita89353eeb8727e31baa6093817be37583a34c41e (patch)
tree8267afbbd58d20cad7a330fb7a67393b998cd13e /Emacs/.config/emacs/elisp
parent3ef303fb670303571999aa5b9765ea91ad02ce56 (diff)
downloaddotfiles-a89353eeb8727e31baa6093817be37583a34c41e.tar.gz
dotfiles-a89353eeb8727e31baa6093817be37583a34c41e.tar.bz2
dotfiles-a89353eeb8727e31baa6093817be37583a34c41e.zip
Tons of changes
Diffstat (limited to 'Emacs/.config/emacs/elisp')
-rw-r--r--Emacs/.config/emacs/elisp/eshell-additions.el25
-rw-r--r--Emacs/.config/emacs/elisp/personal-primary-theme.el14
-rw-r--r--Emacs/.config/emacs/elisp/search.el6
3 files changed, 40 insertions, 5 deletions
diff --git a/Emacs/.config/emacs/elisp/eshell-additions.el b/Emacs/.config/emacs/elisp/eshell-additions.el
index 94c948f..d56dc99 100644
--- a/Emacs/.config/emacs/elisp/eshell-additions.el
+++ b/Emacs/.config/emacs/elisp/eshell-additions.el
@@ -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
diff --git a/Emacs/.config/emacs/elisp/personal-primary-theme.el b/Emacs/.config/emacs/elisp/personal-primary-theme.el
index 22a1faa..d3aa22f 100644
--- a/Emacs/.config/emacs/elisp/personal-primary-theme.el
+++ b/Emacs/.config/emacs/elisp/personal-primary-theme.el
@@ -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"))
diff --git a/Emacs/.config/emacs/elisp/search.el b/Emacs/.config/emacs/elisp/search.el
index 922d9a6..4b0097c 100644
--- a/Emacs/.config/emacs/elisp/search.el
+++ b/Emacs/.config/emacs/elisp/search.el
@@ -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)