aboutsummaryrefslogtreecommitdiffstats
path: root/dmenu/plumb
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-14 21:15:58 +0100
committerMattias Andrée <m@maandree.se>2026-02-14 21:15:58 +0100
commitbbe6fedf22ed25a446be63e3b27a5c9ad4d75b9b (patch)
tree59154cac8f789b0a7bfb31b76eabd221a8c66ff0 /dmenu/plumb
parentglobal hotkey super+a: select default audio sink (diff)
downloaddotfiles-bbe6fedf22ed25a446be63e3b27a5c9ad4d75b9b.tar.gz
dotfiles-bbe6fedf22ed25a446be63e3b27a5c9ad4d75b9b.tar.bz2
dotfiles-bbe6fedf22ed25a446be63e3b27a5c9ad4d75b9b.tar.xz
Add super+ctrl+p action to open youtube videoHEADmaster
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'dmenu/plumb')
-rwxr-xr-xdmenu/plumb7
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 () {