summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsxv478 <vt0451@yandex.ru>2022-09-27 11:47:02 +0300
committertsxv478 <vt0451@yandex.ru>2022-09-27 11:47:02 +0300
commit66f6efcef9f8f83a1d270003beee7aceb60dcfaf (patch)
tree370659390d3fee8910795bad71c2fb767dabaca1
parent9b7c59e32d5980856f3e8a066dbf5e84ff61d030 (diff)
play external
-rw-r--r--config.def.h2
-rw-r--r--surf.c10
2 files changed, 12 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index 305957d..edf61b1 100644
--- a/config.def.h
+++ b/config.def.h
@@ -141,6 +141,8 @@ static Key keys[] = {
{ MODKEY, GDK_KEY_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND", PROMPT_FIND) },
{ MODKEY, GDK_KEY_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND", PROMPT_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 6f5ba5b..ca18d56 100644
--- a/surf.c
+++ b/surf.c
@@ -243,6 +243,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);
@@ -2028,6 +2029,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[])
{