`waylandsessions` and `xsessions` are currently non-optional string fields, so there is no clean way to disable session type discovery for users who do not use Wayland or X11. Setting them to a nonexistent path works but produces log errors on every startup.
This change makes both fields optional (`?[]const u8`), consistent with other nullable config fields such as `xinitrc`. Setting either to `null` in `config.ini` cleanly skips crawling for that session type with no side effects.
Co-authored-by: Jackson Delahunt <jackson@stemn.com>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/954
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: Jackson Delahunt <sabrehagen@noreply.codeberg.org>
Co-committed-by: Jackson Delahunt <sabrehagen@noreply.codeberg.org>
## What are the changes about?
Adds customizable commands and labels to ly.
Solves https://codeberg.org/fairyglade/ly/issues/905.
Since Ly doesn't use INI headers. I use them exclusively for declarations of custom commands and labels.
### Commands
Bind a keybind to a command, and add a hint to the HUD. Useful for use cases like display brightness, switching between GPUs, etc.
Supports localization in the `name` field only. ex: where `lang = es`: `$brightness_up` => `bajar brillo`
Declared in config.ini with the following:
```ini
[cmd:F8]
name = custom command 2
cmd = touch /tmp/ly.gaming
```
### Labels
Add a label to the HUD. As specified in #905.
The text of the label corresponds to the output of the command specified in `[lbl:NAME]`.
Only shows the first line of the output.
Declared in config.ini with the following:
```ini
[lbl:kernel]
cmd = uname -srn
refresh = 0
```
Example to add to the config.ini:
```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
# 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- do not refresh.
refresh = 0
# 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.
[]
```
## Pre-requisites
- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/945
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: RadsammyT <radsammyt@gmail.com>
Co-committed-by: RadsammyT <radsammyt@gmail.com>
## What are the changes about?
Add support for letting a user use a negative offset (#880), alignment, and logo. Below is example of the logo file, I hope it is what was request :). It has no padding so a user can move the alignment and offset to get it how they want on screen.
This technically is good to go, except I didn't upload the logo file as I'm not sure where to add the animation file to get it to here: $CONFIG_DIRECTORY/ly/example.dur

## What existing issue does this resolve?
#880
## Pre-requisites
- [x] I have tested & confirmed the changes work locally
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/893
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: hynak <hynak@noreply.codeberg.org>
Co-committed-by: hynak <hynak@noreply.codeberg.org>
A couple things to fix in the new battery status display configuration.
I think this should be disabled by default. My reasoning:
- Historically a conservative approach is taken with new capabilities in Ly; even the clock is disabled by default
- The existing default creates a regression (error message) for anyone without `/sys/class/power_supply/BAT0` on their system (all non-portable PCs, and laptops that use a different identifier)
- The battery status check causes animations to momentarily hang at a regular interval
Other changes:
- Comment for `battery_id` aligned with similar config switch comments (description / useful information / effect of null setting)
- `battery_id` moved to its correct alphabetical position in the config file
- Setting aligned between `Config.zig` and `config.ini` (the prototypical config file should reflect the actual default)
- Configurations prefixed with `hide_` alphabetized
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/852
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: Matthew Rothlisberger <mattjrothlis@gmail.com>
Co-committed-by: Matthew Rothlisberger <mattjrothlis@gmail.com>
config.save already makes it redundant. Besides, who would want
to save the current username & session, but not want to load it
at the next boot?
Signed-off-by: AnErrupTion <anerruption@disroot.org>
Added P,A,M characters to bigclock and added 12hr and seconds support to bigclock via `bigclock_12hr` and `bigclock_seconds` in the config.

Image has bigclock_12hr and bigclock_seconds enabled.
Farsi characters for P,A,M are blank since I don't know what it would look like in their language. (should i have just used the english characters as a placeholder?)
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/805
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: RadsammyT <radsammyt@gmail.com>
Co-committed-by: RadsammyT <radsammyt@gmail.com>
* Change config type for bigclock
* Seprates big clock's hard codes from its logic
* Adds Farsi (fa) to big clock langs
* Minor changes
* Makes requested changes