diff options
| -rwxr-xr-x | dmenu/plumb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dmenu/plumb b/dmenu/plumb index c0d98f3..ef7dee2 100755 --- a/dmenu/plumb +++ b/dmenu/plumb @@ -52,6 +52,13 @@ if printf '%s\n' "$url" | grep '^\(https\?://\|www\.\)[^[:space:]./]\+\.[^[:spac } fi +if test $(printf '%s\n' "$sel" | wc -l) = 1 && printf '%s\n' "$sel" | grep -q '^[A-Za-z0-9_-]\{11,11\}$'; then + functions="$functions youtube" + youtube () { + exec $WEB_BROWSER -- "https://youtube.com/watch?v=$sel"; + } +fi + if printf '%s\n' "$url" | grep '^\(mailto:\)\?\("[^"]\+"\|[a-zA-Z0-9!#$%&'\''*+/=?^_`{|}~-]\+\(\.[a-zA-Z0-9!#$%&'\''*+/=?^_`{|}~-]\)*\)@[^[:space:]./]\+\.[^[:space:]/]*$' > /dev/null; then functions="$functions email-client" email-client () { |
