commit c554a60588eaa5f86953d46112487260901a0348
parent e2916c7ad2daa25bb5df83c2842c3ad8d2168a7c
Author: Cem Keylan <cem@ckyln.com>
Date: Sat, 23 Nov 2019 18:03:00 +0300
add playexternal patch
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -232,6 +232,7 @@ static Key keys[] = {
{ MODKEY, GDK_KEY_y, externalpipe, { .v = yanklink } },
{ MODKEY, GDK_KEY_m, spawn, BM_ADD("_SURF_URI") },
{ MODKEY, GDK_KEY_s, spawn, SEARCH() },
+ { MODKEY, GDK_KEY_w, playexternal, { 0 } },
};
/* button definitions */
diff --git a/surf.c b/surf.c
@@ -233,6 +233,7 @@ static void togglefullscreen(Client *c, const Arg *a);
static void togglecookiepolicy(Client *c, const Arg *a);
static void toggleinspector(Client *c, const Arg *a);
static void find(Client *c, const Arg *a);
+static void playexternal(Client *c, const Arg *a);
static void insert(Client *c, const Arg *a);
static void externalpipe(Client *c, const Arg *a);
static void search(Client *c, const Arg *a);
@@ -2096,6 +2097,15 @@ clickexternplayer(Client *c, const Arg *a, WebKitHitTestResult *h)
spawn(c, &arg);
}
+void
+playexternal(Client *c, const Arg *a)
+{
+ Arg arg;
+
+ arg = (Arg)VIDEOPLAY(geturi(c));
+ spawn(c, &arg);
+}
+
int
main(int argc, char *argv[])
{