dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 917541275a50f1ba9e692e6a5fa205e1c55e854f
parent 2337f8d7be72b371755d15058228c0ecdb15fc76
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue,  7 Jul 2020 15:15:20 +0200

Clean up sxiv key-handler

Diffstat:
M.config/sxiv/exec/key-handler | 34++++++++++------------------------
1 file changed, 10 insertions(+), 24 deletions(-)

diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler @@ -3,45 +3,32 @@ set -e while read -r file; do fullpath="$(pwd)/$file" case "$1" in - "w") - cp "$file" ~/.config/wall.png - feh --bg-scale "$HOME/.config/wall.png" - notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." - ;; "c") [ -z "$destdir" ] && \ - destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | \ - awk '{print $2}' | \ - dmenu -l 20 -i -p "Copy file(s) to where?" | \ + destdir="$(dmenu -l 20 -i -p "Copy file(s) to where?" | \ sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit cp "$file" "$destdir" - notify-send -i "$fullpath" "$file copied to $destdir." & - ;; + notify-send -i "$fullpath" "$file copied to $destdir.";; "i") - notify-send "$(exiftool "$file")" & ;; + notify-send "$(exiftool "$file")";; "m") [ -z "$destdir" ] && \ - destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | \ - awk '{print $2}' | \ - dmenu -l 20 -i -p "Move file(s) to where?" | \ + destdir="$(dmenu -l 20 -i -p "Move file(s) to where?" | \ sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit cp "$file" "$destdir" notify-send -i "$fullpath" "$file moved to $destdir." & ;; "o") - opener=$(echo | dmenu -p "Open with:") + opener="$(echo | dmenu -p "Open with:")" nohup $opener "$file" >/dev/null 2>/dev/null &;; "r") - convert -rotate 90 "$file" "$file" - ;; + convert -rotate 90 "$file" "$file";; "R") - convert -rotate -90 "$file" "$file" - ;; + convert -rotate -90 "$file" "$file";; "f") - convert -flop "$file" "$file" - ;; + convert -flop "$file" "$file";; "y") printf "%s" "$file" | xclip -selection clipboard notify-send "$file copied to clipboard" & ;; @@ -52,8 +39,7 @@ while read -r file; do [ "$(printf "No\\nYes" | \ dmenu -i -p "Really delete $file?")" = "Yes" ] && \ rm "$file" && notify-send "$file deleted." ;; - "G") - gimp "$file" & - ;; + "g") + gimp "$file" & ;; esac done