diff options
Diffstat (limited to 'lua/sleep.lua')
-rw-r--r-- | lua/sleep.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lua/sleep.lua b/lua/sleep.lua index bba30f2..462e6e1 100644 --- a/lua/sleep.lua +++ b/lua/sleep.lua @@ -1,11 +1,13 @@ -local function set_brightness() - mp.set_property_number("brightness", -50) - mp.commandv("seek", "20", "relative") +-- this is executed when the user invokes it through gesturing +local function foo() + mp.osd_message("Hello World!", 2) end +-- this is called immediately upon opening a file local function init() - mp.set_property_bool("pause", true) + mp.msg.info("Sleep timer script initialized") + mp.osd_message("Sleep timer script initialized!", 3) end -mp.add_key_binding(nil, "test", set_brightness) +mp.add_key_binding(nil, "sleep", foo) init() |