summaryrefslogtreecommitdiff
path: root/.config/emacs
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-10-25 19:31:40 -0400
committerbd <bdunahu@operationnull.com>2024-10-25 19:31:40 -0400
commitb61259b49f7349fe705df4ab77d37d317bebbcaf (patch)
treec032034150f9fd71c4dbf420c651d9c30dfc0cb5 /.config/emacs
parentea04c1f4317cff446d6a4753072329f6bc9b627a (diff)
dunst, miscellaneous changes
Diffstat (limited to '.config/emacs')
-rw-r--r--.config/emacs/gnus.el3
-rw-r--r--.config/emacs/modules/bd--files.el18
-rw-r--r--.config/emacs/modules/bd--minibuffer.el1
3 files changed, 12 insertions, 10 deletions
diff --git a/.config/emacs/gnus.el b/.config/emacs/gnus.el
index a60e8e7..986d0d0 100644
--- a/.config/emacs/gnus.el
+++ b/.config/emacs/gnus.el
@@ -46,7 +46,8 @@
"%5{%B%}"
"%s\n"))
-(setopt mml-secure-openpgp-encrypt-to-self t)
+(setopt message-from-style 'angles
+ mml-secure-openpgp-encrypt-to-self t)
(require 'bd--mail) ;; (gitignored)
diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el
index e5df266..b8a5f4a 100644
--- a/.config/emacs/modules/bd--files.el
+++ b/.config/emacs/modules/bd--files.el
@@ -3,14 +3,10 @@
;;; Code:
-(defun bd/file-has-extension? (file types)
- "Returns t if file has an extension in LST, nil otherwise."
- (string-match (regexp-opt lst) (or (file-name-extension file) "")))
-
(defmacro bd/defun-find-file-wrapper (name types open-f)
`(defun ,name (f &rest args)
"Wrapper around F (find-file), passing ARGS."
- (if (bd/file-has-extension? (car args) ,types)
+ (if (string-match (regexp-opt ,types) (or (file-name-extension (car args)) ""))
(progn
(,(eval open-f) (car args))
(recentf-add-file (car args))
@@ -33,8 +29,7 @@
dired-dwim-target t
dired-guess-shell-alist-user
- `((,(regexp-opt '(".jpeg" ".jpg" ".png")) "nsxiv &")
- (,(regexp-opt '(".pdf")) "pdftotext -nopgbrk -enc UTF-8 -eol unix -layout")
+ `((,(regexp-opt '(".pdf")) "pdftotext -nopgbrk -enc UTF-8 -eol unix -layout")
(,(regexp-opt '(".html")) "icecat &")))
;; pdf
@@ -43,7 +38,9 @@
(interactive)
(start-process (concat "zathura (" (file-name-base file) ")") nil "zathura" (expand-file-name file)))
-(bd/defun-find-file-wrapper bd/pdf-find-file-wrapper '("epub" "pdf") #'bd/zathura)
+(bd/defun-find-file-wrapper bd/pdf-find-file-wrapper
+ '("epub" "pdf")
+ #'bd/zathura)
(advice-add 'find-file :around #'bd/pdf-find-file-wrapper)
;; video
@@ -61,9 +58,12 @@
(defun bd/nsxiv (file)
"Open FILE with nsxiv"
(start-process (concat "nsxiv (" (file-name-base file) ")") nil "nsxiv" (expand-file-name file)))
-(bd/defun-find-file-wrapper bd/image-find-file-wrapper '("jpg" "jpeg" "png" "webp" "bmp" "ico" "gif" "JPG" "PNG") #'bd/nsxiv)
+(bd/defun-find-file-wrapper bd/image-find-file-wrapper
+ '("jpg" "jpeg" "png" "webp" "bmp" "ico" "gif" "JPG" "PNG")
+ #'bd/nsxiv)
(advice-add 'find-file :around 'bd/image-find-file-wrapper)
+
;;;; transmission
(use-package transmission
:bind
diff --git a/.config/emacs/modules/bd--minibuffer.el b/.config/emacs/modules/bd--minibuffer.el
index bd85369..66dffa5 100644
--- a/.config/emacs/modules/bd--minibuffer.el
+++ b/.config/emacs/modules/bd--minibuffer.el
@@ -43,6 +43,7 @@
("H-s G" . consult-git-grep)
("H-s r" . consult-ripgrep)
("H-s l" . consult-line)
+ ("H-s i" . consult-info)
("H-s L" . consult-line-multi)
("H-s k" . consult-keep-lines)
("H-s u" . consult-focus-lines)))