# Newsboat 2.13.0 (Debian Buster/Sid)
# Part of my dotfiles, see
# https://gitlab.com/protesilaos/dotfiles

# General
# -------
max-items 100
auto-reload yes
reload-time 30
cleanup-on-quit yes
refresh-on-startup yes
show-read-articles no
show-read-feeds no
prepopulate-query-feeds no
feed-sort-order unreadarticlecount
show-keymap-hint yes
swap-title-and-hints no
text-width 72
save-path "~/Documents/archived-articles/rss"
browser /usr/bin/xdg-open %u
confirm-exit yes
display-article-progress yes

# Podcasts
# --------
player mpv
download-path "~/podcasts/%n"
max-downloads 3

# Key bindings
# ------------
bind-key h quit
bind-key j next
bind-key k prev
bind-key l open
bind-key o open-in-browser
bind-key S toggle-show-read-feeds
bind-key J next-feed
bind-key K prev-feed
bind-key j down article
bind-key k up article
bind-key J next article
bind-key K prev article
bind-key ^U pageup
bind-key ^D pagedown

# Macros
# see the Arch Wiki on this:
# https://wiki.archlinux.org/index.php/Newsboat#Pass_article_URL_to_external_command
macro v set browser "xterm -e mpv --ytdl-raw-options='\''format=[[bestvideo=height<=720]]'\'' %u &"; open-in-browser ; set browser "/usr/bin/xdg-open %u"
macro a set browser "xterm -e mpv --no-video %u &"; open-in-browser ; set browser "/usr/bin/xdg-open %u"

# Colours
# -------

# Tested with terminals that use my Tempus themes
# https://gitlab.com/protesilaos/tempus-themes
include ~/.config/newsboat/colors.theme
