summaryrefslogtreecommitdiff
path: root/config.org
diff options
context:
space:
mode:
Diffstat (limited to 'config.org')
-rw-r--r--config.org736
1 files changed, 113 insertions, 623 deletions
diff --git a/config.org b/config.org
index 0726825..9ab8584 100644
--- a/config.org
+++ b/config.org
@@ -2,7 +2,6 @@
#+date: [2025-10-20 Mon 08:33]
#+identifier: 20251020T083323
#+PROPERTY: header-args :tangle config.el
-#+STARTUP: content
* early-init
@@ -32,59 +31,6 @@
(setq kept-old-versions 5)
#+end_src
-* daemon
-
-#+begin_src emacs-lisp
-;;; Daemon detection — determines which daemon we're running as.
-;;; Start Emacs with: emacs --fg-daemon=hub (persistent: IRC, mail, agenda)
-;;; emacs --fg-daemon=work (restartable: code, projects)
-;;; emacs (standalone, loads everything)
-
-(defvar my/daemon-name
- (let ((d (daemonp)))
- (cond
- ((stringp d) d) ; named daemon: "hub" or "work"
- (d "work") ; unnamed daemon (--daemon without name) → treat as work
- (t nil))) ; standalone emacs
- "Name of the current Emacs daemon, or nil for standalone.")
-
-(defun my/hub-p ()
- "Return non-nil when running as the hub daemon."
- (equal my/daemon-name "hub"))
-
-(defun my/work-p ()
- "Return non-nil when running as the work daemon."
- (equal my/daemon-name "work"))
-
-(defun my/standalone-p ()
- "Return non-nil when running standalone (not as daemon)."
- (null my/daemon-name))
-
-(defun my/load-for-hub-p ()
- "Return non-nil if hub packages should be loaded (hub or standalone)."
- (or (my/hub-p) (my/standalone-p)))
-
-(defun my/load-for-work-p ()
- "Return non-nil if work packages should be loaded (work or standalone)."
- (or (my/work-p) (my/standalone-p)))
-
-;; Per-daemon state files to avoid conflicts between hub and work daemons
-(when my/daemon-name
- (let ((suffix (concat "-" my/daemon-name)))
- (setq recentf-save-file
- (expand-file-name (concat "recentf" suffix ".eld") user-emacs-directory))
- (setq savehist-file
- (expand-file-name (concat "savehist" suffix ".el") user-emacs-directory))
- (setq save-place-file
- (expand-file-name (concat "places" suffix ".eld") user-emacs-directory))
- (setq bookmark-default-file
- (expand-file-name (concat "bookmarks" suffix ".eld") user-emacs-directory))
- (setq projectile-known-projects-file
- (expand-file-name (concat "projectile-bookmarks" suffix ".eld") user-emacs-directory))
- (setq org-clock-persist-file
- (expand-file-name (concat "org-clock-save" suffix ".el") user-emacs-directory))))
-#+end_src
-
* emacs
#+begin_src emacs-lisp
@@ -167,6 +113,7 @@
;; (set-frame-parameter (selected-frame) 'alpha-background 80)
;; (add-to-list 'default-frame-alist '(alpha-background . 80))
(global-hl-line-mode 1) ;; Highlight the current line
+ (add-hook 'org-mode-hook (lambda () (setq-local global-hl-line-mode nil))) ;; hl-line repaints wipe kitty-graphics scaled headings
(global-auto-revert-mode 1) ;; Enable global auto-revert mode to keep buffers up to date with their corresponding files.
(setq-default indent-tabs-mode nil)
(recentf-mode 1) ;; Enable tracking of recently opened files.
@@ -203,34 +150,44 @@
:group 'appearance)
#+end_src
-* wayland clipboard fix
+* window
#+begin_src emacs-lisp
-;; (setq wl-copy-process nil)
-;; (defun wl-copy (text)
-;; (setq wl-copy-process (make-process :name "wl-copy"
-;; :buffer nil
-;; :command '("wl-copy" "-f" "-n")
-;; :connection-type 'pipe
-;; :noquery t))
-;; (process-send-string wl-copy-process text)
-;; (process-send-eof wl-copy-process))
-;; (defun wl-paste ()
-;; (if (and wl-copy-process (process-live-p wl-copy-process))
-;; nil ; should return nil if we're the current paste owner
-;; (shell-command-to-string "wl-paste -n | tr -d \r")))
-;; (setq interprogram-cut-function 'wl-copy)
-;; (setq interprogram-paste-function 'wl-paste)
-#+end_src
+(defun my/compilation-buffer-p (buffer-name _action)
+ "Match any compilation-derived buffer (compile, grep, …) for display."
+ (with-current-buffer buffer-name
+ (derived-mode-p 'compilation-mode)))
-* window
+(defun my/compile-or-recompile ()
+ "Recompile with the last command if a compilation ran before, else prompt."
+ (interactive)
+ (if (get-buffer "*compilation*")
+ (recompile)
+ (call-interactively #'compile)))
+
+(defun my/focus-async-shell-window (window)
+ "Focus the async-shell window and make q bury it without killing the process."
+ (select-window window)
+ (with-current-buffer (window-buffer window)
+ (evil-local-set-key 'normal (kbd "q") #'quit-window)
+ (evil-local-set-key 'motion (kbd "q") #'quit-window)
+ (evil-normal-state)))
-#+begin_src emacs-lisp
(use-package window
:ensure nil
:custom
(display-buffer-alist
'(
+ (my/compilation-buffer-p
+ (display-buffer-reuse-window display-buffer-below-selected)
+ (window-height . 0.3)
+ (body-function . select-window))
+
+ ("\\*Async Shell Command\\*"
+ (display-buffer-reuse-window display-buffer-below-selected)
+ (window-height . 0.3)
+ (body-function . my/focus-async-shell-window))
+
("\\*\\(Backtrace\\|Warnings\\|Compile-Log\\|[Hh]elp\\|Messages\\|Bookmark List\\|Occur\\)\\*"
(display-buffer-in-side-window)
(window-height . 0.25)
@@ -515,31 +472,9 @@ Temporarily disables notifications during the fetch."
"M-n" 'erc-track-switch-buffer
"C-k" 'erc-previous-command
"C-j" 'erc-next-command)))
-
-;; Auto-start ERC in hub daemon on first frame
-(when (my/hub-p)
- (defun my/hub-auto-start-erc (&optional _frame)
- "Auto-connect ERC when first hub frame is created."
- (run-irc)
- (remove-hook 'server-after-make-frame-hook #'my/hub-auto-start-erc))
- (add-hook 'server-after-make-frame-hook #'my/hub-auto-start-erc))
-#+end_src
-
-* lambda-themes
-
-#+begin_src emacs-lisp
-;; (use-package lambda-themes
-;; :ensure (:host github :repo "lambda-emacs/lambda-themes")
-;; :custom
-;; (lambda-themes-set-italic-comments t)
-;; (lambda-themes-set-italic-keywords t)
-;; (lambda-themes-set-variable-pitch t)
-;; (lambda-themes-set-theme 'light)
-;; :config
-;; (load-theme 'lambda-light))
#+end_src
-* TODO centered cursor
+* TODO centered cursors
#+begin_src emacs-lisp
(defvar my/centered-cursor-enabled nil)
@@ -628,18 +563,23 @@ Temporarily disables notifications during the fetch."
* clipetty
+Only =y= (evil-yank) reaches the system clipboard; deletes (=d=, =x=, =c=) and word kills (M-DEL, C-w in insert) stay in the kill-ring only. Clipetty's global mode would sync every kill via OSC 52, so instead the OSC 52 escape is emitted explicitly after each yank.
+
#+begin_src emacs-lisp
(use-package clipetty
:ensure t
- :hook (after-init . global-clipetty-mode))
-#+end_src
-
-** kkp.el
-
-#+begin_src emacs-lisp
-;; (use-package kkp
-;; :ensure t
-;; :hook (tty-setup . global-kkp-mode))
+ :after evil
+ :config
+ (setq interprogram-cut-function nil)
+ (defun my/evil-yank-to-clipboard (_beg _end &optional _type register _yank-handler)
+ (when (and (not register)
+ (memq this-command '(evil-yank evil-yank-line)))
+ (let ((text (car kill-ring)))
+ (when (stringp text)
+ (if (display-graphic-p)
+ (gui-select-text text)
+ (clipetty-cut #'ignore text))))))
+ (advice-add 'evil-yank :after #'my/evil-yank-to-clipboard))
#+end_src
* isearch
@@ -909,98 +849,6 @@ Defined early so later =with-eval-after-load 'general= callbacks find =my-leader
(markdown-header-face-6 ((t (:height 1.05 :foreground "#5e81ac" :weight semi-bold :inherit markdown-header-face)))))
#+end_src
-** eca /(editor code assistant)/
-
-# Temporarily disabled while testing claude-code-ide — remove :tangle no to re-enable.
-#+begin_src emacs-lisp :tangle no
-(use-package eca
- :ensure (:host github :repo "editor-code-assistant/eca-emacs"
- :files ("*.el"))
- :defer t
- :custom
- ;; Chat window
- (eca-chat-window-side 'left)
- (eca-chat-window-width 0.35)
- (eca-chat-use-side-window t)
- (eca-chat-focus-on-open t)
- (eca-chat-tab-line t)
-
- ;; Diff tools
- (eca-chat-diff-tool 'ediff)
- (eca-rewrite-diff-tool 'ediff)
-
- ;; Context
- (eca-chat-auto-add-cursor t)
- (eca-chat-auto-add-repomap t)
- (eca-chat-custom-model nil)
-
- ;; UI
- (eca-chat-shrink-called-tools t)
- (eca-chat-expand-pending-approval-tools t)
- (eca-chat-table-beautify t)
- (eca-buttons-allow-mouse t)
-
- :config
- ;; Disable corfu auto-popup in chat buffers (TAB-only completion)
- (add-hook 'eca-chat-mode-hook
- (lambda ()
- (setq-local corfu-auto nil)))
-
- ;; Evil mode integration
- (with-eval-after-load 'evil
- ;; Chat opens in normal state; press i to type in prompt
- (evil-set-initial-state 'eca-chat-mode 'normal)
- (evil-set-initial-state 'eca-mcp-details-mode 'normal))
-
- ;; Keybindings via general with which-key labels
- (with-eval-after-load 'general
- ;; Normal state bindings in chat buffer
- (general-def 'normal eca-chat-mode-map
- "RET" '(eca-chat-send-prompt-at-chat :wk "send prompt")
- "q" '(eca-chat-toggle-window :wk "close chat")
- "C-l" '(eca-chat-clear :wk "clear chat")
- ;; g-prefix: chat navigation/management
- "gr" '(eca-chat-repeat-prompt :wk "repeat prompt")
- "gn" '(eca-chat-new :wk "new chat")
- "gs" '(eca-chat-select :wk "select chat")
- "gm" '(eca-chat-select-model :wk "select model")
- "gv" '(eca-chat-select-variant :wk "select variant")
- "ga" '(eca-chat-select-agent :wk "select agent")
- "gc" '(eca-chat-cycle-agent :wk "cycle agent")
- ;; bracket navigation
- "[[" '(eca-chat-go-to-prev-user-message :wk "prev message")
- "]]" '(eca-chat-go-to-next-user-message :wk "next message")
- "[b" '(eca-chat-go-to-prev-expandable-block :wk "prev block")
- "]b" '(eca-chat-go-to-next-expandable-block :wk "next block")
- "TAB" '(eca-chat-toggle-expandable-block :wk "toggle block")
- "zR" '(eca-chat-expand-all-blocks :wk "expand all")
- "zM" '(eca-chat-collapse-all-blocks :wk "collapse all"))
-
- ;; C-c prefix in normal state — labeled group
- (general-def 'normal eca-chat-mode-map
- "C-c" '(:ignore t :wk "eca")
- "C-c a" '(eca-chat-tool-call-accept-all :wk "accept all tools")
- "C-c A" '(eca-chat-tool-call-accept-all-and-remember :wk "accept & remember")
- "C-c c" '(eca-chat-stop-prompt :wk "stop")
- "C-c s" '(eca-chat-save-to-file :wk "save chat")
- "C-c r" '(eca-chat-rename :wk "rename chat")
- "C-c ." '(eca-transient-menu :wk "transient menu")
- "C-c ," '(eca-mcp-details :wk "mcp details"))
-
- ;; Insert state bindings
- (general-def 'insert eca-chat-mode-map
- "S-<return>" '(newline :wk "newline")
- "C-<up>" '(eca-chat-repeat-prompt :wk "repeat prompt")
- "C-c c" '(eca-chat-stop-prompt :wk "stop")
- "C-c a" '(eca-chat-tool-call-accept-all :wk "accept all tools")
- "C-c ." '(eca-transient-menu :wk "transient menu"))
-
- ;; MCP details buffer
- (general-def 'normal eca-mcp-details-mode-map
- "q" '(quit-window :wk "close")
- "C-c ." '(eca-transient-menu :wk "transient menu"))))
-#+end_src
-
** claude-code-ide
Native [[https://github.com/manzaltu/claude-code-ide.el][Claude Code IDE]] integration via MCP. Requires the =claude= CLI in
@@ -1132,16 +980,6 @@ terminal backend.
#+end_src
-** eldoc-box
-
-#+begin_src emacs-lisp
-;; (use-package eldoc-box
-;; :ensure t
-;; :config
-;; ;; (setq eldoc-box-at-point-position-function #'eldoc-box--default-at-point-position-function)
-;; (setq eldoc-box-help-at-point-mode t))
-#+end_src
-
* flymake
#+begin_src emacs-lisp
@@ -1334,25 +1172,6 @@ automatically encrypted before save and can be decrypted in-place with
#+begin_src emacs-lisp
#+end_src
-** render-org
-
-TUI-first beautiful rendering for org-mode (replaces org-modern).
-
-#+begin_src emacs-lisp
-;; (add-to-list 'load-path "~/render-org.el")
-;; (require 'render-org)
-;; (add-hook 'org-mode-hook #'render-org-mode)
-
-;; ;; Markdown support
-;; (require 'render-markdown)
-;; (add-hook 'markdown-mode-hook #'render-markdown-mode)
-
-;; ;; SVG scaled headings via kitty-graphics
-;; (setq render-org-heading-gfx-enabled 'nil)
-;; ;; (setq render-org-heading-gfx-scales '(1.25 1.15 1.05 1.0 1.0 1.0))
-;; ;; (setq render-org-heading-gfx-font-family "MapleMono NF")
-#+end_src
-
** kitty-graphics
Display inline images in terminal Emacs via the Kitty graphics protocol.
@@ -1361,11 +1180,10 @@ Only activates when running in a Kitty terminal (not in GUI Emacs).
#+begin_src emacs-lisp
(use-package kitty-graphics
:ensure nil
- :load-path "/home/cashmere/projects/kitty-graphics"
+ :load-path "/home/cashmere/projects/kgfx-wt-bugsweep"
:demand t
:custom
(kitty-gfx-enable-video t)
- (kitty-gfx-debug nil)
(kitty-gfx-shr-scale 'fit)
(kitty-gfx-shr-fit-width 0.6)
(kitty-gfx-shr-fit-height 20)
@@ -1463,44 +1281,6 @@ Old config
:after org)
#+end_src
-** emacs-jupyter
-
-Jupyter kernels in org-babel. =#+begin_src jupyter-python :session foo=
-gibt persistente Python REPL, inline plots, async, completion.
-
-Braucht system-side: =python3= mit =ipykernel jupyter-client pyzmq= +
-=jupyter= CLI (siehe nix flake systems/md).
-
-=emacs-zmq= wird beim ersten Laden native gebaut.
-
-#+begin_src emacs-lisp
-(use-package jupyter
- :ensure t
- :defer t
- :commands (jupyter-run-repl jupyter-connect-repl)
- :init
- ;; lazy: kein :after org, kein emacs-zmq native build beim startup.
- ;; jupyter laedt erst wenn ein jupyter-* src block ausgefuehrt wird.
- (with-eval-after-load 'org
- (setq org-babel-default-header-args:jupyter-python
- '((:async . "yes")
- (:session . "py")
- (:kernel . "python3")
- (:results . "raw drawer")))
- (advice-add 'org-babel-get-src-block-info :around
- (lambda (orig &rest a)
- (let ((info (apply orig a)))
- (when (and info
- (stringp (nth 0 info))
- (string-prefix-p "jupyter-" (nth 0 info))
- (not (featurep 'jupyter)))
- (require 'jupyter)
- (org-babel-do-load-languages
- 'org-babel-load-languages
- (append org-babel-load-languages '((jupyter . t)))))
- info)))))
-#+end_src
-
** ob-just
Org-babel support for justfile source blocks. Writes the block body to a
@@ -1882,52 +1662,8 @@ Skips capture tasks and projects."
#+end_src
-** notation
-
-*** org-noter
-
-#+begin_src emacs-lisp
-(use-package org-noter
- :ensure t
- :defer t)
-#+end_src
-
-*** nov.el
-
-#+begin_src emacs-lisp
-(use-package nov
- :ensure t
- :mode ("\\.epub\\'" . nov-mode))
-#+end_src
-
* org-capture
-*** yequake
-
-#+begin_src emacs-lisp
-(use-package yequake
- :ensure t
- :custom
- (yequake-frames
- '(("org-capture"
- (buffer-fns . (yequake-org-capture))
- (width . 0.75)
- (height . 0.5)
- (frame-parameters . ((name . "org-capture")
- (undecorated . t)
- (skip-taskbar . t)
- (sticky . t))))
- ("emacs-everywhere"
- (buffer-fns . (emacs-everywhere))
- (width . 0.75)
- (height . 0.5)
- (frame-parameters . ((name . "emacs-everywhere")
- (undecorated . t)
- (skip-taskbar . t)
- (sticky . t)))))))
-#+end_src
-
-
*** org-capture combined with denote
#+begin_src emacs-lisp
@@ -2817,16 +2553,6 @@ Timers that expired while Emacs was closed fire immediately."
(corfu-popupinfo-mode))
#+end_src
-On Emacs 32 + a multi-TTY daemon (every ~Super+Return~ spawns =kitty emacsclient -nw -c=), the native tty child-frame popup tries to open a tty device for a closed client (~Could not open file: /dev/pts/N~) and spams the backtrace. =corfu-terminal= renders the popup as an overlay instead, so no frame and no device is ever opened.
-
-#+begin_src emacs-lisp
-(use-package corfu-terminal
- :ensure t
- :after corfu
- :config
- (corfu-terminal-mode +1))
-#+end_src
-
*** cape
#+begin_src emacs-lisp
@@ -2887,23 +2613,6 @@ On Emacs 32 + a multi-TTY daemon (every ~Super+Return~ spawns =kitty emacsclient
markdown-mode moved before eca — see section before eca block
#+end_comment
-* treesit-auto
-
-ensures that every available tree sitter is downloaded and set up for you.
-
-#+begin_src emacs-lisp
-;; (use-package treesit-auto
-;; :ensure t
-;; :defer t
-;; :custom
-;; (treesit-auto-install 'prompt)
-;; :init
-;; (delete 'org treesit-auto-langs)
-;; :config
-;; (treesit-auto-add-to-auto-mode-alist 'all)
-;; (global-treesit-auto-mode t))
-#+end_src
-
* embark
#+begin_src emacs-lisp
@@ -2981,20 +2690,6 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi
'(:inlayhintprovider :documenthighlightprovider)))
#+end_src
-*** settings
-
-#+begin_src emacs-lisp
-#+end_src
-
-*** eglot booster
-
-#+begin_src emacs-lisp
-;; (use-package eglot-booster
-;; :ensure (:repo "https://github.com/jdtsmith/eglot-booster")
-;; :after eglot
-;; :config (eglot-booster-mode))
-#+end_src
-
** typst-mode
#+begin_src emacs-lisp
@@ -3073,18 +2768,6 @@ Because I have to and not want to.
(pyvenv-mode 1))))
#+end_src
-** elm-mode
-
-#+begin_src emacs-lisp
-;; (use-package elm-mode
-;; :ensure t
-;; :mode "\\.elm\\'"
-;; :hook (elm-mode . eglot-ensure)
-;; :config
-;; (with-eval-after-load 'eglot-server-programs
-;; '(elm-mode . ("elm-language-server"))))
-#+end_src
-
** Rust mode
ily <3.
@@ -3102,19 +2785,6 @@ ily <3.
(:check (:command "clippy")))))))
#+end_src
-*** Rustic
-
-#+begin_src emacs-lisp
-;; (use-package rustic
-;; :ensure t
-;; :config
-;; (setq rustic-format-on-save nil)
-;; (setq rustic-lsp-client nil)
-;; :custom
-;; (rustic-cargo-use-last-stored-arguments t))
-#+end_src
-
-
** JavaScript / TypeScript / Vue
JavaScript and TypeScript support via tree-sitter modes and [[https://github.com/joaotavora/rassumfrassum][rassumfrassum]]. The =rass tslint= preset multiplexes =typescript-language-server= + =eslint=.
@@ -3169,40 +2839,6 @@ Uses built-in tree-sitter modes for =.ts= and =.tsx= files.
'(web-mode . ("rass" "vuetail")))))
#+end_src
-*** mint-mode
-
-#+begin_src emacs-lisp
-(use-package mint-mode
- :ensure (:host github :repo "creatorrr/emacs-mint-mode")
- :mode "\\.mint\\'"
- :hook (mint-mode . eglot-ensure)
- :config
- (with-eval-after-load 'eglot
- (add-to-list 'eglot-server-programs
- '(mint-mode . ("mint" "tool" "ls")))))
-#+end_src
-
-** Nushell
-
-#+begin_src emacs-lisp
-;; (use-package nushell-mode
-;; :ensure nil
-;; :mode "\\.nu\\'")
-#+end_src
-
-*** nushell org babel
-
-#+begin_src emacs-lisp
-;; (use-package nushell-ts-babel
-;; :ensure (:host github :repo "herbertjones/nushell-ts-babel")
-;; :after org
-;; :config
-;; (org-babel-do-load-languages
-;; 'org-babel-load-languages
-;; (append org-babel-load-languages
-;; '((nushell . t)))))
-#+end_src
-
** Xonsh
Python-powered shell. Major mode for =.xsh= files.
@@ -3394,35 +3030,6 @@ BODY is the xonsh script. PARAMS may include :dir and :cmdline."
(add-hook 'bash-ts-mode-hook #'sh-mode-setup))
#+end_src
-** jinja-mode
-
-#+begin_src emacs-lisp
-(use-package jinja2-mode
- :ensure t
- :defer t)
-#+end_src
-
-** protobuf-mode
-
-#+begin_src emacs-lisp
-(use-package protobuf-mode
- :ensure (:host github :repo "protocolbuffers/protobuf"
- :files ("editors/protobuf-mode.el"))
- :mode ("\\.proto\\'" . protobuf-mode))
-#+end_src
-
-** janet-mode
-
-#+begin_src emacs-lisp
-(use-package janet-mode
- :mode "\\.janet\\'"
- :ensure t
- :config
- (with-eval-after-load 'eglot
- (add-to-list 'eglot-server-programs
- '(janet-mode . ("janet-lsp")))))
-#+end_src
-
** just-mode
#+begin_src emacs-lisp
@@ -3507,22 +3114,6 @@ BODY is the xonsh script. PARAMS may include :dir and :cmdline."
(slot . 0))))))
#+end_src
-* visual-fill-column
-
-#+begin_src emacs-lisp
-;; (use-package visual-fill-column
-;; :ensure t
-;; :hook ((text-mode . visual-line-mode) ;; Soft-Wrapping aktivieren
-;; (text-mode . visual-fill-column-mode)) ;; Das Zentrieren aktivieren
-;; :custom
-;; (visual-fill-column-width 110) ;; Maximale Breite des Textes (statt 0.67 relativ)
-;; (visual-fill-column-center-text nil)
-;; (visual-fill-column-enable-sensible-window-split t)
-;; :config
-;; (when (display-graphic-p)
-;; (setq-default visual-fill-column-center-text t)))
-#+end_src
-
* hl-todo
#+begin_src emacs-lisp
@@ -3618,14 +3209,12 @@ so the working-tree diff stays visible until the user explicitly stages."
(setq evil-want-keybinding nil)
(setq evil-want-C-u-delete t)
(setq evil-want-C-u-scroll t)
- (setq evil-undo-system 'undo-tree)
+ (setq evil-undo-system 'undo-redo)
(setq evil-split-window-below t)
(setq evil-vsplit-window-right t)
(setq evil-paste-from-register nil)
:config
(evil-mode 1)
- (define-key evil-normal-state-map "u" 'undo-tree-undo)
- (define-key evil-normal-state-map (kbd "C-r") 'undo-tree-redo)
(evil-set-initial-state 'help-mode 'emacs)
(evil-set-initial-state 'messages-buffer-mode 'normal)
(evil-set-initial-state 'dired-mode 'normal)
@@ -3644,30 +3233,6 @@ so the working-tree diff stays visible until the user explicitly stages."
(define-key evil-normal-state-map (kbd "K") #'my/eldoc-and-jump)
#+end_src
-*** evil yank/paste keymaps
-
-#+begin_src emacs-lisp
-;; (setq select-enable-clipboard nil)
-;; (setq select-enable-primary nil)
-
-;; (evil-define-operator my/evil-yank-to-clipboard (beg end type register yank-handler)
-;; :move-point nil
-;; :repeat nil
-;; (interactive "<R><x><y>")
-;; (let ((select-enable-clipboard t))
-;; (evil-yank beg end type register yank-handler)))
-
-;; (defun my/evil-paste-from-clipboard ()
-;; (interactive)
-;; (let ((select-enable-clipboard t))
-;; (evil-paste-before 1 ?+)))
-
-;; (general-def '(normal visual) 'override
-;; :prefix "SPC"
-;; "yy" 'my/evil-yank-to-clipboard
-;; "yp" 'my/evil-paste-from-clipboard)
-#+end_src
-
** smart-parens
#+begin_src emacs-lisp
@@ -3814,21 +3379,6 @@ so the working-tree diff stays visible until the user explicitly stages."
(require 'flash-evil)
(flash-evil-setup t)
- (defun my/flash-visual-extend (orig match)
- (if (and match
- (bound-and-true-p evil-local-mode)
- (eq evil-state 'visual))
- (let* ((origin (point))
- (mpos (flash-match-pos-value match))
- (forward (and mpos (>= mpos origin)))
- (flash-jump-position (if forward 'end 'start)))
- (prog1 (funcall orig match)
- (when (and forward (not (bolp)) (> (point) (point-min)))
- (backward-char))))
- (funcall orig match)))
-
- (advice-add 'flash-jump-to-match :around #'my/flash-visual-extend)
-
;; Restore ; and , after flash-char overwrites them
;; ; is used as prefix for prev-navigation (;b, ;d)
;; , is the local leader
@@ -3841,23 +3391,14 @@ so the working-tree diff stays visible until the user explicitly stages."
(flash-isearch-mode 1))
#+end_src
-* undo-tree
+* undo
+
+Native =undo-redo= (via =evil-undo-system='undo-redo=); just raise the undo limits.
#+begin_src emacs-lisp
-(use-package undo-tree
- :defer t
- :ensure t
- :hook (after-init . global-undo-tree-mode)
- :init
- (setq undo-tree-visualizer-timestamps t
- undo-tree-visualizer-diff t
- undo-tree-auto-save-history t
- undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo-tree-history/"))
- undo-limit 800000
- undo-strong-limit 12000000
- undo-outer-limit 120000000)
- :config
- (setq undo-tree-mode-lighter ""))
+(setq undo-limit 800000
+ undo-strong-limit 12000000
+ undo-outer-limit 120000000)
#+end_src
* rainbow-delimiters
@@ -3987,15 +3528,17 @@ so the working-tree diff stays visible until the user explicitly stages."
punch-show-git-info nil
punch-show-buffer-position t
punch-show-column-info t
+ punch-show-erc-info nil
punch-line-music-max-length 80
punch-line-modal-divider-style 'block
punch-line-section-backgrounds 'auto
+ punch-line-glyph-style 'nerd
punch-show-weather-info t
punch-weather-longitude "10.41"
punch-weather-latitude "53.25"
- punch-cpu-usage t
- punch-show-processes-info t
- punch-line-music-info t)
+ punch-cpu-usage nil
+ punch-show-processes-info nil
+ punch-line-music-info nil)
(punch-line-mode 1))
#+end_src
@@ -4018,15 +3561,22 @@ so the working-tree diff stays visible until the user explicitly stages."
(defvar cashmere/font-height 160)
- (set-face-attribute 'default nil
- :family "MapleMono NF"
- :height 180
- :font (font-spec
- :family "MapleMono NF"
- :features '(cv04 ss05 zero)))
+(defun cashmere/set-fonts (&optional frame)
+ "Apply the MapleMono faces, but only on graphical frames.
+Runs per-frame so a TTY-only daemon never touches fonts while GUI frames
+created later still get them."
+ (when (display-graphic-p frame)
+ (set-face-attribute 'default frame
+ :family "MapleMono NF"
+ :height 180
+ :font (font-spec
+ :family "MapleMono NF"
+ :features '(cv04 ss05 zero)))
+ (set-face-attribute 'fixed-pitch frame :family "MapleMono NF" :weight 'regular)
+ (set-face-attribute 'variable-pitch frame :family "MapleMono NF" :weight 'regular :height 1.1)))
-(set-face-attribute 'fixed-pitch nil :family "MapleMono NF" :weight 'regular)
-(set-face-attribute 'variable-pitch nil :family "MapleMono NF" :weight 'regular :height 1.1)
+(add-hook 'server-after-make-frame-hook #'cashmere/set-fonts)
+(cashmere/set-fonts)
(use-package mixed-pitch
:ensure t
@@ -4039,8 +3589,6 @@ so the working-tree diff stays visible until the user explicitly stages."
** grip mode
-** grip mode
-
#+begin_src emacs-lisp
(use-package grip-mode
:ensure t
@@ -4109,22 +3657,6 @@ so the working-tree diff stays visible until the user explicitly stages."
dirvish-preview-dispatchers)))))
#+end_src
-* tramp-hlo
-
-#+begin_src emacs-lisp
-;; (use-package tramp-hlo
-;; :ensure (:host github :repo "jsadusk/tramp-hlo")
-;; :config
-;; (tramp-hlo-setup))
-#+end_src
-
-* tramp-rpc
-
-#+begin_src emacs-lisp
-(add-to-list 'load-path "/home/cashmere/.emacs.d/tramp-rpc/lisp")
-(require 'tramp-rpc)
-
-#+end_src
* zoxide
@@ -4459,6 +3991,8 @@ activates automatically. Edit, then `C-c C-c' commits, `C-c C-k' aborts."
"w L" '(buf-move-right :wk "Buffer move right")
"c" '(:ignore t :wk "code")
+ "cc" '(my/compile-or-recompile :wk "compile / recompile")
+ "cC" '(compile :wk "compile (new command)")
"ca" '(eglot-code-actions :wk "code actions")
"cr" '(eglot-rename :wk "lsp rename")
"cf" '(eglot-format :wk "format buffer")
@@ -4473,7 +4007,6 @@ activates automatically. Edit, then `C-c C-c' commits, `C-c C-k' aborts."
"x" '(org-capture :wk "capture")
";" '(embark-act :wk "embark")
- "u" '(undo-tree-visualize :wk "undo tree")
"P" '(consult-yank-from-kill-ring :wk "paste history")
"t" '(:ignore t :wk "treesitter")
@@ -4570,20 +4103,6 @@ activates automatically. Edit, then `C-c C-c' commits, `C-c C-k' aborts."
#+end_src
-** jinja2-mode keymaps
-
-#+begin_src emacs-lisp
-;; jinja2-mode-map
-(my-leader
- :keymaps 'jinja2-mode-map
- "m" '(:wk "insert" :ignore)
- "mv" '(jinja2-insert-var :wk "var")
- "mt" '(jinja2-insert-tag :wk "tag")
- "mc" '(jinja2-insert-comment :wk "comment")
-
- "mf" '(fill-paragraph :wk "fill paragraph"))
-#+end_src
-
** rust-ts-mode keymaps
#+begin_src emacs-lisp
@@ -4702,6 +4221,7 @@ date) and the dired header are never skipped."
"a" '(org-agenda :wk "org agenda")
"c" '(my/centered-cursor :wk "center cursor")
"f" '(dirvish :wk "file manager")
+ "m" '(mu4e :wk "mu4e")
"r" '(async-shell-command :wk "run async")
"t" '(ghostel-project :wk "terminal (project)")
"T" '(ghostel-list-buffers :wk "terminal (switch)")
@@ -4718,45 +4238,6 @@ date) and the dired header are never skipped."
(global-set-key (kbd "C--") 'text-scale-decrease)
#+end_src
-** yanking
-
-#+begin_src emacs-lisp
-;; (defun my/evil-delete-to-blackhole (orig-fn beg end &optional type register &rest args)
-;; (apply orig-fn beg end type ?_ args))
-
-;; (advice-add 'evil-delete :around 'my/evil-delete-to-blackhole)
-
-;; (my-leader
-;; "y" '(my/yank-to-clipboard :wk "clipboard" :ignore t)
-;; "yy" '(my/yank-to-clipboard :wk "yank to clipboard")
-;; "yp" '(my/paste-from-clipboard :wk "paste from clipboard"))
-#+end_src
-
-*** explicit yanking/pasting
-
-#+begin_src emacs-lisp
-;; (defun my/yank-to-clipboard ()
-;; (interactive)
-;; (if (region-active-p)
-;; (let ((select-enable-clipboard t))
-;; (kill-ring-save (region-beginning) (region-end))
-;; (message "Yanked to clipboard"))
-;; (message "No region active")))
-
-;; (defun my/paste-from-clipboard ()
-;; (interactive)
-;; (let ((select-enable-clipboard t))
-;; (yank)))
-
-;; (defun my/delete-to-clipboard ()
-;; (interactive)
-;; (if (region-active-p)
-;; (let ((select-enable-clipboard t))
-;; (kill-region (region-beginning) (region-end))
-;; (message "Deleted to clipboard"))
-;; (message "No region active")))
-#+end_src
-
* elfeed
#+begin_src emacs-lisp
@@ -5096,24 +4577,6 @@ this package provides the ability to display rgb and hex colors.
(setq denote-project-notes-identifier '(project stayem)))
#+end_src
-* emacs-everywhere
-
-#+begin_src emacs-lisp
-(use-package emacs-everywhere
- :ensure t)
-#+end_src
-
-
-
-* profiler
-
-#+begin_src emacs-lisp
-;; (profiler-start 'cpu)
-;; (org-agenda nil "c")
-;; (profiler-report)
-;; (profiler-stop)
-#+end_src
-
* arrow.el
#+begin_src emacs-lisp
@@ -5285,7 +4748,7 @@ opening another file in same project does not re-notify."
(autoload 'garden-sidecar "garden-dashboard" nil t)
(autoload 'garden-connect "garden-connect" nil t)
(autoload 'garden-connect-pick "garden-connect" nil t)
-(autoload 'garden-player "garden-player" nil t)
+;; (autoload 'garden-player "garden-player" nil t)
(autoload 'denote-capf-setup "denote-capf" nil t)
(add-hook 'org-mode-hook #'denote-capf-setup)
@@ -5296,19 +4759,46 @@ opening another file in same project does not re-notify."
(autoload 'garden-publish-deploy "garden-publish" nil t)
#+end_src
-* easysessions
+** garden-player
+
+=garden-player= (=M-x garden-player=, buffer =*navi*=) is a terminal Navidrome client: it streams through a background =mpv= over a unix socket, renders a TUI with =vui=, and shows album art inline through the kitty graphics protocol. It opens on your starred library; press =u= to flip the song list to the live up-next queue and =u= again to flip back.
-=easysession-setup= restores the last session at startup and enables easysession-save-mode= for periodic auto-save. It is elpaca- and daemon-aware, so it picks =elpaca-after-init-hook= and per-frame restore on the daemon automatically.
+The buffer installs =garden-player-map= as a vim-like keymap (bindings live in =garden-player.el=, this is just the reference):
-mu4e- and ERC-buffers are process-backed and cannot be reconstructed from a file path, so easysession skips them. =my/easysession-restore-services= runs on =easysession-after-load-hook= and re-launches their entry points (=mu4e= in the background, =run-irc=) idempotently — guarded by =mu4e-running-p= and =erc-buffer-list= so switching between sessions never spawns a second instance or reconnects.
+| key | action |
+|-------+--------------------------------------------------------------|
+| =SPC= | play / pause |
+| =h= | previous track |
+| =l= | next track |
+| =j= | restart the current song from the beginning |
+| =k= | cycle repeat mode: off → repeat-all → repeat-one |
+| =s= | reshuffle the queue |
+| =n= | search the library and play the pick next (no playlist made) |
+| =N= | search the library and append the pick to the end |
+| =/= | same as =N= |
+| =u= | toggle between the starred library and the up-next queue |
+| =f= | favorite the current song |
+| =r= | radio: queue songs similar to the current one |
+| =g= | reload the starred library |
+| =q= | quit |
+| =RET= | play the song on the current row |
+
+Interactive commands: =garden-player= opens the player; =garden-player-play-next= and =garden-player-enqueue= search and queue without touching server playlists; =garden-player-toggle-view= flips the list; =garden-player-repeat=, =garden-player-shuffle=, =garden-player-radio=, =garden-player-like=, =garden-player-refresh= and =garden-player-quit= back the matching keys.
+
+* easysessions
#+begin_src emacs-lisp
(defun my/easysession-restore-services ()
- "Re-launch process-backed apps (mu4e, ERC) after a session is loaded."
- (unless (and (fboundp 'mu4e-running-p) (mu4e-running-p))
- (mu4e t))
- (unless (and (fboundp 'erc-buffer-list) (erc-buffer-list))
- (run-irc)))
+ (run-with-idle-timer
+ 1 nil
+ (lambda ()
+ (unless (and (fboundp 'mu4e-running-p) (mu4e-running-p))
+ (mu4e t))))
+ (run-with-idle-timer
+ 2 nil
+ (lambda ()
+ (unless (and (fboundp 'erc-buffer-list) (erc-buffer-list))
+ (run-irc)))))
(use-package easysession
:ensure t
@@ -5316,7 +4806,7 @@ mu4e- and ERC-buffers are process-backed and cannot be reconstructed from a file
:custom
(easysession-save-interval (* 10 60))
:config
- (add-hook 'easysession-after-load-hook #'my/easysession-restore-services)
+ ;; (add-hook 'easysession-after-load-hook #'my/easysession-restore-services)
(easysession-setup))
(my-local-leader