dotfiles/.bin/dexec_pasteaction
2023-02-22 08:31:38 +01:00

12 lines
241 B
Bash
Executable File

#!/bin/sh
. $HOME/.bin/_config
INPUT="$(xclip -r -o | tr -d "\n")"
SEL=$(printf "mpv $INPUT\nimv $INPUT" | $DMENU_CMD -l 20 -p "Page Action")
case $SEL in
mpv*) texec "mpv $INPUT"; ;;
imv*) texec "curl -s $INPUT | imv -"; ;;
esac