Compare commits
2 commits
536228c691
...
9cd051ab51
Author | SHA1 | Date | |
---|---|---|---|
9cd051ab51 | |||
1bc9de9edc |
3 changed files with 90 additions and 49 deletions
125
config.el
125
config.el
|
@ -67,9 +67,10 @@
|
|||
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||
;; `load-theme' function. This is the default:
|
||||
(setq doom-theme 'doom-one)
|
||||
(setq doom-theme 'ef-spring)
|
||||
(cnfonts-mode 1)
|
||||
(beacon-mode 1)
|
||||
(good-scroll-mode 1)
|
||||
(setq word-wrap-by-category t)
|
||||
|
||||
(load! "secrets")
|
||||
|
@ -96,9 +97,9 @@
|
|||
(add-to-list 'default-frame-alist '(height . 35))
|
||||
(add-to-list 'default-frame-alist '(width . 102))
|
||||
|
||||
(setq doom-font (font-spec :size 16)
|
||||
doom-big-font (font-spec :size 24)
|
||||
doom-variable-pitch-font (font-spec :size 16))
|
||||
;; (setq doom-font (font-spec :size 16)
|
||||
;; doom-big-font (font-spec :size 24)
|
||||
;; doom-variable-pitch-font (font-spec :size 16))
|
||||
|
||||
;; dashboard banner
|
||||
(defun doom-dashboard-draw-ascii-emacs-banner-fn ()
|
||||
|
@ -238,6 +239,77 @@
|
|||
(use-package! guess-word)
|
||||
(setq guess-word-org-file (f-expand "~/Nextcloud/Documents/my-esl.org"))
|
||||
|
||||
;;calibre
|
||||
(setq calibredb-root-dir "~/Nextcloud/Ebook")
|
||||
(setq calibredb-db-dir (expand-file-name "metadata.db" calibredb-root-dir))
|
||||
(setq calibredb-ref-default-bibliography (concat (file-name-as-directory calibredb-root-dir) "catalog.bib"))
|
||||
(setq bibtex-completion-pdf-field "File")
|
||||
(setq bibtex-completion-bibliography '("~/Nextcloud/Ebook/catalog.bib"))
|
||||
(setq citar-bibliography '("~/Nextcloud/Ebook/catalog.bib"))
|
||||
|
||||
(setq calibredb-format-all-the-icons t)
|
||||
(map! :map calibredb-show-mode-map
|
||||
:n "?" #'calibredb-entry-dispatch
|
||||
:n "o" #'calibredb-find-file
|
||||
:n "O" #'calibredb-find-file-other-frame
|
||||
:n "V" #'calibredb-open-file-with-default-tool
|
||||
:n "s" #'calibredb-set-metadata-dispatch
|
||||
:n "e" #'calibredb-export-dispatch
|
||||
:n "q" #'calibredb-entry-quit
|
||||
:n "." #'calibredb-open-dired
|
||||
:n [tab] #'calibredb-toggle-view-at-point
|
||||
:n "M-t" #'calibredb-set-metadata--tags
|
||||
:n "M-a" #'calibredb-set-metadata--author_sort
|
||||
:n "M-A" #'calibredb-set-metadata--authors
|
||||
:n "M-T" #'calibredb-set-metadata--title
|
||||
:n "M-c" #'calibredb-set-metadata--comments)
|
||||
(map! :map calibredb-search-mode-map
|
||||
:n [mouse-3] #'calibredb-search-mouse
|
||||
:n "RET" #'calibredb-find-file
|
||||
:n "?" #'calibredb-dispatch
|
||||
:n "a" #'calibredb-add
|
||||
:n "A" #'calibredb-add-dir
|
||||
:n "c" #'calibredb-clone
|
||||
:n "d" #'calibredb-remove
|
||||
:n "D" #'calibredb-remove-marked-items
|
||||
:n "j" #'calibredb-next-entry
|
||||
:n "k" #'calibredb-previous-entry
|
||||
:n "l" #'calibredb-virtual-library-list
|
||||
:n "L" #'calibredb-library-list
|
||||
:n "n" #'calibredb-virtual-library-next
|
||||
:n "N" #'calibredb-library-next
|
||||
:n "p" #'calibredb-virtual-library-previous
|
||||
:n "P" #'calibredb-library-previous
|
||||
:n "s" #'calibredb-set-metadata-dispatch
|
||||
:n "S" #'calibredb-switch-library
|
||||
:n "o" #'calibredb-find-file
|
||||
:n "O" #'calibredb-find-file-other-frame
|
||||
:n "v" #'calibredb-view
|
||||
:n "V" #'calibredb-open-file-with-default-tool
|
||||
:n "." #'calibredb-open-dired
|
||||
:n "b" #'calibredb-catalog-bib-dispatch
|
||||
:n "e" #'calibredb-export-dispatch
|
||||
:n "r" #'calibredb-search-refresh-and-clear-filter
|
||||
:n "R" #'calibredb-search-clear-filter
|
||||
:n "q" #'calibredb-search-quit
|
||||
:n "m" #'calibredb-mark-and-forward
|
||||
:n "f" #'calibredb-toggle-favorite-at-point
|
||||
:n "x" #'calibredb-toggle-archive-at-point
|
||||
:n "h" #'calibredb-toggle-highlight-at-point
|
||||
:n "u" #'calibredb-unmark-and-forward
|
||||
:n "i" #'calibredb-edit-annotation
|
||||
:n "DEL" #'calibredb-unmark-and-backward
|
||||
:n [backtab] #'calibredb-toggle-view
|
||||
:n [tab] #'calibredb-toggle-view-at-point
|
||||
:n "M-n" #'calibredb-show-next-entry
|
||||
:n "M-p" #'calibredb-show-previous-entry
|
||||
:n "/" #'calibredb-search-live-filter
|
||||
:n "M-t" #'calibredb-set-metadata--tags
|
||||
:n "M-a" #'calibredb-set-metadata--author_sort
|
||||
:n "M-A" #'calibredb-set-metadata--authors
|
||||
:n "M-T" #'calibredb-set-metadata--title
|
||||
:n "M-c" #'calibredb-set-metadata--comments)
|
||||
|
||||
;;sdcv
|
||||
(setq sdcv-say-word-p t)
|
||||
|
||||
|
@ -255,7 +327,7 @@
|
|||
(default-input-method "rime")
|
||||
:config
|
||||
(define-key rime-mode-map (kbd "C-i") 'rime-force-enable)
|
||||
(setq rime-show-candidate 'posframe)
|
||||
(setq rime-show-candidate 'popup)
|
||||
(setq rime-disable-predicates
|
||||
'(rime-predicate-evil-mode-p
|
||||
rime-predicate-after-alphabet-char-p
|
||||
|
@ -341,8 +413,6 @@
|
|||
;; (add-hook 'org-after-todo-statistics-hook 'org-summary-todo)
|
||||
(after! org
|
||||
(setq org-directory "~/org/"
|
||||
org-ellipsis " ▼ "
|
||||
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||
org-image-actual-width '(400)
|
||||
org-link-search-must-match-exact-headline nil
|
||||
org-log-done 'time
|
||||
|
@ -352,27 +422,6 @@
|
|||
(lambda()
|
||||
(org-roam-dailies-capture-today)))
|
||||
|
||||
(defun ql--find-files-in-dir (ext dir &optional rec)
|
||||
"Find files with EXT in DIR.
|
||||
REC searches recursively."
|
||||
(split-string (shell-command-to-string
|
||||
(concat
|
||||
(format "fd --type f -e %s " ext)
|
||||
(unless rec "-d 1 ")
|
||||
(format ". %s" dir)))))
|
||||
|
||||
(defun ql-org-ql--search (file &optional query)
|
||||
"An Org-ql search allowing for the target FILE to be specified.
|
||||
Additionally, QUERY can be chosen as well."
|
||||
(let ((target file)
|
||||
(query (or query (read-from-minibuffer "Query: "))))
|
||||
(funcall #'org-ql-search target query)))
|
||||
|
||||
(defun my-org-ql-search-dailies (&optional query)
|
||||
"Quickly search `ql-journal-directory' with optional QUERY."
|
||||
(interactive)
|
||||
(ql-org-ql--search (ql--find-files-in-dir 'org "~/Nextcloud/Note/org-roam/daily/") query))
|
||||
|
||||
;; ob-restclient
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
|
@ -440,23 +489,23 @@ Additionally, QUERY can be chosen as well."
|
|||
(setq org-roam-capture-templates
|
||||
'(("m" "main" plain
|
||||
"%?"
|
||||
:if-new (file+head "main/${slug}.org"
|
||||
:if-new (file+head "main/%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)
|
||||
("r" "reference" plain "%?"
|
||||
("r" "references" plain "%?"
|
||||
:if-new
|
||||
(file+head "reference/${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
(file+head "references/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)
|
||||
("t" "ttk" plain "%?"
|
||||
:if-new
|
||||
(file+head "ttk/${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
(file+head "ttk/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)
|
||||
("a" "article" plain "%?"
|
||||
:if-new
|
||||
(file+head "articles/${title}.org" "#+title: ${title}\n#+date: %T\n#+filetags: :article: :publish:\n#+hugo_auto_set_lastmod: t\n")
|
||||
(file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+filetags: :article: :publish:\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)))
|
||||
|
||||
|
@ -486,16 +535,6 @@ Additionally, QUERY can be chosen as well."
|
|||
(setq epa-file-cache-passphrase-for-symmetric-encryption t)
|
||||
(setq-local epa-file-encrypt-to '("master@southfox.me"))
|
||||
|
||||
;; org-transclusion
|
||||
(use-package! org-transclusion
|
||||
:after org
|
||||
:init
|
||||
(map!
|
||||
:map global-map "<f12>" #'org-transclusion-add
|
||||
:leader
|
||||
:prefix "n"
|
||||
:desc "Org Transclusion Mode" "t" #'org-transclusion-mode))
|
||||
|
||||
;; ement
|
||||
(setq ement-save-sessions t
|
||||
ement-room-message-format-spec "%B%r%R%t")
|
||||
|
|
9
init.el
9
init.el
|
@ -86,7 +86,7 @@
|
|||
|
||||
:tools
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
biblio ; Writes a PhD for you (citation needed)
|
||||
(debugger +lsp) ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
(docker +lsp)
|
||||
|
@ -96,7 +96,7 @@
|
|||
;;gist ; interacting with github gists
|
||||
lookup ; navigate your code and its documentation
|
||||
lsp ; M-x vscode
|
||||
(magit +forge) ; a git porcelain for Emacs
|
||||
magit ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
pdf ; pdf enhancements
|
||||
|
@ -133,8 +133,7 @@
|
|||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
(gdscript
|
||||
+lsp) ; the language you waited for
|
||||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
|
@ -186,7 +185,7 @@
|
|||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
(mu4e +org +gmail)
|
||||
(mu4e +org)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
|
|
|
@ -58,12 +58,12 @@
|
|||
(package! clippy)
|
||||
(package! parrot)
|
||||
(package! restclient)
|
||||
(package! ef-themes)
|
||||
(package! ement
|
||||
:recipe (:host github :repo "alphapapa/ement.el"))
|
||||
|
||||
(unpin! org-roam)
|
||||
(package! org-download)
|
||||
(package! org-transclusion)
|
||||
(package! org-fragtog)
|
||||
(package! org-roam-ui)
|
||||
(package! ox-hugo)
|
||||
|
@ -82,5 +82,8 @@
|
|||
:recipe (:host github :repo "chenyanming/wallabag.el"
|
||||
:files ("*.el" "*.alist" "*.css")))
|
||||
(package! mastodon)
|
||||
(package! calibredb)
|
||||
(package! iscroll)
|
||||
(package! good-scroll)
|
||||
|
||||
(package! impatient-mode)
|
||||
|
|
Loading…
Reference in a new issue