2020-05-10 11:05:02 +02:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
while read -r file
|
|
|
|
do
|
|
|
|
case "$1" in
|
2020-05-16 17:49:43 +02:00
|
|
|
"w")
|
|
|
|
setwall "$file" & ;;
|
|
|
|
"y")
|
|
|
|
readlink -f "$file" | xclip -selection clipboard &&
|
|
|
|
notify-send "\"$file\" copied to clipboard" & ;;
|
|
|
|
"Y")
|
|
|
|
xclip -selection clipboard -t image/png < $(readlink -f "$file") &&
|
|
|
|
notify-send -i "$(readlink -f "$file")" "copied to clipboard" & ;;
|
|
|
|
"d")
|
|
|
|
[ "$(printf "No\\nYes" | \
|
|
|
|
rofi -dmenu -i -l 2 -p "Really delete $file?")" = "Yes" ] &&
|
|
|
|
rm "$file" && notify-send "\"$file\" deleted." ;;
|
|
|
|
"g")
|
|
|
|
isinstalled gimp && pkill sxiv && gimp "$file" & ;;
|
2020-05-10 11:05:02 +02:00
|
|
|
esac
|
|
|
|
done
|