diff options
author | Bert Münnich <ber.t@posteo.de> | 2018-12-31 15:16:25 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2018-12-31 15:16:25 +0100 |
commit | 2fb8a8d5fe93939f42f582fa4d41e38e5bcb7aa9 (patch) | |
tree | cb410d7d88bae3d4d4a5a028b461e5b5ee249889 /exec | |
parent | 6a662ae5e0711db82e4da173ac6f0d43288a2b4a (diff) |
Remove tagging from key-handler
Diffstat (limited to 'exec')
-rwxr-xr-x | exec/key-handler | 25 |
1 files changed, 1 insertions, 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 |