Gabriel Cachdiña

Personalización de Newsboat

· Gabriel Cachadiña

Newsboat es una utilidad de terminal minimalista que permite ser personalizada para usar el mismo mapeo de teclas que VIM y así poder leer feeds de forma rápida de:

Tema

En primer lugar, conseguí tiempo atrás encontrar una personalización que considero mi favorita en el programa, que me permite tener una paleta de colores distinta en función de la procedencia de la fuente RSS además de mostrarme con distintos colores el título, autor, fecha, … Esta personalización estará dentro de .config/newsboat/config

# -- Theme ----------------------------------------------------------------
color listnormal default default
color listfocus default default reverse
color listnormal_unread default default bold
color listfocus_unread default default bold underline
color info red black bold
color article default default

highlight article "^Feed:.*" magenta default
highlight article "^Title:.*" yellow default bold
highlight article "^Author:.*" green default
highlight article "^Date:.*" color223 default
highlight article "^Link:.*" blue default
highlight article "^Flags:.*" color9 default
highlight article "\\[[0-9][0-9]*\\]" color66 default bold
highlight article "\\[image [0-9][0-9]*\\]" color109 default bold
highlight article "\\[embedded flash: [0-9][0-9]*\\]" color66 default bold

#highlight feedlist "[╒╘╞]═.*═[╛╕╡]" yellow default bold
highlight feedlist "[║│]" yellow default bold
highlight feedlist "╠═.*" yellow default bold

highlight feedlist "\\(Youtube\\) .*" red
highlight feedlist "\\(Twitter\\) .*" blue
highlight feedlist "\\(Reddit\\) .*" green
highlight feedlist "\\(Podcast\\) .*" yellow
highlight feedlist "\\(Twitch\\) .*" magenta
highlight feedlist "\\(Blog\\) .*" cyan
#highlight feedlist "\\(Reddit\\) .*" color166


feedlist-format "%?T?║%4i %n %8u (%T) %t &╠═════════════════════════════════════════════════════%t?"
#feedlist-format "%?T?║%4i %n %8u (%T) %t &╠%=═0%t?"
#feedlist-format "%?T?║%4i %n %8u (%T) %t &%==11first%=x16SECOND%=~13third?"

Navegación

Para navegar newsboat, por defecto se usan las flechas del teclado, pero prefiero usar los keybindings de VIM en cualquier programa que uso, es por ello que uso la siguiente configuración, que también se encuentra en .config/newsboat/config:

# -- navigation ----------------------------------------------------------------
# unbind keys
unbind-key ENTER
unbind-key j
unbind-key k
unbind-key J
unbind-key K
unbind-key l

# bind keys - vim style
bind-key j down
bind-key k up
bind-key l open
bind-key h quit

Misceláneo

Para algunos de los feeds me gusta ver la página original de dónde proceden o abrir un vídeo en el caso de Twitch o Youtube, es por ello que uso Librewolf y MPV en un shortcut de newsboat para estos propósitos dentro de .config/newsboat/config (denotar que la tecla macro es en mi caso la ,):

# -- misc ----------------------------------------------------------------------
macro w set browser "librewolf %u"; open-in-browser ; set browser "librewolf %u"
macro v set browser "setsid -f mpv --really-quiet --no-terminal" ; open-in-browser ; set browser librewolf

Feeds

Para que newsboat cargue los feeds, deberán ser guardados en .config/newsboat/urls y con la siguiente estructura:

Blogs
http://lukesmith.xyz/rss.xml Blog "~Luke Smith" Tech
Youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA Youtube "~Luke Smith" Tech
https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA Youtube "~Mental Outlaw"
Twitch
https://twitchrss.com/feeds/?username=riotgames&feed=streams Twitch "~RiotGames"
Podcast
Reddit

Donde todos las líneas deberán contener, el link, el tópico al que pertenecen, el nombre del feed y la subcategoría.

#gnu/linux

Reply to this post by email ↪