diff options
author | noa@gaiwan.org | 2024-06-13 10:07:40 +0000 |
---|---|---|
committer | noa@gaiwan.org | 2024-06-13 10:07:40 +0000 |
commit | 444eeb756c6f56c1c81be904b283346695c99473 (patch) | |
tree | 990b08daab2d21a1b772d3db523b348270f6780b | |
parent | f90dc7b0ea01e31cb93ec9c090d2b38a9903608a (diff) |
Update configuration for eww
-rw-r--r-- | emacs/init.el | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/emacs/init.el b/emacs/init.el index fb89193..c4667b0 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -441,9 +441,27 @@ and when JID is not in `jabber-activity-banned'." ) (setopt browse-url-browser-function 'eww-browse-url + browse-url-secondary-browser-function 'browse-url-default-browser url-cookie-trusted-urls '() url-cookie-untrusted-urls '(".*") - shr-max-width nil) + shr-cookie-policy nil + ;; I don't want web pages to be able to specify their own colours, because i like the colours i already have set. + shr-use-colors nil + shr-max-width nil + ;; We can set what the maximum size of an image in a window should be. This is a fraction of the total window width or height, and if the image would be bigger than this, it'll be resized to fit. It's useful to have it smaller because emacs still sort of chokes on scrolling when there are large images in a buffer. This is the default value of this option. + shr-max-image-proportion 0.9 + shr-discard-aria-hidden t + ;; The default name for the eww buffer is *eww*. This is unhelpful because it makes having more than one eww buffer open a bit of a chore to navigate. We can set it to 'url, 'title, or a function. I set it to 'title because marginalia already shows me the url. However, this means that i can't search for a url name when switching buffers. See the help for this variable for an example of a function which gives the page title and the url. + eww-auto-rename-buffer 'title) + +;; Goto address mode makes urls and email address in a buffer clickable. I want these clickable links to look like links, because that's what they are. The two mouse face variables are what face is used on hover, which at the moment i ignore. It might also be worth setting them to 'highlight. +(use-package goto-addr + :custom + (global-goto-address-mode t) + (goto-address-mail-face 'link) + (goto-address-mail-mouse-face 'link) + (goto-address-url-face 'link) + (goto-address-url-mouse-face 'link)) ;; Abbrev mode expands one string into another string. I use it as a simple autocorrect mode. If i misspell a word, i run C-x a i g which will prompt me for what to expand the previous word into. I type the correct spelling, and whenever i make that mistake again, it will automatically be corrected. It's important to be careful not to set something that could be a typo for two words though, because otherwise it gets even more annoying. Luckily it's easy to update the abbrevs which are stored in ~/.config/emacs/abbrev_defs. M-x list-abbrevs is also a nice command which shows all the saved abbrevs and how many times they've been expanded. (add-hook 'text-mode-hook #'abbrev-mode) @@ -726,14 +744,7 @@ and when JID is not in `jabber-activity-banned'." (setopt save-place-mode 1) -(use-package goto-addr - :custom - (global-goto-address-mode t) - (goto-address-mail-face 'link) - (goto-address-mail-mouse-face 'link) - (goto-address-url-face 'link) - (goto-address-url-mouse-face 'link) -) + (setenv "PAGER" "cat") (setenv "TERM" "dumb") |