Added support for a custom dmenu runner.

This commit is contained in:
Crony Akatsuki 2022-07-09 19:13:31 +02:00
parent e1a9b14f8c
commit d60f62f0f1
2 changed files with 6 additions and 2 deletions

View file

@ -3,9 +3,11 @@
# Feed this script a link or it will get it from your clipboard and it will give dmenu
# with some choice of programs to open the link with.
source $HOME/.config/dmenu/config
[ -z "$@" ] && link=$(xclip -o) || link="$@"
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what program?")" in
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | $DMENU -p "Open link with what program?")" in
mpv) "$VIDEO" "$link" ;;
browser) "$BROWSER" "$link" > /dev/null;;
"copy url") echo "$link" | xclip -selection clipboard ;;