diff options
author | Alen <alen@dotfiles.xyz> | 2025-01-19 19:06:44 +0400 |
---|---|---|
committer | Alen <alen@dotfiles.xyz> | 2025-01-19 19:06:44 +0400 |
commit | 94ad728f49ceb99ab9c75a8ac5edbfcd708066dd (patch) | |
tree | 038a430cbe4bf7223d661fb60a3408f0b56828f1 /dot_config/mpv/scripts/audio-osc.lua | |
parent | f73915ba4fd151b6fc2e4a74b8c54cc7b6e23042 (diff) |
Add mpv config
Diffstat (limited to 'dot_config/mpv/scripts/audio-osc.lua')
-rw-r--r-- | dot_config/mpv/scripts/audio-osc.lua | 9 |
1 files changed, 9 insertions, 0 deletions
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 |