Commit Graph

635 Commits

Author SHA1 Message Date
AnErrupTion 80d4b114f3
Fix 32-bit issues on Ly's side
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-04-26 18:37:33 +02:00
RadsammyT 4f45d92ea8 Fix: battery label positioning, custom keybinds not disappearing on `hide_key_hints = false` (#970)
## What are the changes about?

Fixes battery label positioning in regards to custom binds.
Since the label was on the top-left, it only accounted for the first line of built-in keybinds, and it didn't account for the other lines of custom ones.

This also fixes the custom keybinds not disappearing on `hide_key_hints = false`, which is my bad. whoops.

Also, with https://codeberg.org/fairyglade/ly/pulls/963 being a thing, we should probably think about deprecating this hardcoded battery label in favor of a custom label command, top-left by default.

## What existing issue does this resolve?

N/A

## Pre-requisites

- [x] I have tested & confirmed the changes work locally
- [x] I have run `zig fmt` throughout my changes

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/970
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-04-26 09:37:39 +02:00
AnErrupTion 5edf5251f6 Update to Zig 0.16.0 (#962)
Signed-off-by: AnErrupTion <anerruption@disroot.org>

## What are the changes about?

Ports the code base to Zig 0.16.0.

## What existing issue does this resolve?

N/A

## Pre-requisites

- [x] I have tested & confirmed the changes work locally
- [x] I have run `zig fmt` throughout my changes

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/962
2026-04-25 17:37:34 +02:00
Jackson Delahunt eec83179b9 config: add shell option to hide the shell session (#955)
The shell session is unconditionally added to the session list with no way to hide it. This is inconsistent with `xinitrc`, which is omitted from the list when set to `null`.

This change adds a `shell` boolean config option (default `true`). Setting it to `false` hides the shell session from the list, following the same pattern as `xinitrc`.

Co-authored-by: Jackson Delahunt <jackson@stemn.com>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/955
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>
2026-04-01 19:00:37 +02:00
Jackson Delahunt b8048234d9 config: add show_tty option to display active TTY in top right corner (#956)
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>
2026-04-01 18:51:37 +02:00
Jackson Delahunt 10a873acb9 config: allow waylandsessions and xsessions to be set to null (#954)
`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>
2026-03-29 08:32:27 +02:00
AnErrupTion 142476041d
Update French translation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-28 12:09:41 +01:00
RacerBG fad683e035 Update the Bulgarian translation (#952)
## What are the changes about?

As the title says.

## What existing issue does this resolve?

N/A

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/952
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: RacerBG <racerbg@noreply.codeberg.org>
Co-committed-by: RacerBG <racerbg@noreply.codeberg.org>
2026-03-28 12:07:10 +01:00
AnErrupTion e882eea22a
Improve bug report template
Notably, don't make the issue reproduction on a fresh install required.
This'll likely filter out the honest people who have actually done it
from the others who haven't.

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 23:18:16 +01:00
RadsammyT fe6942d406 fix: custom label and bind ordering (#951)
## What are the changes about?

Fixes the order of custom labels and binds because of a HashMap shenanigan (no guaranteed order), so we use `ArrayHashMap` instead which preserves insertion order.  They should now be shown in the order they are declared in the config.

![image](/attachments/7a928c5f-fbbe-4a60-b120-3feddbcdfdb6)

![image](/attachments/22afe011-00a0-4a29-90ab-060e1d059c75)

## What existing issue does this resolve?

!950

## Pre-requisites

- [x] I have tested & confirmed the changes work locally
- [x] I have run `zig fmt` throughout my changes

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/951
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: RadsammyT <radsammyt@gmail.com>
Co-committed-by: RadsammyT <radsammyt@gmail.com>
2026-03-27 22:46:37 +01:00
AnErrupTion 5b7c7dfdf5
migrator.zig: Run zig fmt
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 21:34:32 +01:00
AnErrupTion 074bb0a68a
Improve custom command sample config readability (closes #949)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 20:34:39 +01:00
AnErrupTion e0a3364169
Merge branch 'master' of codeberg.org:fairyglade/ly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 17:17:18 +01:00
RadsammyT 7a8d913531 Feature: Add custom command & label support (#945)
## 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

![image](/attachments/f9373ac9-567e-4f47-987c-1df6f4ee0d84)

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>
2026-03-27 17:15:49 +01:00
AnErrupTion 984ac596af
Group for loops in event loop
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-26 21:55:35 +01:00
AnErrupTion ed486c29d2
Add xauth file as X server argument
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-26 21:10:50 +01:00
AnErrupTion a6fc5d67e8
Use upstream zigini library
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 22:43:05 +01:00
AnErrupTion 549576aa3e
Make box widget not position-dependent
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 22:06:57 +01:00
AnErrupTion 3758b5da1b
Mention -quiet argument for X11 server (closes #722)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 21:10:09 +01:00
AnErrupTion 5e1c681385
Update screenshot (closes #948)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 20:49:53 +01:00
AnErrupTion ac78ccc398
Update Kawaii-Ash's GitHub username
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 20:06:59 +01:00
Tom e548333473 Improve README.md (#946)
Signed-off-by: Tom <tom@helix.me.uk>

## What are the changes about?

Sentence structure updates and converting text to md syntax

## What existing issue does this resolve?

Fixes: #943

- Updated a few sentences to make them more understandable
- Converted the **Note**'s etc to md formatting.

## Pre-requisites

- [✓] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/946
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: Tom <tripplehelix@noreply.codeberg.org>
Co-committed-by: Tom <tripplehelix@noreply.codeberg.org>
2026-03-21 19:30:23 +01:00
AnErrupTion 60e3380375
Switch to single-instance Widget model
And make widget() functions return pointers to widgets instead of just
widgets

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-21 16:19:33 +01:00
AnErrupTion aa392837bc
Require "zig fmt" to be run in a PR
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-21 16:01:03 +01:00
AnErrupTion abe72c74ff
Optimise event loop initialisation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-18 20:26:00 +01:00
Mr. Cat dda56eab37 Fix compilation error when building without X11 support (#947)
## What are the changes about?

Add an argument to info log function to fix compiler error.

## What existing issue does this resolve?

If building with `zig build -Denable_x11_support=false` there is a compiler error about a missing argument.
```
install
└─ install ly
   └─ compile exe ly Debug native 1 errors
src/main.zig:730:27: error: member function expected 3 argument(s), found 2
        try state.log_file.info(
            ~~~~~~~~~~~~~~^~~~~
ly-core/src/LogFile.zig:26:5: note: function declared here
pub fn info(self: *LogFile, category: []const u8, comptime message: []const u8, args: anytype) !void {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    callMain [inlined]: /home/oskar/.cache/zig/p/N-V-__8AACFNhBSaulceFT2Wx6Mx-ycGtZh7CEztyVdtX2jW/lib/std/start.zig:627:37
    callMainWithArgs [inlined]: /home/oskar/.cache/zig/p/N-V-__8AACFNhBSaulceFT2Wx6Mx-ycGtZh7CEztyVdtX2jW/lib/std/start.zig:587:20
    main: /home/oskar/.cache/zig/p/N-V-__8AACFNhBSaulceFT2Wx6Mx-ycGtZh7CEztyVdtX2jW/lib/std/start.zig:602:28
    1 reference(s) hidden; use '-freference-trace=4' to see all references
```

## Pre-requisites

- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/947
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: Mr. Cat <mrcat@posteo.com>
Co-committed-by: Mr. Cat <mrcat@posteo.com>
2026-03-18 20:18:45 +01:00
AnErrupTion 9c50297059
Fix insert mode hack + fix bugs
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 23:58:06 +01:00
AnErrupTion acac884cfe
Add support for local keybinds
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 22:58:39 +01:00
AnErrupTion a89c918c5d
Move back custom widgets into main project
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 21:59:24 +01:00
AnErrupTion 64539f4342
Split UI code into ly-ui library
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 21:44:33 +01:00
AnErrupTion 93696a6b30
Remove unused import + add TODO
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 21:03:59 +01:00
AnErrupTion 4f26eeada0
Fix double spacing issue in labels
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 20:10:47 +01:00
AnErrupTion 83e98a185f
Add TODO in main.zig
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 20:01:47 +01:00
AnErrupTion 128dcb16f8
Merge branch 'master' of codeberg.org:fairyglade/ly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 19:58:58 +01:00
Luna 3a4109eb2d Add toggle visibility to password (#938)
## What are the changes about?

I have add a keybinding to toggle the visibility of the password

## 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/938
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: Luna <luna-39@noreply.codeberg.org>
Co-committed-by: Luna <luna-39@noreply.codeberg.org>
2026-03-17 12:27:23 +01:00
GalaxyShard 7cefff4570 Add Esperanto translation (#942)
Title.

- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/942
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: GalaxyShard <dominic.adragna@byteroach.com>
Co-committed-by: GalaxyShard <dominic.adragna@byteroach.com>
2026-03-16 23:16:43 +01:00
OSVidYapan f31c55b562 Improve README.md (#940)
For anyone who doesn't know see this thread;
https://codeberg.org/fairyglade/ly/pulls/934
This is the original post i have fixed the commit log issue
(by recreating entire new fork)
Note that is is also grammarly fixed version.
(mostly please advise if i still have those mistakes)

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/940
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: OSVidYapan <osvidyapan@noreply.codeberg.org>
Co-committed-by: OSVidYapan <osvidyapan@noreply.codeberg.org>
2026-03-16 21:13:08 +01:00
AnErrupTion 9cde291ac7
Remove unused termbox alias
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-27 22:19:09 +01:00
AnErrupTion 03d976171a
Fix battery level overlapping shutdown label (fixes #935)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-27 20:28:11 +01:00
AnErrupTion b01e4afc79
Make default startup script more compatible
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 17:10:52 +01:00
AnErrupTion 5a4605ffb6
Add layering system for widgets
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 11:29:14 +01:00
AnErrupTion 01dcfa207e
Show UI errors in info line again
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 11:20:54 +01:00
AnErrupTion 32d5330efb
Move the event loop to a separate function
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 01:19:19 +01:00
AnErrupTion 5564fed664
Add Widget.calculateTimeout function
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 00:27:07 +01:00
AnErrupTion 7c7aed9cb2
Make animation timeout independent of event loop
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 23:51:32 +01:00
AnErrupTion 57c96a3478
Fix animation timeout bug + remove redundant check
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 22:55:10 +01:00
AnErrupTion 6773f74788
Add widget display name to improve logging
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 21:51:07 +01:00
AnErrupTion b389e379fa
Make handling inputs widget-independent
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 21:00:00 +01:00
hynak 4a72e41e44 Fix default startup script (#929)
## What are the changes about?

Discussed in !920. Adds fixes to the startup script by removing the array usage (some shells use arrays different/unsupported) and adds stdout_behavior Inherit flag to the child process to propagate the echos to the TTY.

## 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/929
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: hynak <hynak@noreply.codeberg.org>
Co-committed-by: hynak <hynak@noreply.codeberg.org>
2026-02-10 22:20:30 +01:00
AnErrupTion d268d5bb45
Add the cascade animation as a separate widget
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-10 17:43:55 +01:00