summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--shells.el
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-12-13 23:43:10 -0500
committerbdunahu <bdunahu@operationnull.com>2026-01-03 21:46:06 -0700
commit288ccb3984c7cb46b67d0f6bf7fb6d53c5d7a2d3 (patch)
tree47091f5aeede90e1364546e8122cd55e6d7f2971 /.config/emacs/modules/bd--shells.el
parentdf14036eb22ff9326c2806eb3f8cafc0d3042efa (diff)
guix: full refactor of configuration structure
Diffstat (limited to '.config/emacs/modules/bd--shells.el')
-rw-r--r--.config/emacs/modules/bd--shells.el135
1 files changed, 0 insertions, 135 deletions
diff --git a/.config/emacs/modules/bd--shells.el b/.config/emacs/modules/bd--shells.el
deleted file mode 100644
index 1072694..0000000
--- a/.config/emacs/modules/bd--shells.el
+++ /dev/null
@@ -1,135 +0,0 @@
-;;; -*- lexical-binding: t; -*-
-;;; Commentary:
-;;; Code:
-
-
-(add-to-list 'exec-path "/home/bdunahu/.local/bin")
-
-(use-package vterm
- :config
- (with-eval-after-load "term" (defalias 'term 'vterm))
- ;; use vterm for visual visual commands
- (defun bd/eshell-exec-visual (&rest args)
- "Run the specified PROGRAM in a vterm emulation buffer.
-ARGS are passed to the program. At the moment, no piping of input is
-allowed."
- (let* (eshell-interpreter-alist
- (interp (eshell-find-interpreter (car args) (cdr args)))
- (program (car interp))
- (args (mapconcat #'shell-quote-argument
- (flatten-tree
- (eshell-stringify-list (append (cdr interp)
- (cdr args)))) " "))
- (term-buf
- (generate-new-buffer
- (concat "*" (file-name-nondirectory program) "*")))
- (eshell-buf (current-buffer))
- (vterm-shell (concat (shell-quote-argument
- (file-local-name program))
- " " args)))
- (save-current-buffer
- (switch-to-buffer term-buf)
- (vterm-mode)
- (setq-local eshell-parent-buffer eshell-buf)
- (let ((proc (get-buffer-process term-buf)))
- (if (and proc (eq 'run (process-status proc)))
- (set-process-sentinel proc #'eshell-term-sentinel)
- (error "Failed to invoke visual command")))))
- nil)
- (advice-add #'eshell-exec-visual :override #'bd/eshell-exec-visual))
-
-(use-package esh-module
- :config
- (add-to-list 'eshell-modules-list 'eshell-smart))
-
-(use-package esh-mode
- :config
- (setopt eshell-scroll-to-bottom-on-input 'this))
-
-(use-package em-banner
- :config
- (setopt eshell-banner-message (concat "\n" (propertize " " 'display (create-image (expand-file-name "images/wolf.png" user-emacs-directory) 'png nil :scale 0.8 :align-to "center")) "\n")))
-
-(use-package em-hist
- :config
- (setopt eshell-hist-ignoredups t
- eshell-history-append t))
-
-(use-package em-term
- :config
- (mapc (lambda (x) (add-to-list 'eshell-visual-commands x))
- '(
- "angband"
- "nethack"
- "r2"
- ))
- (setopt eshell-destroy-buffer-when-process-dies t))
-
-(use-package em-unix
- :config
- (setopt eshell-cp-overwrite-files nil
- eshell-mv-overwrite-files nil))
-
-(use-package em-prompt
- :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"))
- (setopt 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))
- :config
- (defun eshell/clear (&optional scrollback)
- "Clear the eshell buffer and output the banner message."
- (interactive)
- (let ((inhibit-read-only t))
- (delete-all-overlays)
- (set-text-properties (point-min) (point-max) nil)
- (erase-buffer)
- (eval eshell-banner-message)))
- (defun eshell/c (&optional scrollback)
- (eshell/clear scrollback))
- (defun eshell/o (file)
- (interactive)
- (find-file file))
- (setopt eshell-buffer-maximum-lines 7500))
-
-
-(use-package shell
- :bind
- (:map shell-mode-map
- ("C-c C-k" . #'comint-clear-buffer))
- :config
- (setopt shell-command-prompt-show-cwd t
- shell-highlight-undef-enable t
- shell-kill-buffer-on-exit t
- comint-prompt-read-only t))
-
-
-(use-package proced
- :defer t
- :hook (proced-mode .
- (lambda ()
- (visual-line-mode -1)
- (toggle-truncate-lines 1)
- (proced-toggle-auto-update 1)))
- :config
- (setopt proced-enable-color-flag t
- proced-tree-flag t
- proced-auto-update-flag 'visible
- proced-auto-update-interval 3
- proced-descend t
- proced-filter 'user))
-
-
-(provide 'bd--shells)
-;;; bd--shells.el ends here