dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 9788fc2e9ec6bd3d97c80506a9f60fbc89297dc7
parent a4082813a60101e61a4ffbbd0b37cc5508e9e0e2
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sat, 10 Oct 2020 16:25:35 +0200

Linkhandler uses readability, newsboat w3m macro

Send every website through python-readability for w3m. Add macro to
newsboat for opening only w3m. Also add keybinding to w3m to pipe
article through readability.


Former-commit-id: c928f428a050737946c1cf79033bb680dee97d57
Diffstat:
Mnewsboat/config | 1+
Mscripts/linkhandler | 2+-
Mscripts/set-theme | 0
Mw3m/keymap | 2+-
4 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/newsboat/config b/newsboat/config @@ -49,6 +49,7 @@ color listnormal_unread white default browser "linkhandler %u" macro , set browser "open -g %u"; open-in-browser; set browser "linkhandler %u" macro v set browser "linkhandler"; open-in-browser ; set browser "linkhandler %u" +macro w set browser "w3m -config ~/.config/w3m/config %u"; open-in-browser; set browser "linkhandler %u" macro i set browser "youtube-dl --get-title --get-duration --get-description %u | less"; open-in-browser; set browser "linkhandler %u" macro c set browser "printf '%s' %u | clc" ; open-in-browser ; set browser "linkhandler %u" macro u set browser "urlview"; open-in-browser ; set browser "linkhandler %u" diff --git a/scripts/linkhandler b/scripts/linkhandler @@ -13,7 +13,7 @@ case "$1" in setsid -f mpva "$1" ;; http://*|https://*) - w3m -config ~/.config/w3m/config "$1" + python3 -W ignore -m readability.readability -u "$1" | w3m -config ~/.config/w3m/config -T text/html ;; *) if [ -f "$1" ]; then "$EDITOR" "$1" diff --git a/scripts/set-theme b/scripts/set-theme diff --git a/w3m/keymap b/w3m/keymap @@ -15,7 +15,7 @@ keymap C-f NEXT_PAGE keymap C-b PREV_PAGE keymap C-d NEXT_HALF_PAGE keymap C-u PREV_HALF_PAGE - +keymap SPC\R PIPE_SHELL 'python3 -W ignore -m readability.readability -u $W3M_URL | w3m -config ~/.config/w3m/config -T text/html' # ABORT Quit at once # ACCESSKEY Pop up accesskey menu # ADD_BOOKMARK Add current page to bookmarks