aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Webster <hwebs@hwebs.info>2026-07-24 12:37:57 -0500
committerHenry Webster <hwebs@hwebs.info>2026-07-24 12:37:57 -0500
commit0a2ec2c69d65d354313eb34cce526d919feda1af (patch)
tree6507b3934032eb2b7ebde7af5e5131ccb7f8e88c
parented5d60cfb18cef56966ddf99f0762af37ca4edf5 (diff)
changes before I threw it all away
-rw-r--r--emacs/init.el32
1 files changed, 28 insertions, 4 deletions
diff --git a/emacs/init.el b/emacs/init.el
index b321e1b..a94b20d 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -16,6 +16,20 @@
(global-display-line-numbers-mode 1)
(setq-default indent-tabs-mode nil)
+;; Translucent background (text stays opaque). Needs a pgtk build under a
+;; compositing WM; provided via nixos-config's emacs-pgtk package.
+;;(defvar my/frame-alpha 90
+;; "Background opacity percentage for Emacs frames (100 = opaque).")
+;;(set-frame-parameter nil 'alpha-background my/frame-alpha)
+;;(add-to-list 'default-frame-alist `(alpha-background . ,my/frame-alpha))
+;;(defun my/toggle-transparency ()
+;; "Toggle the selected frame between translucent and fully opaque."
+;; (interactive)
+;; (set-frame-parameter
+;; nil 'alpha-background
+;; (if (eql (frame-parameter nil 'alpha-background) 100) my/frame-alpha 100)))
+;;(global-set-key (kbd "C-c t") #'my/toggle-transparency)
+
(setq custom-file
(make-temp-file "emacs-custom-"))
@@ -103,12 +117,22 @@
(defun my/mpdel-restore-ret ()
(evil-local-set-key 'normal (kbd "<return>") #'tablist-find-entry)
(evil-local-set-key 'normal (kbd "<kp-enter>") #'tablist-find-entry))
- (add-hook 'mpdel-tablist-mode-hook #'my/mpdel-restore-ret)
+ (add-hook 'mpdel-tablist-mode-hook #'my/mpdel-restore-ret))
- ;; "Recently added" view. MPD has no such entity, so subclass mpdel's filter
- ;; (which already renders a browsable, addable song list) and issue a search
- ;; sorted by modification time, newest first.
+;; "Recently added" view. MPD has no such entity, so subclass mpdel's filter
+;; (which already renders a browsable, addable song list) and issue a search
+;; sorted by modification time, newest first.
+;;
+;; This lives in its own top-level `with-eval-after-load' rather than in the
+;; mpdel `:config' above: the `cl-defstruct' below `:include's libmpdel-filter,
+;; which must exist when the struct is *macro-expanded*. Emacs eager-expands
+;; each top-level form before evaluating it, so inside :config the struct is
+;; expanded before (mpdel-mode) has loaded libmpdel -- failing with
+;; "libmpdel-filter is not a struct name". By the time this separate form is
+;; loaded, the use-package above has already pulled in mpdel/libmpdel.
+(with-eval-after-load 'mpdel
(require 'cl-lib)
+ (require 'libmpdel)
(defvar my/mpdel-recent-count 50
"How many recently added songs `my/mpdel-recent' lists.")
(cl-defstruct (my/mpdel-recent-entity (:include libmpdel-filter)))