When running multiple ly instances across different TTYs there is no way to tell which TTY a given login screen belongs to at a glance.
This change adds a `show_tty` boolean config option (default `false`) that displays the active TTY number (e.g. `tty3`) in the top right corner. When the clock is also enabled the TTY label sits immediately to its right on the same row. When the clock is disabled it occupies the top right corner on its own.
I'm open to advice from the maintainers on the placement of the TTY label — positioning it next to the clock is simply my personal preference and it doesn't need to stay there if a different position is more appropriate.
Co-authored-by: Jackson Delahunt <jackson@stemn.com>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/956
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>
`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?
What was discussed in !912 before I accidentally caused it to auto merge (still not sure how that happened). I assume this is what was meant when asking for it to be in the startup script commented out.
## What existing issue does this resolve?
N/A
## Pre-requisites
- [x] I have tested & confirmed the changes work locally
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/920
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: hynak <hynak@noreply.codeberg.org>
Co-committed-by: hynak <hynak@noreply.codeberg.org>
## 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>
This addresses #808 and #823 conclusively for all parties.
- It requires no additional directory creation.
- It does not impact users who do not have a problem.
- It adds additional documentation detail in both the bug template and
the readme to help users who *are* having a problem.
- Fulfills the spirit of the [XDG Spec(https://specifications.freedesktop.org/basedir-spec/latest)
but not in practice as `$XDG_CONFIG_HOME` and `$HOME` and the associated
logic are not implemented. `~/.local/state` is the fallback location.
In particular, the spec indicates:
> It may contain: actions history (**logs**, history, …)
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/859
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: Corey Newton <corey.newton@zenoprax.com>
Co-committed-by: Corey Newton <corey.newton@zenoprax.com>
We should be able to parse the "minuid" and "maxuid"
values in /etc/rc.conf to get the UID range of the
system, with default values of 1000 to 32000 (as
they don't seem to be present by default).
Signed-off-by: AnErrupTion <anerruption@disroot.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>