add fish config

This commit is contained in:
2026-06-11 19:39:54 +05:30
parent 13761018ae
commit 9fa117921f
15 changed files with 538 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
function jpg2png --description "Convert a JPG image from URL to PNG format"
if test (count $argv) -ne 2
echo "Usage: jpg2png <source_url> <destination_path>"
return 1
end
set source $argv[1]
set destination $argv[2]
set temp_jpg (mktemp --suffix=.jpg)
if not wget -O $temp_jpg $source 2>&1
echo "Error: Failed to download JPG from $source"
rm -f $temp_jpg
return 1
end
if not magick $temp_jpg $destination
echo "Error: Failed to convert JPG to PNG"
rm -f $temp_jpg
return 1
end
rm -f $temp_jpg
echo "Successfully converted and saved to $destination"
end