Compare commits
2 Commits
e8dd98aa3c
...
51d2463a8d
Author | SHA1 | Date |
---|---|---|
coolneng | 51d2463a8d | |
coolneng | 5e0f9a61be |
|
@ -10,9 +10,6 @@
|
|||
;; Map elfeed to global keybinding
|
||||
(map! :leader :n "o e" #'=rss
|
||||
:desc "RSS reader")
|
||||
;; Map wallabag to global keybinding
|
||||
(map! :leader :n "o w" #'=wallabag
|
||||
:desc "Read saved articles")
|
||||
;; Keybindings for org-noter
|
||||
(map! :mode pdf-view-mode
|
||||
:n "i" #'org-noter-insert-note
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
;;; +rss.el -*- lexical-binding: t; -*-
|
||||
;; Elfeed configuration
|
||||
;;
|
||||
;; Synchronize elfeed with Miniflux
|
||||
(setq elfeed-use-curl t
|
||||
elfeed-protocol-feeds (list
|
||||
(list "fever+https://coolneng@rss.coolneng.duckdns.org"
|
||||
:api-url "https://rss.coolneng.duckdns.org/fever/"
|
||||
:password (auth-source-pass-get 'secret "api/miniflux")))
|
||||
elfeed-sort-order 'ascending
|
||||
elfeed-search-filter "@all +unread"
|
||||
elfeed-goodies/tag-column-width 0)
|
||||
(elfeed-protocol-enable)
|
||||
;; Update RSS feeds on startup
|
||||
(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
|
||||
;; Use different font and show article in fullscreen
|
||||
(setq elfeed-show-entry-switch #'switch-to-buffer)
|
||||
(defadvice! +rss-elfeed-wrap-h-nicer ()
|
||||
"Enhances an elfeed entry's readability by wrapping it to a width of
|
||||
`fill-column' and centering it with `visual-fill-column-mode'."
|
||||
:override #'+rss-elfeed-wrap-h
|
||||
(setq-local truncate-lines nil
|
||||
shr-width 160
|
||||
visual-fill-column-center-text t
|
||||
default-text-properties '(line-height 1.1))
|
||||
(let ((inhibit-read-only t)
|
||||
(inhibit-modification-hooks t))
|
||||
(visual-fill-column-mode)
|
||||
(setq-local shr-current-font '(:family "Lato" :height 1.1))
|
||||
(set-buffer-modified-p nil)))
|
57
config.el
57
config.el
|
@ -88,61 +88,8 @@
|
|||
(setq display-line-numbers-type 'relative)
|
||||
;; Use pass as auth-source
|
||||
(add-to-list 'auth-sources 'password-store)
|
||||
;; Set up wallabag
|
||||
(after! wallabag
|
||||
(setq wallabag-host "https://wallabag.coolneng.duckdns.org"
|
||||
wallabag-username "coolneng"
|
||||
wallabag-password (auth-source-pass-get 'secret "api/wallabag")
|
||||
wallabag-clientid (auth-source-pass-get "clientid" "api/wallabag")
|
||||
wallabag-secret (auth-source-pass-get "api-secret" "api/wallabag")
|
||||
wallabag-show-sidebar 't
|
||||
wallabag-show-entry-switch 'switch-to-buffer
|
||||
url-automatic-caching t)
|
||||
(add-hook! 'wallabag-after-render-hook 'wallabag-search-update-and-clear-filter))
|
||||
(add-hook! 'doom-real-buffer-functions
|
||||
(defun +rss-buffer-p (buf)
|
||||
(string-match-p "^\\*wallabag" (buffer-name buf))))
|
||||
(defvar +wallabag-workspace-name "*wallabag*")
|
||||
(defun =wallabag ()
|
||||
"Activate (or switch to) `wallabag' in its workspace."
|
||||
(interactive)
|
||||
(if (modulep! :ui workspaces)
|
||||
(progn
|
||||
(+workspace-switch +wallabag-workspace-name t)
|
||||
(doom/switch-to-scratch-buffer)
|
||||
(wallabag)
|
||||
(+workspace/display))
|
||||
(setq +wallabag--wconf (current-window-configuration))
|
||||
(delete-other-windows)
|
||||
(switch-to-buffer (doom-fallback-buffer))
|
||||
(wallabag)))
|
||||
;; Set up elfeed
|
||||
(after! elfeed
|
||||
(setq elfeed-use-curl t)
|
||||
(setq elfeed-protocol-feeds (list
|
||||
(list "fever+https://coolneng@rss.coolneng.duckdns.org"
|
||||
:api-url "https://rss.coolneng.duckdns.org/fever/"
|
||||
:password (auth-source-pass-get 'secret "api/miniflux"))))
|
||||
(setq elfeed-sort-order 'ascending
|
||||
elfeed-search-filter "@all +unread"
|
||||
elfeed-goodies/tag-column-width 0)
|
||||
(elfeed-protocol-enable)
|
||||
(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
|
||||
;; Use different font and show article in fullscreen
|
||||
(setq elfeed-show-entry-switch #'switch-to-buffer)
|
||||
(defadvice! +rss-elfeed-wrap-h-nicer ()
|
||||
"Enhances an elfeed entry's readability by wrapping it to a width of
|
||||
`fill-column' and centering it with `visual-fill-column-mode'."
|
||||
:override #'+rss-elfeed-wrap-h
|
||||
(setq-local truncate-lines nil
|
||||
shr-width 160
|
||||
visual-fill-column-center-text t
|
||||
default-text-properties '(line-height 1.1))
|
||||
(let ((inhibit-read-only t)
|
||||
(inhibit-modification-hooks t))
|
||||
(visual-fill-column-mode)
|
||||
(setq-local shr-current-font '(:family "Lato" :height 1.1))
|
||||
(set-buffer-modified-p nil))))
|
||||
;; Set up RSS reader
|
||||
(after! elfeed (load! "+rss"))
|
||||
;; Set up the mail stack
|
||||
(after! mu4e (load! "+mail"))
|
||||
;; HACK Enable AOT native compilation
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
(package! org-super-agenda)
|
||||
;; Save recipes to org file
|
||||
(package! org-chef)
|
||||
;; Wallabag client
|
||||
(package! wallabag :recipe (:host github :repo "chenyanming/wallabag.el" :files ("*.el" "*.alist" "*.css")))
|
||||
;; Miniflux integration for elfeed
|
||||
(package! elfeed-protocol)
|
||||
;; Prettier LaTeX source blocks
|
||||
|
|
Loading…
Reference in New Issue