summaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2015-11-21 19:53:29 +0100
committerQuentin Rameau <quinq@fifth.space>2015-11-21 19:53:29 +0100
commit954a7181970f61acd54ce82cdff4195e72530db1 (patch)
tree94632ffa9ed89e16c7eb6004408edef6fcb13e26 /config.def.h
parent26eb2f761c70036bae3a4ee866adb21e9dd97695 (diff)
Add mouse function to play medias in external player
Control + left click launches mpv with the target media url.
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index 6d62c98..32ef407 100644
--- a/config.def.h
+++ b/config.def.h
@@ -65,6 +65,13 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
} \
}
+/* VIDEOPLAY(URI) */
+#define VIDEOPLAY(u) {\
+ .v = (const char *[]){ "/bin/sh", "-c", \
+ "mpv --really-quiet \"$0\"", u, NULL \
+ } \
+}
+
/* styles */
/*
* The iteration will stop at the first match, beginning at the beginning of
@@ -142,4 +149,5 @@ static Button buttons[] = {
{ OnLink, MODKEY, 1, clicknewwindow, { .b = 1 }, 1 },
{ OnAny, 0, 8, clicknavigate, { .i = -1 }, 1 },
{ OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 },
+ { OnMedia, MODKEY, 1, clickexternplayer, { 0 }, 1 },
};