summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-10-23 21:55:54 -0400
committerbd <bdunahu@operationnull.com>2024-10-23 22:06:01 -0400
commit4df0aba0364f6a234870f0bf5e086b98609689a8 (patch)
treeb751bf4813b177356a1f0b8c3eb4b6139466b380 /.config
parent566a8735c41dd4a4832faba9abf03aa93618c3af (diff)
find-file opens pdfs/epub in zathura
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/libraries/autoformat.el6
-rw-r--r--.config/emacs/modules/bd--essentials.el1
-rw-r--r--.config/emacs/modules/bd--files.el16
-rw-r--r--.config/guix/modules/base.scm2
4 files changed, 24 insertions, 1 deletions
diff --git a/.config/emacs/libraries/autoformat.el b/.config/emacs/libraries/autoformat.el
index f10b4fc..6964131 100644
--- a/.config/emacs/libraries/autoformat.el
+++ b/.config/emacs/libraries/autoformat.el
@@ -1,4 +1,7 @@
-;; -*- lexical-binding: t; -*-
+;;; -*- lexical-binding: t; -*-
+;;; Commentary:
+;;; Code:
+
(defcustom autoformat-do-untabify t
"If the value is t, then `autoformat-mode' will replace all tabs
@@ -48,3 +51,4 @@ spaces with tabs."
(provide 'autoformat)
+;;; autoformat ends here
diff --git a/.config/emacs/modules/bd--essentials.el b/.config/emacs/modules/bd--essentials.el
index 24d9cb5..41b0fae 100644
--- a/.config/emacs/modules/bd--essentials.el
+++ b/.config/emacs/modules/bd--essentials.el
@@ -61,6 +61,7 @@ for a bug I've encountered."
auto-revert-interval 30)
(setopt scroll-up-aggressively '0.50
scroll-down-aggressively '0.50)
+(setopt Man-notify-method 'pushy)
(provide 'bd--essentials)
diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el
index 01f9f49..4765510 100644
--- a/.config/emacs/modules/bd--files.el
+++ b/.config/emacs/modules/bd--files.el
@@ -24,6 +24,21 @@
(,(regexp-opt '(".pdf")) "pdftotext -nopgbrk -enc UTF-8 -eol unix -layout")
(,(regexp-opt '(".html")) "icecat &")))
+;; pdf
+(defun bd/zathura (file &rest args)
+ "Launch zathura ignoring args."
+ (interactive)
+ (ignore args)
+ (start-process "zathura" nil "zathura" file))
+
+(defun bd/pdf-find-file-wrapper (f &rest args)
+ "Wrapper around F (find-file), passing ARGS."
+ (if (string-match "\\(?:epub\\|pdf\\)" (or (file-name-extension (car args)) ""))
+ (progn
+ (bd/zathura (car args))
+ (recentf-add-file (car args)))
+ (apply f args)))
+(advice-add 'find-file :around #'bd/pdf-find-file-wrapper)
;;;; transmission
(use-package transmission
@@ -31,5 +46,6 @@
(:map transmission-mode-map
("R" . #'transmission-move)))
+
(provide 'bd--files)
;;; bd-files ends here
diff --git a/.config/guix/modules/base.scm b/.config/guix/modules/base.scm
index 95a9016..c96bb7b 100644
--- a/.config/guix/modules/base.scm
+++ b/.config/guix/modules/base.scm
@@ -56,6 +56,7 @@
screen ;; screen
tex ;; texlive-dvipng
texlive ;; texlive
+ tor-browsers ;; tor-browser
version-control ;; git
video ;; ffmpeg, mpv, yt-dlp
vim ;; vim
@@ -114,6 +115,7 @@
mupen64plus-ui-console
mupen64plus-video-glide64mk2
nethack
+ torbrowser
))
(define bd-base-system-packages