#!/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
