Compare commits

...

2 Commits

Author SHA1 Message Date
19e1e133e3 Merge branch 'master' of git.opal.sh:opal/opalfiles 2024-09-23 11:20:33 -07:00
c7fe0235bf stoof 2024-09-23 11:17:57 -07:00
4 changed files with 52 additions and 4 deletions

View File

@@ -214,6 +214,14 @@
(browse-url-firefox link)
(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 ()
"Marks all feeds in *elfeed-search* as read."
(interactive)
@@ -243,16 +251,25 @@
;; Evil keybindings for Elfeed
(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
"gr" 'elfeed-update ;; Refresh feeds
"q" 'quit-window)) ;; Quit Elfeed
(setq create-lockfiles nil)
;; Make sure eww opens in it's own buffer
(after! eww
(set-popup-rule! "^\\*eww\\*" :ignore t))
(after! osm
(set-popup-rule! "^\\*osm\\*" :ignore t))
;; eww
(defun opal/eww-reddit-redirect(url)
"Redirect reddit.com to custom URL."
(replace-regexp-in-string "https://www.reddit.com" reddit-proxy url))
(replace-regexp-in-string "https://www.reddit.com" "https://eddrit.com" url))
(use-package eww
:config
@@ -283,3 +300,20 @@
guess-language-min-paragraph-length 45)
:diminish guess-language-mode)
(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")

View File

@@ -50,4 +50,16 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; 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")))))

View File

@@ -83,7 +83,7 @@
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
(lookup +dictionary) ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs

View File

@@ -8,6 +8,8 @@
(package! mixed-pitch)
(package! guess-language)
(package! sicp)
(package! nov)
(package! osm)
;; Remove
(package! dirvish :disable t)