Created
April 25, 2016 11:00
-
-
Save LemonBoy/c8f966b74433feb23d3e5d3edee5248d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local utils = require("mp.utils") | |
function enableDpms(v) | |
if v then | |
arg = '+dpms' | |
else | |
arg = '-dpms' | |
end | |
utils.subprocess({ args = { 'xset', arg } }) | |
end | |
-- Disable the screen blanking when playing a film | |
mp.observe_property("pause", "bool", function(k, v) enableDpms(v) end) | |
mp.register_event("shutdown", function(ev) enableDpms(true) end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment