forked from extern/nix-config
fish: Update config
- Added opus function - Moved ex function to separate file
This commit is contained in:
parent
03d7b50ca6
commit
37a3d9450e
@ -52,9 +52,16 @@ function wav2flac
|
|||||||
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
|
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Easily extract files and remove the archive
|
# Convert wav/flac to opus
|
||||||
function ex
|
function opus
|
||||||
unar "$argv"; and rm -i "$argv"
|
set ORIGINAL_SIZE (du -hs | cut -f1)
|
||||||
|
|
||||||
|
fd -e wav -e flac -x ffmpeg -i "{}" -c:a libopus -b:a 128K -loglevel quiet -stats "{.}.opus"
|
||||||
|
fd -e wav -e flac -X rm -I
|
||||||
|
|
||||||
|
set NEW_SIZE (du -hs | cut -f1)
|
||||||
|
|
||||||
|
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Don't show ripgrep results for very long lines (e.g. minified files)
|
# Don't show ripgrep results for very long lines (e.g. minified files)
|
||||||
|
Loading…
Reference in New Issue
Block a user