55 lines
1.5 KiB
Diff
55 lines
1.5 KiB
Diff
|
From 95e17b5bd428173c83e60cec9cd5666cfe9066fa Mon Sep 17 00:00:00 2001
|
||
|
From: DanMan <dnahimov@gmail.com>
|
||
|
Date: Wed, 24 Jul 2019 18:47:46 -0400
|
||
|
Subject: [PATCH] added playexternal hotkey function
|
||
|
|
||
|
---
|
||
|
config.def.h | 2 ++
|
||
|
surf.c | 10 ++++++++++
|
||
|
2 files changed, 12 insertions(+)
|
||
|
|
||
|
diff --git a/config.def.h b/config.def.h
|
||
|
index 6d3135e..5fa0d9d 100644
|
||
|
--- a/config.def.h
|
||
|
+++ b/config.def.h
|
||
|
@@ -105,6 +105,8 @@ static Key keys[] = {
|
||
|
{ MODKEY, GDK_KEY_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||
|
{ MODKEY, GDK_KEY_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
|
||
|
|
||
|
+ { MODKEY, GDK_KEY_w, playexternal, { 0 } },
|
||
|
+
|
||
|
{ 0, GDK_KEY_Escape, stop, { 0 } },
|
||
|
{ MODKEY, GDK_KEY_c, stop, { 0 } },
|
||
|
|
||
|
diff --git a/surf.c b/surf.c
|
||
|
index 93a1629..e74e9df 100644
|
||
|
--- a/surf.c
|
||
|
+++ b/surf.c
|
||
|
@@ -217,6 +217,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);
|
||
|
|
||
|
/* Buttons */
|
||
|
static void clicknavigate(Client *c, const Arg *a, WebKitHitTestResult *h);
|
||
|
@@ -1648,6 +1649,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[])
|
||
|
{
|
||
|
--
|
||
|
2.22.0
|
||
|
|