From fe66b43fbcfcd183de7461720ce7400055b687e6 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Wed, 10 Mar 2021 13:14:01 +0100 Subject: [PATCH] [sxiv] Add key handler for sxiv --- .config/sxiv/exec/key-handler | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 .config/sxiv/exec/key-handler diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler new file mode 100755 index 0000000..3bcbcc1 --- /dev/null +++ b/.config/sxiv/exec/key-handler @@ -0,0 +1,24 @@ +#!/usr/bin/fish + +while read file + set -g FILES "$file" $FILES +end + +switch "$argv[1]" + case "d" + trash $FILES + case "D" + rm $FILES + case "g" + gimp $FILES + case "r" + echo ROTATE + echo $FILES + for f in $FILES + convert -rotate 90 "$f" "$f" + end + case "R" + for f in $FILES + convert -rotate 270 "$f" "$f" + end +end