stoof
This commit is contained in:
+31
-14
@@ -197,6 +197,14 @@
|
|||||||
(browse-url-firefox link)
|
(browse-url-firefox link)
|
||||||
(message "No link to open."))))
|
(message "No link to open."))))
|
||||||
|
|
||||||
|
(defun opal/elfeed-open-in-eww()
|
||||||
|
"Open the current Elfeed entry link in eww."
|
||||||
|
(interactive)
|
||||||
|
(let ((link (elfeed-entry-link (elfeed-search-selected :single))))
|
||||||
|
(if link
|
||||||
|
(eww-browse-url link)
|
||||||
|
(message "No link to open."))))
|
||||||
|
|
||||||
(defun opal/elfeed-mark-all-read ()
|
(defun opal/elfeed-mark-all-read ()
|
||||||
"Marks all feeds in *elfeed-search* as read."
|
"Marks all feeds in *elfeed-search* as read."
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -226,7 +234,8 @@
|
|||||||
|
|
||||||
;; Evil keybindings for Elfeed
|
;; Evil keybindings for Elfeed
|
||||||
(evil-define-key 'normal elfeed-search-mode-map
|
(evil-define-key 'normal elfeed-search-mode-map
|
||||||
"o" 'opal/elfeed-open-in-firefox ;; Open link in Firefox
|
"f" 'opal/elfeed-open-in-firefox ;; Open link in Firefox
|
||||||
|
"e" 'opal/elfeed-open-in-eww ;; Open link in Firefox
|
||||||
"r" 'opal/elfeed-mark-all-read ;; Marks all feeds as read
|
"r" 'opal/elfeed-mark-all-read ;; Marks all feeds as read
|
||||||
"gr" 'elfeed-update ;; Refresh feeds
|
"gr" 'elfeed-update ;; Refresh feeds
|
||||||
"q" 'quit-window)) ;; Quit Elfeed
|
"q" 'quit-window)) ;; Quit Elfeed
|
||||||
@@ -239,12 +248,15 @@
|
|||||||
(after! eww
|
(after! eww
|
||||||
(set-popup-rule! "^\\*eww\\*" :ignore t))
|
(set-popup-rule! "^\\*eww\\*" :ignore t))
|
||||||
|
|
||||||
|
(after! osm
|
||||||
|
(set-popup-rule! "^\\*osm\\*" :ignore t))
|
||||||
|
|
||||||
;; Set eww webpage title in the modeline bar instead of just *eww*
|
;; Set eww webpage title in the modeline bar instead of just *eww*
|
||||||
(setq eww-auto-rename-buffer 'title)
|
(setq eww-auto-rename-buffer 'title)
|
||||||
|
|
||||||
(defun opal/eww-reddit-redirect(url)
|
(defun opal/eww-reddit-redirect(url)
|
||||||
"Redirect reddit.com to custom URL automatically since Reddit blocks eww."
|
"Redirect reddit.com to custom URL."
|
||||||
(replace-regexp-in-string "https://www.reddit.com" "https://safereddit.com" url))
|
(replace-regexp-in-string "https://www.reddit.com" "https://eddrit.com" url))
|
||||||
|
|
||||||
;; Redirect reddit links to privacy respecting frontends so Reddit doesn't reject the traffic from eww.
|
;; Redirect reddit links to privacy respecting frontends so Reddit doesn't reject the traffic from eww.
|
||||||
(setq eww-url-transformers '(eww-remove-tracking opal/eww-reddit-redirect))
|
(setq eww-url-transformers '(eww-remove-tracking opal/eww-reddit-redirect))
|
||||||
@@ -261,15 +273,20 @@
|
|||||||
guess-language-min-paragraph-length 45)
|
guess-language-min-paragraph-length 45)
|
||||||
:diminish guess-language-mode)
|
:diminish guess-language-mode)
|
||||||
|
|
||||||
;; Temporary functions
|
|
||||||
(defun opal/remove-extra-asterisks-in-org ()
|
|
||||||
"Remove the second asterisk in **bold** text, converting it to *bold* in an Org file, without affecting spaces or headings."
|
|
||||||
(interactive)
|
|
||||||
(save-excursion
|
|
||||||
;; Start from the beginning of the buffer
|
|
||||||
(goto-char (point-min))
|
|
||||||
;; Loop through the buffer and replace **word** with *word* only if not in headings
|
|
||||||
(while (re-search-forward "\\([^*]\\)\\*\\*\\([^*\n]+\\)\\*\\*" nil t)
|
|
||||||
(replace-match "\\1*\\2*"))))
|
|
||||||
|
|
||||||
(setq geiser-guile-binary "/usr/bin/guile3.0")
|
(setq geiser-guile-binary "/usr/bin/guile3.0")
|
||||||
|
|
||||||
|
(defun opal/nov-mode-setup ()
|
||||||
|
"Configure fonts for nov.el."
|
||||||
|
(variable-pitch-mode 1) ; Enable variable-pitch-mode
|
||||||
|
(visual-line-mode 1) ; Enable line wrapping at word boundaries
|
||||||
|
(setq visual-fill-column-width 150
|
||||||
|
visual-fill-column-center-text t
|
||||||
|
line-spacing 0.2)
|
||||||
|
(visual-fill-column-mode 1))
|
||||||
|
|
||||||
|
(add-hook 'nov-mode-hook 'opal/nov-mode-setup)
|
||||||
|
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
|
||||||
|
|
||||||
|
(setq +lookup-dictionary-prefer-offline t)
|
||||||
|
(setq dictionary-server "dict.org")
|
||||||
|
|||||||
+13
-1
@@ -50,4 +50,16 @@
|
|||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
)
|
'(org-agenda-date ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-agenda-date-today ((t (:inherit fixed-pitch :weight bold))))
|
||||||
|
'(org-agenda-date-weekend ((t (:inherit fixed-pitch :weight bold))))
|
||||||
|
'(org-agenda-dimmed-todo-face ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-agenda-done ((t (:inherit fixed-pitch :strike-through t))))
|
||||||
|
'(org-agenda-structure ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-deadline-announce ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-scheduled ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-scheduled-previously ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-scheduled-today ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-time-grid ((t (:inherit fixed-pitch))))
|
||||||
|
'(org-upcoming-deadline ((t (:inherit fixed-pitch))))
|
||||||
|
'(variable-pitch ((t (:slant normal :weight regular :height 200 :width normal :foundry "PfEd" :family "ETBembo")))))
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
;;ein ; tame Jupyter notebooks with emacs
|
;;ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
;;gist ; interacting with github gists
|
;;gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
(lookup +dictionary) ; navigate your code and its documentation
|
||||||
lsp ; M-x vscode
|
lsp ; M-x vscode
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
;;make ; run make tasks from Emacs
|
;;make ; run make tasks from Emacs
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
(package! mixed-pitch)
|
(package! mixed-pitch)
|
||||||
(package! guess-language)
|
(package! guess-language)
|
||||||
(package! sicp)
|
(package! sicp)
|
||||||
|
(package! nov)
|
||||||
|
(package! osm)
|
||||||
|
|
||||||
;; Remove
|
;; Remove
|
||||||
(package! dirvish :disable t)
|
(package! dirvish :disable t)
|
||||||
|
|||||||
Reference in New Issue
Block a user