From 3c57ea07afa1d8a018087ab5a7ae51431b10bd4d Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 22 Jun 2026 16:28:53 -0700 Subject: [PATCH 1/4] Starting to use Mood Line --- ha-applications.org | 12 +++++++++--- ha-display.org | 36 ++++++++++++++++++++++++++++++++++++ ha-evil.org | 10 ++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/ha-applications.org b/ha-applications.org index 64b6c8b..5fc7127 100644 --- a/ha-applications.org +++ b/ha-applications.org @@ -113,9 +113,15 @@ I might switch to [[https://github.com/cxa/agent-shell-macext#start-of-content][ *** Agent Skills The following pulls in [[https://github.com/xenodium/emacs-skills][emacs-skills]], a Claude Agent skills for Emacs: -#+BEGIN_SRC emacs-lisp - (use-package emacs-skills - :straight (:type git :host github :repo "xenodium/emacs-skills")) +#+BEGIN_SRC sh + claude plugin marketplace add xenodium/emacs-skills + claude plugin install emacs-skills@xenodium-emacs-skills +#+END_SRC + +Often update with: + +#+BEGIN_SRC sh + claude plugin marketplace update xenodium-emacs-skills #+END_SRC The most helpful is =/open= that you run afterwards to pull the changes into buffers for complete review. Use the =/highlight= variation to see the changes highlighted. diff --git a/ha-display.org b/ha-display.org index 1318cc1..3072030 100644 --- a/ha-display.org +++ b/ha-display.org @@ -58,6 +58,42 @@ Let's install and load some of packages from the [[https://github.com/hlissner/d doom-modeline-percent-position nil) (doom-modeline-mode 1)) #+end_src + +After reading [[https://blog.davep.org/2026/06/12/simplifying-my-mode-line.html][this essay]], I decided to try + +#+BEGIN_SRC emacs-lisp + (use-package mood-line + :ensure t + :custom + ;; (mood-line-format mood-line-format-default) + (setq mood-line-glyph-alist mood-line-glyphs-fira-code) + + :config + (mood-line-mode 1) + (setq mood-line-format + (mood-line-defformat + :padding "" + :left + (((mood-line-segment-modal) . " ") + ((mood-line-segment-anzu) . " ") + ((mood-line-segment-buffer-status) . " ") + ((mood-line-segment-buffer-name) . " ") + " ") + :right + (((mood-line-segment-process) . " ") + ((mood-line-segment-major-mode) . " ") + ((mood-line-segment-misc-info) . " ") + ((mood-line-segment-vc) . " ") + ((mood-line-segment-checker) . " ")))) + + (setq mood-line-segment-modal-evil-state-alist + `((normal ,(nerd-icons-mdicon "nf-md-alpha_n_circle") . font-lock-keyword-face) + (insert ,(nerd-icons-mdicon "nf-md-alpha_i_circle") . font-lock-variable-name-face) + (visual ,(nerd-icons-mdicon "nf-md-alpha_v_circle") . font-lock-string-face) + (replace ,(nerd-icons-mdicon "nf-md-alpha_r_circle") . font-lock-type-face) + (motion ,(nerd-icons-mdicon "nf-md-alpha_m_circle") . font-lock-constant-face) + (emacs ,(nerd-icons-mdicon "nf-md-alpha_r_circle") . font-lock-constant-face)))) +#+END_SRC * Window Dimmer To make the active window /more noticeable/, we /dim/ the in-active windows with the [[https://github.com/gonewest818/dimmer.el][dimmer project]]. diff --git a/ha-evil.org b/ha-evil.org index 5abb154..33831d6 100644 --- a/ha-evil.org +++ b/ha-evil.org @@ -355,6 +355,16 @@ And the keybindings: Why not use ~f~? I’m reserving the ~f~ for a tree-sitter version that is not always available for all modes… yet. * Evil Extensions +** Anzu +[[https://github.com/emacsorphanage/anzu][Anzu]] provides a minor mode which displays current match and total matches information in the mode-line in various search modes. + +#+BEGIN_SRC emacs-lisp + (use-package anzu + :ensure t + :config + (global-anzu-mode +1)) +#+END_SRC + ** Evil Exchange I often use the Emacs commands, ~M-t~ and whatnot to exchange words and whatnot, but this requires a drop out of normal state mode. The [[https://github.com/Dewdrops/evil-exchange][evil-exchange]] project attempts to do something similar, but in a VI-way, and the /objects/ do not need to be adjacent. From 6de9e1c4686b3289b627c88bd7c9aa2d4ec43850 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Wed, 28 Jan 2026 19:52:58 -0800 Subject: [PATCH 2/4] Changes to Linux for pasting text into buffers. --- ha-org-clipboard.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ha-org-clipboard.org b/ha-org-clipboard.org index 782a7a6..737b69a 100644 --- a/ha-org-clipboard.org +++ b/ha-org-clipboard.org @@ -166,10 +166,10 @@ And define the same interface for Linux. Keep in mind, we need the exit code fro (defun ha-get-linux-clipboard () "Return the clipbaard for a Unix-based system. See `ha-get-clipboard'." (cl-destructuring-bind (exit-code contents) - (shell-command-with-exit-code "xclip" "-o" "-t" "text/html") + (shell-command-with-exit-code "wl-paste" "--type" "text/html") (if (= 0 exit-code) (list :html contents) - (list :text (shell-command-to-string "xclip -o"))))) + (list :text (shell-command-to-string "wl-paste"))))) (defun shell-command-with-exit-code (program &rest args) "Run PROGRAM with ARGS and return the exit code and output in a list." From c1ed1f08d0db614400b9831306378cefdb5f0f93 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 9 Feb 2026 22:35:39 -0800 Subject: [PATCH 3/4] Fix bug in "beep" when using recent Linux distribution --- elisp/beep.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/elisp/beep.el b/elisp/beep.el index 891a139..8990908 100644 --- a/elisp/beep.el +++ b/elisp/beep.el @@ -15,16 +15,21 @@ ;;; Code: (defvar beep-alert-sound-file - (expand-file-name "~/other/hamacs/beep-notify.wav") + (expand-file-name "~/src/hamacs/beep-notify.wav") "A WAV or AU file used at the completion of a function.") ;; My replacement in case we can't play internal sounds: (defun beep-beep (&rest _) "Play a default notification sound file. Customize the variable, `beep-alert-sound-file' to adjust the sound." - (if (fboundp 'play-sound-internal) + (condition-case err (play-sound-file beep-alert-sound-file) - (call-process-shell-command (format "afplay %s &" beep-alert-sound-file) nil 0))) + (error + (cond + ((= (call-process-shell-command "type aplay") 0) + (call-process-shell-command (format "aplay %s &" beep-alert-sound-file) nil 0)) + ((= (call-process-shell-command "type afplay") 0) + (call-process-shell-command (format "afplay %s &" beep-alert-sound-file) nil 0)))))) (defvar beep-speech-executable "say %s" "An OS-dependent shell string to speak. Replaces `%s' with a phrase.") From 8cf353d1e8c62b94c470bba89eea8afceba2d248 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 23 Feb 2026 21:56:51 -0800 Subject: [PATCH 4/4] Move tab-bar specific apps to under key Unclear which apps opened a new tab-bar workspace, and which ones didn't, so they are now under the TAB key. --- ha-aux-apps.org | 22 +++++++++++++++++++--- ha-config.org | 3 ++- ha-email.org | 7 +++++-- ha-feed-reader.org | 4 +++- ha-irc.org | 3 ++- laptop_keyboard.kbd | 9 ++++++--- 6 files changed, 37 insertions(+), 11 deletions(-) diff --git a/ha-aux-apps.org b/ha-aux-apps.org index 717424c..f4bcfdf 100644 --- a/ha-aux-apps.org +++ b/ha-aux-apps.org @@ -41,7 +41,7 @@ I would like a dedicate perspective to Mastodon, and I would like a leader key s #+begin_src emacs-lisp (use-package mastodon :config - (ha-leader "a m" `("mastodon" . ,(lambda () (interactive) (ha-tab-bar-new "mastodon" #'mastodon)))) + (ha-leader " M" `("mastodon" . ,(lambda () (interactive) (ha-tab-bar-new "mastodon" #'mastodon)))) (defun ha-mastodon-scroll-or-more () "Scroll a window, and at the end, get more entries in timeline." @@ -162,7 +162,9 @@ I'm thinking the [[https://zevlg.github.io/telega.el/][Telega package]] would be (when (fboundp 'evil-insert-state) (add-hook 'telega-chat-mode-hook 'evil-insert-state)) - (ha-leader "a t" `("telega" . ,(lambda () (interactive) (ha-tab-bar-new "telega" #'telega))))) + (ha-leader " T" `("telega" . + ,(lambda () (interactive) + (ha-tab-bar-new "telega" #'telega))))) #+end_src For some reason, you need [[https://github.com/Fanael/rainbow-identifiers][rainbow-identifiers]] to work, oh, I guess the docs state this. @@ -215,12 +217,26 @@ And my [[https://gitlab.com/howardabrams/emacs-ironsworn][new Ironsworn project] The project is interesting, and I should record a tutorial how to use it. * Playing Music After building a NAS out of a Raspberry Pi to hold my /ripped/ CD collection, let’s control my playlists from Emacs. -A more /rich/ experience than the [[https://github.com/isamert/empv.el][empv]] project is ⁨Álvaro’s [[https://github.com/xenodium/ready-player][ready-player]]. First install [[https://mpv.io/][mpv]]: + +A more /rich/ experience than the [[https://github.com/isamert/empv.el][empv]] project is [[https://github.com/xenodium/ready-player][ready-player]]. First install [[https://mpv.io/][mpv]]: #+BEGIN_SRC sh brew install mpv #+END_SRC +The =mpv= executable comes on my Linux, but I need to installed the requisite apps in order to mount my library: + +#+BEGIN_SRC sh + sudo apt install cifs-utils -y +#+END_SRC + +And create the mount points: + +And update our [[/sudo:/etc/fstab][/etc/fstab]] file with: +#+BEGIN_SRC conf + //myserver/myshare /mnt/smbshare cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 +#+END_SRC + And make sure we can play it: #+BEGIN_SRC sh diff --git a/ha-config.org b/ha-config.org index c8664cf..08100a0 100644 --- a/ha-config.org +++ b/ha-config.org @@ -1281,7 +1281,8 @@ Also, as [[https://www.bytedude.com/gpg-in-emacs/][bytedude]] mentions, I need t (auth-source-cache-expiry nil) :config - (setenv "GPG_AGENT_INFO" nil) + ;; Set this to nil if you are not running gpg-agent service + ;; (setenv "GPG_AGENT_INFO" nil) (ignore-error (epa-file-enable))) #+end_src diff --git a/ha-email.org b/ha-email.org index 9410517..6017038 100644 --- a/ha-email.org +++ b/ha-email.org @@ -132,8 +132,11 @@ Also, let's do some basic configuration of Emacs' mail system: #+end_src Create a special mail perspective: -#+begin_src emacs-lisp :tangle no - (ha-leader "a M" `("mail" . ,(ha-tab-bar-new "mail" #'notmuch))) +#+begin_src emacs-lisp + (ha-leader + " N" `("notmuch mail" . + ,(lambda () (interactive) + (ha-tab-bar-new "mail" #'notmuch)))) #+end_src * Configuration Do I want to sign messages by default? Nope. diff --git a/ha-feed-reader.org b/ha-feed-reader.org index d267d48..7237d92 100644 --- a/ha-feed-reader.org +++ b/ha-feed-reader.org @@ -87,7 +87,9 @@ According to Ben Maughan and [[http://pragmaticemacs.com/emacs/to-eww-or-not-to- And some global keys to display them in the =apps= menu: #+begin_src emacs-lisp - (ha-leader "a f" `("feed reader" . ,(ha-tab-bar-new "elfeed" #'elfeed))) + (ha-leader " F" `("feed reader" . + ,(lambda () (interactive) + (ha-tab-bar-new "feeds" #'elfeed)))) #+end_src * The Feeds :elfeed: The [[https://github.com/remyhonig/elfeed-org][elfeed-org]] project configures =elfeed= to read the RSS feeds from an Org file … like this one! diff --git a/ha-irc.org b/ha-irc.org index 0ea7fb9..af66aca 100644 --- a/ha-irc.org +++ b/ha-irc.org @@ -102,7 +102,8 @@ Quick way to start and jump to my IRC world. And some global keys to display them: #+begin_src emacs-lisp - (ha-leader "a i" `("irc" . ,(ha-tab-bar-new "irc" #'ha-erc))) + (ha-leader " I" `("irc" . ,(lambda () (interactive) + (ha-tab-bar-new "irc" #'ha-erc)))) #+end_src And a quick shortcuts to call it: diff --git a/laptop_keyboard.kbd b/laptop_keyboard.kbd index 38e0c25..cba1a31 100644 --- a/laptop_keyboard.kbd +++ b/laptop_keyboard.kbd @@ -15,6 +15,9 @@ ;; ;; Running: ;; sudo kanata --cfg ~/src/hamacs/laptop_keyboard.kbd +;; Or: +;; sudo ~/.local/bin/kanata --cfg ~/src/hamacs/laptop_keyboard.kbd + (deflocalkeys-macos ì 13) @@ -24,8 +27,8 @@ ;; have to modify the code in the `defcfg' section below. (defcfg - ;; linux-dev-names-include ("Apple Internal Keyboard / Trackpad") - macos-dev-names-include ("Apple Internal Keyboard / Trackpad")) + ;; macos-dev-names-include ("Apple Internal Keyboard / Trackpad") + linux-dev-names-include ("Apple Inc. Apple Internal Keyboard / Trackpad")) ;; What keys are we re-defining? This is my Macbook Pro layouts, as ;; both laptops are this hardware. @@ -39,7 +42,7 @@ tab q w e r t y u i o p [ ] \ caps a s d f g h j k l ; ' ret lsft z x c v b n m , . / rsft - fn lctl lalt lmet spc rmet ralt) + menu lctl lalt lmet spc rmet ralt) (defvar tap-time 200