1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-10-16 14:27:34 +00:00
config-fish/functions/pad-image.fish

11 lines
498 B
Fish
Raw Normal View History

2024-09-09 13:53:02 +00:00
which magick --skip-functions >/dev/null 2>/dev/null
if [ $status -eq 0 ]
function pad-image
log-t "Creating" "Images padded to $argv[1]" "directory..."
command mkdir --parents "Images padded to $argv[1]"
log-d "Padding" "$argv[3]" "to $argv[1]..."
command magick -background "$argv[2]" "$argv[3]" -resize "$argv[1]" -gravity "center" -extent "$argv[1]" $argv[4..-1] "Images padded to $argv[1]/$argv[3]"
log-t "Done! Emoji added to the" "Images padded to $argv[1]" "directory!"
end
end