aboutsummaryrefslogtreecommitdiff
path: root/lua/sleep.lua
diff options
context:
space:
mode:
authorben <ben@nagy.contact>2025-01-02 13:13:11 -0800
committerben <ben@nagy.contact>2025-01-02 13:13:11 -0800
commit17afdd47194da24b581075f01d678342c4b56f14 (patch)
treebea0b4dd51fd68d164715e7c72f8fc7109e5fe68 /lua/sleep.lua
parent16fb12c35ea3a89d3f35c7725e04994e93a407a3 (diff)
a hello world
Diffstat (limited to 'lua/sleep.lua')
-rw-r--r--lua/sleep.lua12
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()