From 2fb8a8d5fe93939f42f582fa4d41e38e5bcb7aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Mon, 31 Dec 2018 15:16:25 +0100 Subject: Remove tagging from key-handler --- exec/key-handler | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/exec/key-handler b/exec/key-handler index b470c72..06757c0 100755 --- a/exec/key-handler +++ b/exec/key-handler @@ -12,10 +12,6 @@ # where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X # keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. -readonly KEY="$1"; -readonly TAGFILE="$HOME/.config/sxiv/tags" -readonly TMPFILE="/tmp/sxiv.$$" - rotate() { degree="$1" tr '\n' '\0' | xargs -0 realpath | sort | uniq | while read file; do @@ -26,24 +22,7 @@ rotate() { done } -tag_add() { - >>"$TAGFILE" - tags=$(dmenu <"$TAGFILE" | tr '\n' ',') - [ -z "$tags" ] && return - iptckwed -i -a "$tags" - echo -n "$tags" | tr ',' '\n' | sort - "$TAGFILE" | uniq >"$TAGFILE.new" - mv -f "$TAGFILE"{.new,} -} - -tag_del() { - cat >"$TMPFILE" - tags=$(iptckwed -iql <"$TMPFILE" | cut -f 2 | tr ',' '\n' | sort | uniq | dmenu | tr '\n' ',') - [ -z "$tags" ] && return - iptckwed -i -r "$tags" <"$TMPFILE" - rm -f "$TMPFILE" -} - -case "$KEY" in +case "$1" in "y") tr '\n' ' ' | xclip -i ;; "C-c") while read file; do xclip -selection clipboard -target image/png "$file"; done ;; "C-e") while read file; do urxvt -bg "#444" -fg "#eee" -sl 0 -title "$file" -e sh -c "exiv2 pr -q -pa '$file' | less" & done ;; @@ -51,7 +30,5 @@ case "$KEY" in "C-comma") rotate 270 ;; "C-period") rotate 90 ;; "C-slash") rotate 180 ;; -"C-t") tag_add ;; -"M-T") tag_del ;; esac -- cgit v1.2.3