From 9d54c88f2515365af85c136a794f39e533706c07 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sun, 11 Dec 2022 22:37:43 +0100 Subject: Install and configure newsboat Make it sync feeds from Nextcloud News. --- .gitmodules | 3 +++ catppuccin/newsboat | 1 + home-configuration.scm | 10 ++++++++-- newsboat.conf | 29 +++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) create mode 160000 catppuccin/newsboat create mode 100644 newsboat.conf diff --git a/.gitmodules b/.gitmodules index 1888ab79..f36dc900 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,6 +22,9 @@ [submodule "catppuccin/kde"] path = catppuccin/kde url = https://github.com/catppuccin/kde +[submodule "catppuccin/newsboat"] + path = catppuccin/newsboat + url = https://github.com/catppuccin/newsboat [submodule "neomutt"] path = neomutt url = https://github.com/neomutt/neomutt diff --git a/catppuccin/newsboat b/catppuccin/newsboat new file mode 160000 index 00000000..be3d0ee1 --- /dev/null +++ b/catppuccin/newsboat @@ -0,0 +1 @@ +Subproject commit be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0f diff --git a/home-configuration.scm b/home-configuration.scm index 4847462b..57041c3e 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -338,7 +338,7 @@ replacement spec (to which `regexp-substitute/global' is applied)." "source-highlight" "tk" "tmux" "tree" "xxd" "zip" "unzip" "get-iplayer" "ffmpeg" "atomicparsley" "yt-dlp" "neomutt" "mailcap" "lynx" ; mail (lynx for HTML mail) - "vdirsyncer" "khal" + "newsboat" "vdirsyncer" "khal" ;; Ranger can do code highlighting using python-pygments and ;; image previews in kitty using python-pillow. @@ -457,12 +457,18 @@ replacement spec (to which `regexp-substitute/global' is applied)." ("git/config" ,(local-file "gitconfig")) ("htop/htoprc" ,(local-file "htoprc")) ("khal/config" ,(local-file "khal.conf")) + ("lesskey" ,(local-file "lesskey")) ("mutt/muttrc" ,(local-file "muttrc")) ("mutt/catppuccin.muttrc" ,(local-file #.(if (string=? catppuccin-theme-variant "latte") "catppuccin/neomutt/latte-neomuttrc" "catppuccin/neomutt/neomuttrc"))) - ("lesskey" ,(local-file "lesskey")) + ("newsboat/config" ,(local-file "newsboat.conf")) + ("newsboat/config.catppuccin" + ,(local-file #.(if (string=? catppuccin-theme-variant "latte") + "catppuccin/newsboat/themes/latte" + "catppuccin/newsboat/themes/dark") + "newsboat-theme.conf")) ("ranger/rc.conf" ,(local-file "ranger.conf")) ("user-dirs.locale" ,(plain-file "user-dirs.locale" "C")) ; Not sure if this is needed. Arch has it. ("user-dirs.dirs" ,(local-file "user-dirs.dirs")) diff --git a/newsboat.conf b/newsboat.conf new file mode 100644 index 00000000..7959e138 --- /dev/null +++ b/newsboat.conf @@ -0,0 +1,29 @@ +# newsboat config -*- conf-space -*- +# https://newsboat.org/releases/2.29/docs/newsboat.html#_newsboat_configuration_commands +# Vim-like keys. +bind-key j down +bind-key k up +bind-key J next-feed articlelist +bind-key K prev-feed articlelist + +# Reload feeds on startup, in parallel. +auto-reload yes +reload-threads 100 + +text-width 72 # wrap rendered HTML at 72 cols (or terminal width, if smaller) +scrolloff 2 # show 2 lines above/below selected line +show-keymap-hint no +show-title-bar yes +datetime-format "%e %b %Y" # e.g. " 9 Dec 2022" +notify-program "dunstify -a newsboat -i newsboat Newsboat" +notify-format "%d new articles (%n unread articles, %f unread feeds)" + +# Sync with Nextcloud News. +urls-source "ocnews" +ocnews-url "https://cloud.wilkenfamily.de/" +ocnews-login "timo" +ocnews-passwordeval "pass www/nextcloud/timo | head -1" +ocnews-flag-star "s" + +# Catppuccin theme. +include ~/.config/newsboat/config.catppuccin -- cgit v1.2.3