mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-15 19:30:51 +01:00
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:
parent
bd83212581
commit
ad28ef8dcf
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user