diff --git a/res/config.ini b/res/config.ini index 96054fe..243416b 100644 --- a/res/config.ini +++ b/res/config.ini @@ -384,34 +384,40 @@ xsessions = $PREFIX_DIRECTORY/share/xsessions # The following examples below give an outline for setting up custom commands and labels. # Unless specified as optional, an option is mandatory. -#--- +# Comments preceding with '##' are for documentation. +# Comments preceding with '#' comment out the example INI. + +##--- # Declare a command with the F8 binding. -[cmd:F8] -#The name of the command to show up in Ly. -name = custom command -cmd = touch /tmp/ly.gaming -# X position starting from the top-left of the label. Positive Axis goes right. -posX = 0 -# Y position starting from the top-left of the label. Positive Axis goes down. -posY = 1 -# Declare a label with an ID. This ID should be unique across all labels. -[lbl:kernel] -cmd = uname -srn -# In frames, the time to re-run the command and update the label. -refresh = 0 -# See posY for [cmd:F8]. -posY = 1 -# See posX for [cmd:F8]. -posX = 0 -# Optional. Moves the label to the right of the terminal. Positive Axis now goes left. -# If 0, only run once and do not refresh afterwards -invertX = true -# Optional. Moves the label to the bottom of the terminal. Positive Axis now goes up. -invertY = true - -# Once you're done setting up labels and commands, add an empty header -# below to continue configurating the rest of Ly. -# Put other settings not belonging to custom commands/labels below here. -[] - -#--- +#[cmd: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 +## X position, starting from the top-left, of the label. Positive Axis goes right. +#posX = 0 +## Y position, starting from the top-left, of the label. Positive Axis goes down. +#posY = 1 +## Declare a label with an ID. This ID should be unique across all labels. +#[lbl:kernel] +#cmd = uname -srn +## 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 +## See posY for [cmd:F8]. +#posY = 1 +## See posX for [cmd:F8]. +#posX = 0 +## Optional. Moves the label to the right of the terminal. Positive Axis now goes left. +#invertX = true +## Optional. Moves the label to the bottom of the terminal. Positive Axis now goes up. +#invertY = true +# +## Once you're done setting up labels and commands, add an empty header +## below to continue configurating the rest of Ly. +## Put other settings not belonging to custom commands/labels below here. +#[] +# +##--- diff --git a/src/main.zig b/src/main.zig index 9086cee..7275c2b 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1773,7 +1773,7 @@ fn updateCustomInfo(lbl: *Label, ptr: *anyopaque) !void { else if (stdout.items.len == 0) try stdout.print(state.allocator, "{s}: [No output{s}]", .{ i.info.name, - if (stderr.items.len > 0) ". Check command" else "" + if (stderr.items.len > 0) ": Possible Error" else "" }); state.allocator.free(lbl.text); lbl.text = try state.allocator.dupe(u8, stdout.items);