diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-09-10 17:59:56 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-09-10 17:59:56 +0530 |
| commit | c4e395ccaaac33b1898d447b09377b8e3fd9cfa3 (patch) | |
| tree | eb94e9338f27217d2533efe494297a5066df92d3 /modules/newsboat.home/config.nix | |
| parent | 3560e22fbf28f1bdf11a573421c37c15cbeabb30 (diff) | |
| download | nixos-config-c4e395ccaaac33b1898d447b09377b8e3fd9cfa3.tar.gz nixos-config-c4e395ccaaac33b1898d447b09377b8e3fd9cfa3.zip | |
Refactor newsboat config to nix
Diffstat (limited to 'modules/newsboat.home/config.nix')
| -rw-r--r-- | modules/newsboat.home/config.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/modules/newsboat.home/config.nix b/modules/newsboat.home/config.nix new file mode 100644 index 0000000..2669482 --- /dev/null +++ b/modules/newsboat.home/config.nix @@ -0,0 +1,49 @@ +rec { + config = { + reload-threads = 6; + max-items = 20; + browser = "~/.config/newsboat/opener.sh '%t' %u"; + show-keymap-hint = false; + refresh-on-startup = true; + save-path = "~/Downloads/articles"; + articlelist-format = "%?T?| %-26T | %5i: ?%t"; + prepopulate-query-feeds = true; + }; + + keys = { + j = "down"; + k = "up"; + l = "open"; + h = "quit"; + g = "home"; + G = "end"; + q = "hard-quit"; + n = "next"; + p = "prev"; + }; + + macros = let + copyCmd = "~/.config/newsboat/opener.sh copy %u"; + in { + y = ''set browser "${copyCmd}"; open-in-browser; set browser "${config.browser}"''; + }; + + extraConfig = '' +color background color223 default +color listnormal color246 default +color listnormal_unread color62 default bold +color listfocus white magenta +color listfocus_unread white magenta bold underline +color info color8 default +color article white default + +highlight article "^(Feed|Link|Title|Date|Author):.*$" color223 default bold +highlight article "\\[[0-9]+\\]" color62 default bold +highlight article "https?://[^ ]+" color117 default underline +highlight article "\\[image\\ [0-9]+\\]" color117 default bold +highlight articlelist "\\|[^|]*\\|" color253 default bold +highlight articlelist "\\| \\[yt\\][^|]*\\|" color1 default bold +highlight articlelist "\\| r/[^|]*\\|" color253 default +highlight articlelist "\\| VimTricks[^|]*\\|" color27 default + ''; +} |
