diff options
-rw-r--r-- | .config/emacs/modules/bd--erc.el | 2 | ||||
-rw-r--r-- | .config/emacs/modules/bd--shells.el | 112 | ||||
-rw-r--r-- | .config/emacs/modules/bd--themes.el | 3 |
3 files changed, 68 insertions, 49 deletions
diff --git a/.config/emacs/modules/bd--erc.el b/.config/emacs/modules/bd--erc.el index 57bb9fc..1544932 100644 --- a/.config/emacs/modules/bd--erc.el +++ b/.config/emacs/modules/bd--erc.el @@ -5,7 +5,6 @@ (with-eval-after-load "erc" (defalias 'erc 'erc-tls)) (use-package erc - :hook abbrev-mode :defer t :custom (erc-lurker-threshold-time 3600) @@ -21,6 +20,7 @@ :config (define-abbrev erc-mode-abbrev-table "pu" ",pounce") (erc-autojoin-mode -1) + ;; for tab-bar (defvar-local bd/erc-status '(:eval erc-modified-channels-object)) diff --git a/.config/emacs/modules/bd--shells.el b/.config/emacs/modules/bd--shells.el index 0bc41e2..1f31e70 100644 --- a/.config/emacs/modules/bd--shells.el +++ b/.config/emacs/modules/bd--shells.el @@ -3,59 +3,77 @@ ;;; Code: -;;;; term (with-eval-after-load "term" (defalias 'term 'ansi-term)) -;;;; eshell -;; path (add-to-list 'exec-path "/home/bdunahu/.local/bin") -;; completions -(require 'esh-mode) -(keymap-set eshell-mode-map "<tab>" 'completion-at-point) -(setopt eshell-prompt-function 'bd/eshell-prompt - eshell-prompt-regexp "^> " - eshell-scroll-to-bottom-on-input 'this - eshell-banner-message (concat "\n" (propertize " " 'display (create-image (expand-file-name "~/.config/emacs/images/raven.png") 'png nil :scale 0.8 :align-to "center")) "\n")) - -;; prompt -(defun bd/get-prompt-path () - (abbreviate-file-name (eshell/pwd))) - -(defun bd/eshell-prompt () - "Return a prettified shell prompt." - (concat - "\n" - (propertize (system-name) 'face `(:foreground ,(ef-themes-get-color-value 'yellow-warmer))) - (propertize (format " %s" (bd/get-prompt-path)) 'face `(:foreground ,(ef-themes-get-color-value 'blue-warmer))) - (propertize (format-time-string " %a, %R") 'face `(:foreground ,(ef-themes-get-color-value 'blue-faint))) - (propertize "\n> " 'face `(:foreground ,(ef-themes-get-color-value 'red))))) - -(defun eshell/clear (&optional scrollback) - "Override of default function. Scroll contents of eshell window + +(use-package esh-mode + :custom + (eshell-scroll-to-bottom-on-input 'this)) + +(use-package em-banner + :custom + (eshell-banner-message (concat "\n" (propertize " " 'display (create-image (expand-file-name "~/.config/emacs/images/raven.png") 'png nil :scale 0.8 :align-to "center")) "\n"))) + +(require 'ef-themes) +(use-package em-prompt + :hook + ((ef-themes-post-load + . (lambda () + (ef-themes-with-colors + (set-face-attribute 'eshell-prompt nil + :foreground fg-main + :background bg-alt + :height 1.1 + :extend t))))) + :config + (defun bd/get-prompt-path () + (abbreviate-file-name (eshell/pwd))) + (defun bd/eshell-prompt () + "Return a prettified shell prompt." + (concat + (system-name) + (format " %s" (bd/get-prompt-path)) + " >\n")) + :custom + (eshell-prompt-function 'bd/eshell-prompt) + (eshell-prompt-regexp (rx bol (eval (system-name)) (one-or-more anything) " >\n"))) + +(use-package eshell + :bind + (:map eshell-mode-map + ("<tab>" . #'completion-at-point) + ("C-l" . #'eshell/clear)) + :config + (defun eshell/clear (&optional scrollback) + "Override of default function. Scroll contents of eshell window out of sight, leaving a blank window. If SCROLLBACK is non-nil, clear the scrollback contents. Outputs banner message." - (interactive) - (if scrollback - (eshell/clear-scrollback) - (let ((eshell-input-filter-functions nil)) - (insert (make-string (window-size) ?\n)) - (eshell-send-input) - (unless eshell-non-interactive-p - (eval eshell-banner-message))))) - -(defun eshell/open (file) - (interactive) - (find-file file)) - - -;;;; shell -(require 'shell) -(keymap-set shell-mode-map "C-c C-k" #'comint-clear-buffer) -(setopt shell-command-prompt-show-cwd t - shell-highlight-undef-enable t - shell-kill-buffer-on-exit t - comint-prompt-read-only t) + (interactive) + (if scrollback + (eshell/clear-scrollback) + (let ((eshell-input-filter-functions nil)) + (insert (make-string (window-size) ?\n)) + (eshell-send-input) + (unless eshell-non-interactive-p + (eval eshell-banner-message))))) + (defun eshell/open (file) + (interactive) + (find-file file)) + :custom + (eshell-buffer-maximum-lines 7500)) + + +(use-package shell + :bind + (:map shell-mode-map + ("C-c C-k" . #'comint-clear-buffer)) + :custom + (shell-command-prompt-show-cwd t) + (shell-highlight-undef-enable t) + (shell-kill-buffer-on-exit t) + (comint-prompt-read-only t)) (provide 'bd--shells) diff --git a/.config/emacs/modules/bd--themes.el b/.config/emacs/modules/bd--themes.el index 135f77c..5aabb30 100644 --- a/.config/emacs/modules/bd--themes.el +++ b/.config/emacs/modules/bd--themes.el @@ -49,7 +49,7 @@ to.") (ef-themes-to-toggle '(ef-autumn ef-frost)) (ef-themes-common-palette-overrides '((bg-dim bg-main) - (bg-alt bg-main) + (bg-alt bg-inactive) (bg-tab-bar bg-main) (bg-tab-current bg-mode-line) (bg-tab-other bg-inactive))) @@ -59,6 +59,7 @@ to.") '((bg-main "#000000")))) (load-theme 'ef-winter :no-confirm) +(run-hooks 'ef-themes-post-load-hook) (provide 'bd--themes) |