Move mpv aliases to scripts

This commit is contained in:
dogeystamp 2022-08-14 14:57:08 -04:00
parent 2492b303c1
commit 33e3a0df86
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
3 changed files with 15 additions and 2 deletions

View File

@ -1,8 +1,6 @@
# Color ls
alias ls='ls --color=auto'
# Limit mpv and youtube-dl to 1080p so it doesn't use too much bandwidth
alias mpvs='mpv --ytdl-format="bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]"'
# Run mpv from clipboard
alias mpvy='mpvs (xsel -b)'

5
src/.local/bin/mpva Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# Run mpv on the output files of minrss
mpvs $(for v in "$@"; do echo $(head -n 2 "${v}" | tail -n 1 | awk -F\" '{ print $2 }'); done)

10
src/.local/bin/mpvs Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Custom mpv settings
# passed to yt-dl
FORMAT="bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]"
mpv \
--ytdl-format="$FORMAT" \
$@