diff --git a/.config/bash/10-aliases.bash b/.config/bash/10-aliases.bash index 993204b..69836b7 100644 --- a/.config/bash/10-aliases.bash +++ b/.config/bash/10-aliases.bash @@ -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'" &