feat: mpv function to auto add subtitles opt
This commit is contained in:
parent
5f1b118ff3
commit
304e61574e
@ -47,6 +47,19 @@ md2html() {
|
||||
) done
|
||||
}
|
||||
|
||||
mpv() {
|
||||
local a opt=()
|
||||
|
||||
for a in "$@"; do
|
||||
if [[ "$a" == *.srt ]] && [[ "$a" != --* ]]; then
|
||||
opt+=(--sub-file="$a")
|
||||
else
|
||||
opt+=("$a")
|
||||
fi
|
||||
done
|
||||
(set -x; command mpv "${opt[@]}")
|
||||
}
|
||||
|
||||
update() {
|
||||
$TERM --hold -e "$SHELL" -xc "sudo pacman -Syu && echo $'\e[32mDONE'" &
|
||||
$TERM --hold -e "$SHELL" -xc "git --git-dir='$HOME/.dotfiles/' --work-tree='$HOME' submodule update --remote && echo $'\e[32mDONE'" &
|
||||
|
Loading…
Reference in New Issue
Block a user