dotfiles/home/default/.config/nsxiv/exec/key-handler

14 lines
584 B
Plaintext
Raw Normal View History

2023-07-02 05:41:21 -04:00
#!/bin/sh
while read -r file
do
case "$1" in
"b") change-background "$file" & ;;
2023-09-28 09:14:15 -04:00
"y") wl-copy < $file ;;
2023-07-02 05:41:21 -04:00
"d")
#[ "$(printf "No\\nYes" | rofi -dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
[ "$(printf "No\\nYes" | wofi --insensitive --show dmenu --prompt="Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
2023-07-02 05:41:21 -04:00
"g") setsid -f gimp "$file" ;;
"i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | grep "<b>")" ;;
esac
done