diff options
Diffstat (limited to '.config/mpv/scripts/hooks.lua')
| -rw-r--r-- | .config/mpv/scripts/hooks.lua | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/.config/mpv/scripts/hooks.lua b/.config/mpv/scripts/hooks.lua deleted file mode 100644 index 4f350ec..0000000 --- a/.config/mpv/scripts/hooks.lua +++ /dev/null @@ -1,27 +0,0 @@ -local mp = require("mp") -local utils = require("mp.utils") - -local function run(...) - utils.subprocess_detached({ - args = { "sh", "-c", table.concat({ ... }, " ") .. " >/dev/null 2>&1" }, - max_size = 0, - cancellable = false, - }) -end - -mp.register_event("file-loaded", function() - local function cb(n, vo) - -- mp.msg.warn(n, vo) - if vo == true then - run("makoctl", "mode", "-a", "off") - run("svdn", "wlsunset") - mp.unobserve_property(cb) - end - end - mp.observe_property("vo-configured", "bool", cb) -end) - -mp.register_event("shutdown", function() - run("makoctl", "mode", "-r", "off") - run("svup", "wlsunset") -end) |