dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 97abab8c3181b9c3b2b8a37f6baca7756e549fe5
parent a65bc8c1c2f8e60e68d5b915917c3eafde76617d
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Tue, 26 May 2020 21:42:14 +0200

newsboat: query feeds, bindings, video queue

Added query feeds for youtube music and video channels.  Fixed paths and
key bindings.  New script to either launch mpv, or add a video to a
queue (playlist).


Former-commit-id: 9b36201c76c878c4706f5cab03ff6a1471589162
Diffstat:
Mnewsboat/config | 14+++++++++++---
Mnewsboat/history.cmdline | 17+++++++++++++++++
Mnewsboat/urls | 2++
Ascripts/youtube-mpv-player | 18++++++++++++++++++
4 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/newsboat/config b/newsboat/config @@ -2,10 +2,13 @@ auto-reload no reload-threads 8 show-read-feeds no delete-read-articles-on-quit yes -notify-program "~/.newsboat/notify-wrapper" +notify-program "~/.config/newsboat/notify-wrapper" notify-always yes article-sort-order date -error-log "~/.newsboat/error.log" +error-log "~/.config/newsboat/error.log" +prepopulate-query-feeds yes + +define-filter "read articles" "unread = \"no\"" bind-key j down bind-key k up @@ -29,6 +32,11 @@ bind-key E edit-urls bind-key ^r reload-urls bind-key t set-tag bind-key ^t clear-tag +bind-key e enqueue +unbind-key : +bind-key ; cmdline +bind-key s sort +bind-key S rev-sort color background white default color listnormal white default @@ -40,7 +48,7 @@ color listnormal_unread white default browser "open -g '%u'" macro , open-in-browser macro i set browser "i(){ youtube-dl --get-title --get-duration --get-description $1 | less;};i"; open-in-browser ; set browser "open '%u'" -macro v set browser "nohup mpv --volume=50 %u &>/dev/null"; open-in-browser ; set browser "open '%u'" +macro v set browser "nohup youtube-mpv-player %u"; open-in-browser ; set browser "open '%u'" macro w set browser "w3m"; open-in-browser ; set browser "open '%u'" macro l set browser "lynx"; open-in-browser ; set browser "open '%u'" macro c set browser "pbcopy <<<" ; open-in-browser ; set browser "open '%u'" diff --git a/newsboat/history.cmdline b/newsboat/history.cmdline @@ -18,3 +18,20 @@ redraw 147 13 24 +goto videos +goto unred +goto unread +goto Unread +goto unread +goto Videos +go Videos +goto Videos +goto videos +goto videos +goto videos +goto videos +goto videos +goto videos +goto Videos +goto videos +goto videos diff --git a/newsboat/urls b/newsboat/urls @@ -190,6 +190,7 @@ https://youtube.com/feeds/videos.xml?channel_id=UCVmcc4Lg9iod6gQWvM4dm-g "~Zel https://youtube.com/feeds/videos.xml?channel_id=UCUF2zNpdFN7ZGMvMqJaGtoA "~Záchranný kruh" "yt-videos" https://youtube.com/feeds/videos.xml?channel_id=UC4wAq5HbeqhqxNXIbWFfdyQ "~Загасан Ширээт Тамга official" "yt-videos" https://youtube.com/feeds/videos.xml?channel_id=UCWtcaoN-VA4wseYrws-csKw "~Никита Ордынский" "yt-videos" +"query:Videos:tags # \"yt-videos\"" # Music https://youtube.com/feeds/videos.xml?channel_id=UCAczJcKcJ_cA5w_PVS3o8aw "~Cole Rolland" "yt-music" @@ -222,3 +223,4 @@ https://youtube.com/feeds/videos.xml?channel_id=UCw7RrKdqIMddn-JpnOtnWPg "~YEA https://youtube.com/feeds/videos.xml?channel_id=UCAmt29QykFXnuIqQoEEnEFg "~Sigur Rós" "yt-music" https://youtube.com/feeds/videos.xml?channel_id=UCnDvLN38Co9d_NE-a_Bglqg "~RJD2" "yt-music" https://youtube.com/feeds/videos.xml?channel_id=UCFYMDSW-BzeYZKFSxROw3Rg "~The Living Tombstone" "yt-music" +"query:Music:tags # \"yt-music\"" diff --git a/scripts/youtube-mpv-player b/scripts/youtube-mpv-player @@ -0,0 +1,18 @@ +#!/bin/bash +if [[ ! -p $HOME/.cache/mpv/input ]]; then + mkfifo $HOME/.cache/mpv/input +fi +if pgrep -f MPV-Q > /dev/null +then + printf "%s\n" "loadfile \"$1\" append-play" > $HOME/.cache/mpv/input +else + mpv --volume=50 --no-terminal --x11-name=MPV-Q --input-file=$HOME/.cache/mpv/input --player-operation-mode=pseudo-gui "$1" & +fi + +#link archive +arc(){ +title=$(youtube-dl --ignore-config --get-title --get-duration --get-description "$1" 2>/dev/null) +printf "%b\n" "0a\n▪▪▪►Link► $1\n▪▪▪►Description► $title\n\n.\nw" >> $HOME/.cache/mpv/linkarchive +} +arc "$1" & +exit 0