blob: 4d38c793fd2289aa4de6b6d198c8134abcbd4dbe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
#!/bin/sh
format="$(printf "jpg\njxl\nwebp\navif" | dmenu -i -p "Compression format")"
[ -z "$format" ] && exit
quality="$(printf "75\n50\n25" | dmenu -i -p "Compression quality")"
[ -z "$quality" ] && exit
# We have to pretend using image/png; otherwise, dumbass programs refuse to work
xclip -selection clipboard -t image/png -o | convert - -quality "$quality" "$format":- | xclip -selection clipboard -t image/png
|