From bbe6fedf22ed25a446be63e3b27a5c9ad4d75b9b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 14 Feb 2026 21:15:58 +0100 Subject: Add super+ctrl+p action to open youtube video MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dmenu/plumb | 7 +++++++ 1 file changed, 7 insertions(+) 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 () { -- cgit v1.2.3-70-g09d2