For those of you who are using newsboat as their rss feeder, the use of macros is nice but I found it bothering to have to activate a given macro every single time before you want to use it.
Hence, thanks to the power of this tool, I came up with this simple command in my config: browser ~/.config/newsboat/browser
The referenced file is a shell script that recognize the type of link I'm trying to open and will use the appropriate tool to do so.

Follow

And here is the brwoser script:
#!/usr/bin/env bash

# save the image and open it with ucollage in fullscreen
if [ ! -z $(echo $1 | grep -E '.jpg$|.jpeg$|.png$') ]; then
curl $1 --output /tmp/img_newsboat && tmux new-window\; send-keys "ucollage /tmp/img_newsboat" Enter\; send-keys Enter
# open videos or youtube with mpv
elif [ ! -z $(echo $1 | grep -E 'youtube.com|.mpg$|.mpeg$|.mp4$|.avi$|.mov$') ]; then
mpv $1
# open any other link type with librewolf
else
librewolf $1
fi

@wwwgem I'm going to add it to my config. Thanks.

I have been using macros for images and sending links to wallabag.

Sign in to participate in the conversation
Linux.Pizza

A instance dedicated - but not limited - to people with an interest in the GNU+Linux ecosystem and/or general tech. Sysadmins to enthusiasts, creators to movielovers - Welcome!