aboutsummaryrefslogtreecommitdiffstats
path: root/home/newsboat.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/newsboat.nix')
-rw-r--r--home/newsboat.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/home/newsboat.nix b/home/newsboat.nix
new file mode 100644
index 0000000..c95b95a
--- /dev/null
+++ b/home/newsboat.nix
@@ -0,0 +1,59 @@
+{
+ vars,
+ config,
+ pkgs,
+ ...
+}:
+
+{
+ xdg.configFile."/home/petri/.config/newsboat/urls".text = ''
+ "query:Unread Articles:unread = \"yes\""
+ '';
+
+ programs.newsboat = {
+ enable = true;
+ autoReload = true;
+ browser = "\"${pkgs.chawan}/bin/cha %u\"";
+ reloadTime = 2;
+ extraConfig = ''
+ # special
+ macro o set browser "rdrview -T title,body -B cha %u" ; open-in-browser ; set browser "cha %u"
+
+ # download
+ prepopulate-query-feeds yes
+ download-full-page yes
+ urls-source "miniflux"
+ miniflux-url "https://flux.tammi.cc"
+ miniflux-tokenfile ${config.age.secrets.miniflux_api_key.path}
+
+ # operation
+ goto-next-feed no
+ miniflux-show-special-feeds "no"
+ feed-sort-order unreadarticlecount-asc
+ article-sort-order date-asc
+
+ # keys
+ bind-key j down
+ bind-key k up
+ bind-key j next articlelist
+ bind-key k prev articlelist
+ bind-key J next-feed articlelist
+ bind-key K prev-feed articlelist
+ bind-key G end
+ bind-key g home
+ bind-key d pagedown
+ bind-key u pageup
+ bind-key l open
+ bind-key h quit
+ bind-key a toggle-article-read
+ bind-key n next-unread
+ bind-key N prev-unread
+ bind-key D pb-download
+ bind-key U show-urls
+ bind-key x pb-delete
+ bind-key o open-in-browser
+
+ include ${pkgs.newsboat}/share/doc/newsboat/contrib/colorschemes/solarized-dark
+ '';
+ };
+}