feat(emacs): Add a function to set the transparency

This commit is contained in:
Alexander Kobjolke 2024-11-12 20:53:55 +01:00
parent 5cc34027d8
commit 8dada77420

View file

@ -56,6 +56,17 @@
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]target\\'")
)
(defun set-frame-alpha (arg &optional active)
"Interactively set the transparency of the active frame"
(interactive "nEnter alpha value (1-100): \np")
(let* ((elt (assoc 'alpha default-frame-alist))
(old (frame-parameter nil 'alpha))
(new (cond ((atom old) `(,arg ,arg))
((eql 1 active) `(,arg ,(cadr old)))
(t `(,(car old) ,arg)))))
(if elt (setcdr elt new) (push `(alpha ,@new) default-frame-alist))
(set-frame-parameter nil 'alpha new)))
(defun my/org-id-update-id-current-file ()
"Scan the current buffer for Org-ID locations and update them."
(interactive)