refactor: Move Emacs config from system/ to projects/dotemacs/

- Delete deprecated system/ configuration files
- Update projects/dotemacs/modules/ with reorganized config
- Add .opencode/ directory for agent state
- Clean up attachments and unused documentation files
This commit is contained in:
2026-04-25 18:41:20 -04:00
parent 43c225a4b5
commit cc6c552d5a
75 changed files with 3263 additions and 5545 deletions

View File

@@ -1,18 +1,86 @@
#+TITLE: Emacs Shell Configuration
#+property: header-args :tangle ~/.emacs.d/modules/shell.el
#+TITLE: Shell Configuration
#+PROPERTY: header-args :tangle yes
* Shell
** Bash completion
* Bash Completion
#+begin_src elisp
(use-package bash-completion
:config
(require 'bash-completion)
(bash-completion-setup)
)
(defvar shell-dynamic-complete-functions t)
#+end_src
* Frame Management
#+begin_src elisp
(add-hook 'server-done-hook (lambda () (delete-frame)))
(defvar shell-dynamic-complete-functions t)
#+end_src
** Eshell
Add programmable bash completion to Emacs shell-mode
#+begin_src elisp :tangle yes
(require 'bash-completion)
(add-hook 'eshell-mode-hook
(lambda ()
(add-hook 'completion-at-point-functions
'bash-completion-capf-nonexclusive nil t
)
)
)
#+end_src
Use colors in eshell
#+begin_src elisp :tangle yes
(use-package xterm-color
:commands (xterm-color-filter)
)
(use-package eshell
:after xterm-color
:config
(define-key eshell-hist-mode-map (kbd "M-r") #'consult-history)
(add-hook 'eshell-mode-hook
(lambda ()
(setenv "TERM" "xterm-256color")))
(add-hook 'eshell-before-prompt-hook (setq xterm-color-preserve-properties t))
(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq eshell-output-filter-functions
(remove 'eshell-handle-ansi-color eshell-output-filter-functions)
)
)
#+end_src
Eshell completion
#+begin_src elisp :tangle yes
(add-hook 'eshell-mode-hook
(lambda ()
(add-hook 'completion-at-point-functions
'bash-completion-capf-nonexclusive nil t)))
#+end_src
Emulate A Terminal (EAT)
#+begin_src elisp :tangle yes
(use-package eat
:config
;; For `eat-eshell-mode'.
(add-hook 'eshell-load-hook #'eat-eshell-mode)
;; For `eat-eshell-visual-command-mode'.
(add-hook 'eshell-load-hook #'eat-eshell-visual-command-mode)
)
#+end_src
* Server Actuation (Bash Integration)
Ensure that emacsclient always opens in a GUI frame by default when called from the shell.
#+begin_src bash :tangle ~/.bash_aliases
# Use emacsclient to open files in the GUI, starting daemon if needed
alias em="emacsclient -c -a ''"
# Set emacsclient as the default editor
export EDITOR="emacsclient -c -a ''"
export VISUAL="emacsclient -c -a ''"
#+end_src