13 lines
394 B
Bash
Executable File
13 lines
394 B
Bash
Executable File
#!/bin/sh
|
|
# Press C-x to activate key handler!
|
|
|
|
while read file; do
|
|
case "$1" in
|
|
"c") xclip -sel clipboard "$file" -t image/png ;; # copy image
|
|
"d") dragon-drop "$file" & ;; # drag and drop
|
|
"o") $TERMINAL -e nnn "$file" & ;; # open in nnn
|
|
"p") printf '%s' "$file" | xclip -sel clipboard ;; # copy path
|
|
"C-p") printf '%s' "${file##*/}" | xclip -sel clipboard ;; # copy basename
|
|
esac
|
|
done
|