tAdd binding for opening current page in mpv(1) - surf - [fork] customized build of surf, the suckless webkit browser
(HTM) git clone git://src.adamsgaard.dk/surf
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit ffe1ff6cc3193f72e9f28aaa928b7070a8055740
(DIR) parent 0c93919efef6038e46c203dcf3f155ffdbdf459e
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 25 Jun 2020 22:24:06 +0200
Add binding for opening current page in mpv(1)
Diffstat:
M config.h | 10 ++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/config.h b/config.h
t@@ -111,6 +111,15 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
} \
}
+/* VIDEOPLAYTABBED(URI) */
+#define VIDEOPLAYTABBED(u) {\
+ .v = (const char *[]){ "/bin/sh", "-c", \
+ "mpv --really-quiet \"$(echo $(xprop -id $0 $1 | \
+ cut -d '\"' -f2) )\"",\
+ winid, u, NULL \
+ } \
+}
+
/* BOOKMARK(URI) */
#define BOOKMARKURI(r) {\
.v = (const char *[]){ "st", "-e", "/bin/sh", "-c", \
t@@ -180,6 +189,7 @@ static Key keys[] = {
{ MODKEY, GDK_KEY_u, scrollv, { .i = -50 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_u, spawn, PLUMBER("_SURF_URI") },
{ MODKEY, GDK_KEY_i, scrollh, { .i = +10 } },
+ { MODKEY, GDK_KEY_m, spawn, VIDEOPLAYTABBED("_SURF_URI") },
{ MODKEY|GDK_SHIFT_MASK, XK_Next, zoom, { .i = -1 } },