dotfiles/.bin/OLD/dexec_pasteaction

12 lines
241 B
Plaintext
Raw Normal View History

2023-02-22 08:31:38 +01:00
#!/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