May 18, 2020

I was able to modify my Newsboat configuration so that I could use a macro to open up YouTube videos with “’,’ (Comma) + m” which opens up the video in MPV.

I also made a revision to do the same action but instead be able to open up the same article in Firefox with “’,’ (Comma) + f” as well.

How this macro basically works:

  1. It utilizes the “macro” key to set a macro in w3m.
  2. It then uses ‘set browser’ to change the browser to the

desired program, which in this case is ‘mpv’ or ‘firefox’ respectively.

  1. It then calls the ‘open-in-browser’ command to open up the article

(or YouTube video link in this case) in the desired program.

  1. It then sets my default ‘browser’ environment variable in Newsboat

back to w3m, as this is my desired default browser.

This means you can literally look at YouTube videos from the accounts you’re subscribed to via RSS, and not even be on YouTube to view a single video.

This means you can access YouTube content without ads or any other unrelated content, which is super awesome.

Here’s where you can find my current Newsboat config: https://github.com/SBanya/dotfiles/tree/master/newsboat

Here are the modifications I made to my “config” file in my ~/.newsboat directory:

macro m set browser “/usr/bin/mpv %u”; open-in-browser ; set browser “/usr/bin/w3m %u”

macro f set browser “/usr/bin/firefox %u”; open-in-browser ; set browser “/usr/bin/w3m %u”