mirror of
https://github.com/fscotto/infra.git
synced 2026-05-31 07:49:57 +00:00
Consolidate Emacs document tooling
This commit is contained in:
@@ -229,6 +229,10 @@ desktop_common_dotfiles:
|
|||||||
src: .local/bin/udiskie-password
|
src: .local/bin/udiskie-password
|
||||||
dest: .local/bin/udiskie-password
|
dest: .local/bin/udiskie-password
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
- name: Calibre database Flatpak wrapper
|
||||||
|
src: .local/bin/calibredb
|
||||||
|
dest: .local/bin/calibredb
|
||||||
|
mode: "0755"
|
||||||
- name: SSH config
|
- name: SSH config
|
||||||
src: .ssh/config
|
src: .ssh/config
|
||||||
dest: .ssh/config
|
dest: .ssh/config
|
||||||
|
|||||||
@@ -45,8 +45,7 @@
|
|||||||
'misc/rss
|
'misc/rss
|
||||||
'misc/terminal
|
'misc/terminal
|
||||||
'misc/vcs
|
'misc/vcs
|
||||||
'misc/pdf
|
'misc/documents
|
||||||
'misc/epub
|
|
||||||
'misc/i3-config)
|
'misc/i3-config)
|
||||||
|
|
||||||
(message "...user configuration loaded")
|
(message "...user configuration loaded")
|
||||||
|
|||||||
39
dotfiles/desktop/.emacs.d/lisp/misc/documents.el
Normal file
39
dotfiles/desktop/.emacs.d/lisp/misc/documents.el
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
;;; documents.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(use-package pdf-tools
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(pdf-tools-install))
|
||||||
|
|
||||||
|
(use-package pdf-view
|
||||||
|
:config
|
||||||
|
(setq-default pdf-view-display-size 'fit-width)
|
||||||
|
(setq pdf-cache-org-imgparams t
|
||||||
|
pdf-view-use-smooth-scrolling t)
|
||||||
|
(setq pdf-annot-default-visible-properties t))
|
||||||
|
|
||||||
|
(with-eval-after-load 'pdf-view
|
||||||
|
(define-key pdf-view-mode-map (kbd "n") 'pdf-view-next-page)
|
||||||
|
(define-key pdf-view-mode-map (kbd "p") 'pdf-view-previous-page)
|
||||||
|
(define-key pdf-view-mode-map (kbd "q") 'pdf-view-close))
|
||||||
|
|
||||||
|
(use-package nov
|
||||||
|
:ensure t
|
||||||
|
:mode ("\\.epub\\'" . nov-mode))
|
||||||
|
|
||||||
|
(use-package calibre
|
||||||
|
:ensure t
|
||||||
|
:commands calibre-library
|
||||||
|
:config
|
||||||
|
(setq calibre-calibredb-executable
|
||||||
|
(or (executable-find "calibredb")
|
||||||
|
(let ((flatpak-wrapper (expand-file-name "~/.local/bin/calibredb")))
|
||||||
|
(when (file-executable-p flatpak-wrapper)
|
||||||
|
flatpak-wrapper))
|
||||||
|
"calibredb")
|
||||||
|
calibre-libraries
|
||||||
|
`(("Library" . ,(expand-file-name "~/Documents/Library")))))
|
||||||
|
|
||||||
|
(provide 'misc/documents)
|
||||||
|
|
||||||
|
;;; documents.el ends here
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
(use-package nov
|
|
||||||
:ensure t
|
|
||||||
:mode ("\\.epub\\'" . nov-mode))
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
;;; pdf.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
(use-package pdf-tools
|
|
||||||
:ensure t
|
|
||||||
:config
|
|
||||||
(pdf-tools-install))
|
|
||||||
|
|
||||||
(use-package pdf-view
|
|
||||||
:config
|
|
||||||
(setq-default pdf-view-display-size 'fit-width)
|
|
||||||
(setq pdf-cache-org-imgparams t
|
|
||||||
pdf-view-use-smooth-scrolling t)
|
|
||||||
(setq pdf-annot-default-visible-properties t))
|
|
||||||
|
|
||||||
(with-eval-after-load 'pdf-view
|
|
||||||
(define-key pdf-view-mode-map (kbd "n") 'pdf-view-next-page)
|
|
||||||
(define-key pdf-view-mode-map (kbd "p") 'pdf-view-previous-page)
|
|
||||||
(define-key pdf-view-mode-map (kbd "q") 'pdf-view-close))
|
|
||||||
|
|
||||||
(provide 'misc/pdf)
|
|
||||||
|
|
||||||
;;; pdf.el ends here
|
|
||||||
2
dotfiles/desktop/.local/bin/calibredb
Executable file
2
dotfiles/desktop/.local/bin/calibredb
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec flatpak run --command=calibredb com.calibre_ebook.calibre "$@"
|
||||||
Reference in New Issue
Block a user