From 94ad728f49ceb99ab9c75a8ac5edbfcd708066dd Mon Sep 17 00:00:00 2001 From: Alen Date: Sun, 19 Jan 2025 19:06:44 +0400 Subject: Add mpv config --- dot_config/mpv/scripts/audio-osc.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 dot_config/mpv/scripts/audio-osc.lua (limited to 'dot_config/mpv/scripts/audio-osc.lua') diff --git a/dot_config/mpv/scripts/audio-osc.lua b/dot_config/mpv/scripts/audio-osc.lua new file mode 100644 index 0000000..ded629d --- /dev/null +++ b/dot_config/mpv/scripts/audio-osc.lua @@ -0,0 +1,9 @@ +-- show osc all the time when file is an audio file. +-- source: https://github.com/mpv-player/mpv/issues/3500#issuecomment-305646994 + +mp.register_event("file-loaded", function() + local hasvid = mp.get_property_osd("video") ~= "no" + mp.commandv("script-message", "osc-visibility", (hasvid and "auto" or "always"), "no-osd") + -- remove the next line if you don't want to affect the osd-bar config + mp.commandv("set", "options/osd-bar", (hasvid and "yes" or "no")) +end) \ No newline at end of file -- cgit 1.4.1-2-gfad0