From c3da7ff3e2e80d0ee803e828572ea368e573f88c Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 29 Jul 2020 17:38:13 +0100 Subject: [PATCH] Adds to sxiv key bindings --- sxiv/.config/sxiv/exec/key-handler | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sxiv/.config/sxiv/exec/key-handler b/sxiv/.config/sxiv/exec/key-handler index 0dd37ba3..1bdd249b 100755 --- a/sxiv/.config/sxiv/exec/key-handler +++ b/sxiv/.config/sxiv/exec/key-handler @@ -30,12 +30,21 @@ case "$1" in convert -rotate 90 "$file" "$file" ;; "less") convert -rotate 270 "$file" "$file" ;; + "question") + convert -rotate 180 "$file" "$file" ;; "y") - echo -n "$file" | xclip -selection clipboard ;; + mimetype="$(file --mime-type -b "$file")" + xclip -selection clipboard -target "$mimetype" -i "$file" + echo -n "$file" | xclip -selection primary + notify-send "copied" " + xclip -selection clipboard -target \"$mimetype\" -i \"$file\"" + ;; "g") gimp "$file" & disown ;; "G") optirun gimp "$file" & disown ;; + "d") + rm "$file" ;; *) # If none of the above were used, send a notificaton with the key combination notify-send "$1"