Add pipe-viewer config

This commit is contained in:
Hoang Nguyen 2021-03-14 23:42:45 +03:00
parent eed4f4c0b9
commit 70a255ad39
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
3 changed files with 118 additions and 1 deletions

View File

@ -42,7 +42,7 @@
- **Shell:** [fish](https://github.com/fish-shell/fish-shell)
- **Shell prompt:** [starship](https://starship.rs/)
- **Anime/Manga/Wallpaper:** [gallery-dl](https://github.com/mikf/gallery-dl) / [mangadl-bash](https://github.com/Akianonymus/mangadl-bash), [anime-downloader](https://github.com/anime-dl/anime-downloader) + [trackma](https://github.com/z411/trackma) + [adl](https://github.com/RaitaroH/adl) / [anigrab](https://github.com/ngomile/anigrab)
- **CLI/TUI for the Internet:** [translate-shell](https://github.com/soimort/translate-shell) / [argos-translate](https://github.com/argosopentech/argos-translate), [ddgr](https://github.com/jarun/ddgr), [howdoi](https://github.com/gleitz/howdoi), [amfora](https://github.com/makeworld-the-better-one/amfora), [cointop](https://github.com/miguelmota/cointop), [newsboat](https://github.com/newsboat/newsboat), [youtube-dl](https://github.com/ytdl-org/youtube-dl) + [ytmdl](https://github.com/deepjyoti30/ytmdl), [github-cli](https://github.com/cli/cli), [pup](https://github.com/ericchiang/pup), [weechat](https://github.com/weechat/weechat), [curl](https://curl.haxx.se) / [wget](https://www.gnu.org/software/wget/wget.html) / [aria2](https://github.com/aria2/aria2), [tremc](https://github.com/tremc/tremc) + [transmission](https://github.com/transmission/transmission) / [rtorrent](https://github.com/rakshasa/rtorrent), [goaccess](https://github.com/allinurl/goaccess)
- **CLI/TUI for the Internet:** [translate-shell](https://github.com/soimort/translate-shell) / [argos-translate](https://github.com/argosopentech/argos-translate), [ddgr](https://github.com/jarun/ddgr), [howdoi](https://github.com/gleitz/howdoi), [amfora](https://github.com/makeworld-the-better-one/amfora), [cointop](https://github.com/miguelmota/cointop), [newsboat](https://github.com/newsboat/newsboat), [youtube-dl](https://github.com/ytdl-org/youtube-dl) + [ytmdl](https://github.com/deepjyoti30/ytmdl) / [pipe-viewer](https://github.com/trizen/pipe-viewer), [github-cli](https://github.com/cli/cli), [pup](https://github.com/ericchiang/pup), [weechat](https://github.com/weechat/weechat), [curl](https://curl.haxx.se) / [wget](https://www.gnu.org/software/wget/wget.html) / [aria2](https://github.com/aria2/aria2), [tremc](https://github.com/tremc/tremc) + [transmission](https://github.com/transmission/transmission) / [rtorrent](https://github.com/rakshasa/rtorrent), [goaccess](https://github.com/allinurl/goaccess)
- **CLI/TUI for other things:** [tt](https://github.com/runrin/tt), [forgit](https://github.com/wfxr/forgit), [borg](https://github.com/borgbackup/borg), [wendy](https://git.z3bra.org/wendy/log.html), [tokei](https://github.com/XAMPPRocky/tokei), [onefetch](https://github.com/o2sh/onefetch), [calcurse](https://github.com/lfos/calcurse), [qalculate](https://github.com/Qalculate/libqalculate), [fzf](https://github.com/junegunn/fzf), [fd](https://github.com/sharkdp/fd), [ripgrep](https://github.com/BurntSushi/ripgrep), [atool](http://www.nongnu.org/atool/), [rsync](https://rsync.samba.org/), [bottom](https://github.com/clementtsang/bottom), [hyperfine](https://github.com/sharkdp/hyperfine), [delta](https://github.com/dandavison/delta), [bat](https://github.com/sharkdp/bat), [glow](https://github.com/charmbracelet/glow) / [mdcat](https://github.com/lunaryorn/mdcat) / [mdr](https://github.com/MichaelMure/mdr), [exa](https://github.com/ogham/exa), [pandoc](https://github.com/jgm/pandoc), [csview](https://github.com/wfxr/csview), [libsixel](https://github.com/saitoha/libsixel), [buku](https://github.com/jarun/buku), [jq](https://github.com/stedolan/jq), [zoxide](https://github.com/ajeetdsouza/zoxide) / [z.lua](https://github.com/skywind3000/z.lua), [xlsx2csv](https://github.com/dilshod/xlsx2csv), [qrencode](https://github.com/fukuchi/libqrencode), sysstat, psmisc, wireless_tools, tree, renameutils
- **Selfhosted service:** [LibreTranslate](https://github.com/uav4geo/LibreTranslate), [searx](https://github.com/searx/searx), [yacy](https://github.com/yacy/yacy_search_server), [synapse](https://github.com/matrix-org/synapse), [mastodon](https://github.com/tootsuite/mastodon), [gitea](https://gitea.io/)

View File

@ -109,6 +109,7 @@ cp -rfv ./home/.config/neofetch/ ~/.config/neofetch/
cp -rfv ./home/.config/newsboat/ ~/.config/newsboat/
cp -rfv ./home/.config/npm/ ~/.config/npm/
cp -rfv ./home/.config/nvim/ ~/.config/nvim/
cp -rfv ./home/.config/pipe-viewer/ ~/.config/pipe-viewer/
cp -rfv ./home/.config/qutebrowser/ ~/.config/qutebrowser/
cp -rfv ./home/.config/ranger/ ~/.config/ranger/
cp -rfv ./home/.config/tmux/ ~/.config/tmux/

View File

@ -0,0 +1,116 @@
#!/usr/bin/perl
# CLI Pipe Viewer - configuration file
our $CONFIG = {
api_host => "auto",
auto_captions => 0,
autoplay_mode => 0,
cache_dir => "$ENV{HOME}/.cache/pipe-viewer",
colors => 1,
comments_order => "top",
confirm => 0,
convert_cmd => "ffmpeg -i *IN* *OUT*",
convert_to => undef,
cookie_file => undef,
copy_caption => 0,
custom_channel_layout_format => [
{ align => "right", color => "bold", text => "*NO*.", width => 3 },
{ align => "left", color => "bold blue", text => "*AUTHOR*", width => "55%" },
{ align => "right", color => "green", text => "*VIDEOS* videos", width => 14 },
{
align => "right",
color => "green",
text => "*SUBS_SHORT* subs",
width => 10,
},
],
custom_layout_format => [
{ align => "right", color => "bold", text => "*NO*.", width => 3 },
{ align => "left", color => "bold blue", text => "*TITLE*", width => "55%" },
{ align => "left", color => "magenta", text => "*AUTHOR*", width => "15%" },
{ align => "right", color => "green", text => "*AGE_SHORT*", width => 3 },
{ align => "right", color => "green", text => "*VIEWS_SHORT*", width => 5 },
{ align => "right", color => "blue", text => "*TIME*", width => 8 },
],
custom_playlist_layout_format => [
{ align => "right", color => "bold", text => "*NO*.", width => 3 },
{ align => "left", color => "bold blue", text => "*TITLE*", width => "55%" },
{ align => "right", color => "green", text => "*ITEMS* videos", width => 14 },
{ align => "left", color => "magenta", text => "*AUTHOR*", width => "20%" },
],
dash => 1,
date => undef,
debug => 0,
download_and_play => 0,
download_with_wget => 1,
downloads_dir => "$ENV{HOME}/Downloads/pipe-viewer",
env_proxy => 1,
fat32safe => 0,
ffmpeg_cmd => "/bin/ffmpeg",
fullscreen => 0,
get_captions => 1,
get_term_width => 1,
hfr => 1,
highlight_color => "bold",
highlight_watched => 1,
history => 1,
history_file => "$ENV{HOME}/.local/share/pipe-viewer/cli-history.txt",
history_limit => 100000,
http_proxy => undef,
ignore_av1 => 0,
interactive => 1,
keep_original_video => 0,
m4a_audio => 1,
maxResults => 20,
merge_into_mkv => 1,
merge_into_mkv_args => "-loglevel warning -c:s srt -c:v copy -c:a copy -disposition:s forced",
merge_with_captions => 1,
order => undef,
page => 1,
prefer_av1 => 0,
prefer_mp4 => 0,
region => undef,
remember_watched => 0,
remove_played_file => 0,
resolution => "best",
show_video_info => 1,
skip_if_exists => 1,
skip_watched => 0,
split_videos => 1,
srt_languages => ["en", "es"],
subscriptions_order => "relevance",
thousand_separator => ",",
timeout => undef,
user_agent => undef,
video_filename_format => "*FTITLE* - *ID*.*FORMAT*",
video_player_selected => "mpv",
video_players => {
mpv => {
arg => "--really-quiet --force-media-title=*TITLE* --no-ytdl *VIDEO*",
audio => "--audio-file=*AUDIO*",
cmd => "/bin/mpv",
fs => "--fullscreen",
novideo => "--no-video",
srt => "--sub-file=*SUB*",
},
vlc => {
arg => "--quiet --play-and-exit --no-video-title-show --input-title-format=*TITLE* *VIDEO*",
audio => "--input-slave=*AUDIO*",
cmd => "vlc",
fs => "--fullscreen",
novideo => "--intf=dummy --novideo",
srt => "--sub-file=*SUB*",
},
},
videoCaption => undef,
videoDefinition => undef,
videoDimension => undef,
videoDuration => undef,
videoLicense => undef,
watched_file => "$ENV{HOME}/.local/share/pipe-viewer/watched.txt",
wget_cmd => "/bin/wget",
youtube_video_url => "https://www.youtube.com/watch?v=%s",
ytdl => 1,
ytdl_cmd => "/bin/youtube-dl",
}