fish: Add wav2flac

This used to be a separate script in my ~/.local/bin, however the script
is short enough that it doesn't need to be a separate file, and I don't
use it outside of the shell anyway.
This commit is contained in:
Donovan Glover 2022-07-30 10:32:49 -04:00
parent bd83212581
commit ad28ef8dcf
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -39,6 +39,18 @@ function https
/usr/bin/https "$argv" "User-Agent: "
end
# Convert unnecessarily large wav files to flac
function wav2flac
set ORIGINAL_SIZE (du -hs | cut -f1)
fd -e wav -x ffmpeg -i "{}" -loglevel quiet -stats "{.}.flac"
fd -e wav -X trash
set NEW_SIZE (du -hs | cut -f1)
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
end
# Don't show ripgrep results for very long lines (e.g. minified files)
alias rg="rg --max-columns=200"