dotfiles/.config/sxiv/exec/key-handler

36 lines
847 B
Bash
Executable file

#!/bin/sh
while read file
do
case "$1" in
"y")
hikari -c "$file"
;;
"q")
hikari -c -o "$file"
;;
"m")
convert "$file" -resize 600x600 "/tmp/$(basename "$file")"
hikari -c "/tmp/$(basename "$file")"
;;
"c")
mime=$(file -b --mime-type "$file")
xclip -selection clipboard -t "$mime" -i "$file"
notify-send 'Copied to clipboard' "$file is in your clipboard"
;;
"Y")
cp "$file" /tmp
notify-send 'Copied to /tmp' "$file is in /tmp"
;;
"w")
setwallpaper "$file"
;;
"l")
setwallpaper "$file" "$HOME/.lock"
;;
"g")
gimp "$file" &
;;
esac
done