From 2a2e0d738cd0529f506c75dda046aa7797beed00 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Sun, 4 Oct 2026 09:11:23 +0200 Subject: [PATCH] config: Fix documentation & missing binds Signed-off-by: AnErrupTion --- ly-core/src/root.zig | 1 - res/config.lua | 39 ++++++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ly-core/src/root.zig b/ly-core/src/root.zig index 7e0b5f4..e64f71c 100644 --- a/ly-core/src/root.zig +++ b/ly-core/src/root.zig @@ -314,7 +314,6 @@ pub fn LuaParser(comptime Struct: type) type { if (binding_type != .string) continue; const binding = lua.toString(-1) catch continue; const bindingZ = temporary_allocator.dupe(u8, binding) catch ""; - std.debug.print("{s}", .{bindingZ}); lua.pop(1); // binding value if (!custom.binds.contains(bindingZ)) { diff --git a/res/config.lua b/res/config.lua index d233fbb..f675b5b 100644 --- a/res/config.lua +++ b/res/config.lua @@ -204,7 +204,7 @@ ly = { corner_bottom_right = "labels", -- Top left - corner_top_left = "shutdown,restart,britup,britdown,password battery", + corner_top_left = "shutdown,restart,britup,britdown,password battery binds", -- Top right corner_top_right = "clock numlock,capslock", @@ -476,23 +476,28 @@ ly = { -- Comments preceding with '-- --' are for documentation. -- Comments preceding with '--' comment out the example code. - -- custom_commands = { - -- -- Declare a command with the F8 binding. - -- binding = "F8", - -- -- The name of the command to show up in Ly. - -- -- Note: "$" in "$brightness_up" fetches the appropriate string from the specified locale file - -- -- and is replaced with the value representing "brightness_up". - -- -- You can see the list of keys in any locale file in $CONFIG_DIRECTORY/ly/lang.name = "custom command $brightness_up", - -- cmd = "touch /tmp/ly.gaming", - -- }, + custom_commands = { + { + -- Declare a command with the F8 binding. + binding = "F8", + -- The name of the command to show up in Ly. + -- Note: "$" in "$brightness_up" fetches the appropriate string from the specified locale file + -- and is replaced with the value representing "brightness_up". + -- You can see the list of keys in any locale file in $CONFIG_DIRECTORY/ly/lang. + name = "custom command $brightness_up", + cmd = "touch /tmp/ly.gaming", + }, + }, -- custom_labels = { - -- -- Declare a label with an ID. This ID should be unique across all labels. - -- label = "kernel", - -- cmd = "uname -srn", - -- -- Optional, defaulting to 0. - -- -- In frames, the time to re-run the command and update the label. - -- -- If 0, only run once and do not refresh afterwards - -- refresh = 0, + -- { + -- -- Declare a label with an ID. This ID should be unique across all labels. + -- label = "kernel", + -- cmd = "uname -srn", + -- -- Optional, defaulting to 0. + -- -- In frames, the time to re-run the command and update the label. + -- -- If 0, only run once and do not refresh afterwards + -- refresh = 0, + -- }, -- } }