Better copy
This commit is contained in:
parent
44007e11d1
commit
8c400657a5
5
bin/copy
5
bin/copy
|
@ -4,5 +4,10 @@ if [ $# -eq 0 ]; then
|
||||||
xclip -selection c
|
xclip -selection c
|
||||||
else
|
else
|
||||||
file_type=$(file -b --mime-type "$1")
|
file_type=$(file -b --mime-type "$1")
|
||||||
|
|
||||||
|
if [ "$file_type" = "image/jpg" ] || [ "$file_type" = "image/jpeg" ]; then
|
||||||
|
convert $1 png:- | xclip -selection c -t image/png
|
||||||
|
else
|
||||||
xclip -selection c -t $file_type < $1
|
xclip -selection c -t $file_type < $1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue