Newsboat RSS in the terminal

I’ve been falling in love with the simplicity of terminal based apps lately and that started in part with Newsboat the terminal based RSS reader I’ve been using for a few months. I’ve already written a short post about setting up Newsboat with Nix Home Manager but wanted to take a deeper dive into the tool today.

Why Terminal?

The first question you may be asking is why on earth would you use a terminal based tool? First, I love keyboard commands and most of the RSS readers I tried on Linux simply didn’t have a good set of keyboard commands, that is if they even worked and were under active development.

Second, by choosing a TUI app, I can take my RSS reader to macOS or Windows should I ever make one of those platforms my computing environment of choice.

Third, the few RSS readers that worked on Linux and were still under somewhat active development were resources hogs. I’d open one and my fans would instantly spin to full speed on my laptop. I’m usually plugged in so battery life isn’t as big a deal, but the fan noise is annoying and simply knowing that an app is sucking down resources gets under my skin.

Okay so Newsboat

First lets dive into my current home-manager Newsboat1 configuration below.

  programs.newsboat = {
    enable = true;
    autoReload = true;
    reloadTime = 10;
    extraConfig = "
urls-source \"feedbin\"
feedbin-login \"curtis@curtismchale.ca\"
feedbin-passwordfile \"~/.newsboat/feedbin-password\"
text-width 100
reload-threads 11
show-read-feeds no

## keybindings
unbind-key j
unbind-key k
unbind-key x

## rebinding
bind-key j down
bind-key k up
bind-key x quit

# Theme newsboat
# Color chart: https://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
# Color docs: https://newsboat.org/releases/2.37/docs/newsboat.html#_colors
color listnormal         color237 color254
color listnormal_unread  color237  color254 bold
color listfocus_unread   color237  color250 bold
color listfocus          color237 color254 bold
color background         color254 color254
color article            color237 color254
color end-of-text-marker color8  default
color info               color4  color15 bold
color hint-separator     color4 color15
color hint-description   color4 color15
color title              color4 color15 bold

highlight article \"^(Feed|Title|Author|Link|Date): .+\" color237 color254 bold
highlight article \"^(Feed|Title|Author|Link|Date):\" color237 color254 bold

highlight article \"https?://[^ ]+\" color4 color254 bold
highlight article \"\[[0-9]+\]\" color4 color254 bold
    ";
  };

One of my first issues with Newsboat was how slow it was to reload my feeds, taking a minute or two. This was fixed by adding the reload-threads 11 line and now my hundred or so feeds are checked for new content in about 20 seconds.

Next, while Newsboat has default keyboard commands for navigating the interface I’m very used to vim style navigation. This was easily achieved by first making sure a few keys were not mapped, then mapping them to the vim-style mappings I wanted. Now j and k navigate up/down in the article lists.

The final hurdle was the barely readable white text on black background that Newsboat comes with. Newsboat has a fairly comprehensive theme setup but it’s not that obvious at the beginning. I suggest using the two links embedded in my configuration to find which elements can be changed and what each color is.

I started my theme with a catppuccin Newsboat theme but it didn’t really work so I used that as a basis to understand how to modify the Newsboat interface and then come up with the theme you see in the screenshots of Newsboat.

My Newsboat theme

I’ve still got some tweaks I want to make to my theme, but it’s far more readable than it started out. I’d also like to take some inspiration and write some of my own custom tooling around Newsboat to send things directly to Obsidian or whatever read later service I end up using.

Extra Links

  1. All Home Manager does is compile my settings down to the expected config file for Newsboat. It does this for many apps and system settings which lets me control most of my system from a single file. ↩︎

Leave a Reply

Your email address will not be published. Required fields are marked *