2021-03-10 12:14:01 +00:00
|
|
|
#!/usr/bin/fish
|
|
|
|
|
|
|
|
while read file
|
|
|
|
set -g FILES "$file" $FILES
|
|
|
|
end
|
|
|
|
|
|
|
|
switch "$argv[1]"
|
|
|
|
case "d"
|
|
|
|
trash $FILES
|
|
|
|
case "D"
|
|
|
|
rm $FILES
|
|
|
|
case "g"
|
|
|
|
gimp $FILES
|
|
|
|
case "r"
|
|
|
|
echo ROTATE
|
|
|
|
echo $FILES
|
|
|
|
for f in $FILES
|
|
|
|
convert -rotate 90 "$f" "$f"
|
|
|
|
end
|
|
|
|
case "R"
|
|
|
|
for f in $FILES
|
|
|
|
convert -rotate 270 "$f" "$f"
|
|
|
|
end
|
2021-04-02 17:30:25 +00:00
|
|
|
case "y"
|
|
|
|
set FILE $FILES[1]
|
|
|
|
set TYPE (file -i $FILE | sed -r 's|.*(image/[a-z]+);.*|\1|')
|
|
|
|
xclip -sel clip -t "$TYPE" -i "$FILE"
|
2021-03-10 12:14:01 +00:00
|
|
|
end
|