summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2022-12-11 22:37:43 +0100
committerTimo Wilken2022-12-11 22:37:49 +0100
commit9d54c88f2515365af85c136a794f39e533706c07 (patch)
treed9b92023cebd264e178465987ffe1c8e49742bf5
parentaadef8480341091ae2c909bc952dfe9904cd2a2e (diff)
Install and configure newsboat
Make it sync feeds from Nextcloud News.
-rw-r--r--.gitmodules3
m---------catppuccin/newsboat0
-rw-r--r--home-configuration.scm10
-rw-r--r--newsboat.conf29
4 files changed, 40 insertions, 2 deletions
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
+Subproject be3d0ee1ba0fc26baf7a47c2aa7032b7541deb0
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