summaryrefslogtreecommitdiff
path: root/mpv/music/online.lua
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2023-05-17 00:09:51 +0200
committerMartial Simon <msimon_fr@hotmail.com>2023-05-17 00:09:51 +0200
commit5d3c0b24405381a41bd13a3135fa2969c2b47a48 (patch)
treec59a2521159b90daac9e139e5ebaeaf24dd3fa0f /mpv/music/online.lua
parent436159f3542d4e11c81ff927ab6b22f5ad2619e0 (diff)
parentca1fba1ef518b2f55bc168e9782b500dfec67c16 (diff)
Merge branch 'main' of https://github.com/Laitram31/config
Diffstat (limited to 'mpv/music/online.lua')
-rw-r--r--mpv/music/online.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/mpv/music/online.lua b/mpv/music/online.lua
new file mode 100644
index 0000000..bcd5d18
--- /dev/null
+++ b/mpv/music/online.lua
@@ -0,0 +1,9 @@
+local utils = require "mp.utils"
+
+function notify_current_media(key)
+ local title = mp.get_property(key)
+ mp.command_native({"run", "pkill", "-RTMIN+1", "dwmblocks"})
+ return mp.command_native({"run", "env", "HERBE_ID=/music", "herbe", title})
+end
+
+mp.observe_property("media-title", string, notify_current_media) \ No newline at end of file