Commit Graph

664 Commits

Author SHA1 Message Date
AnErrupTion 35be66e66f
termbox2: Log init errors
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-30 12:17:25 +02:00
AnErrupTion 0ac11065f4
ly-kmsconvt: Set TERM=linux
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-30 12:17:06 +02:00
AnErrupTion 9d8ccf6709
Fix termbox already being initialised when reclaiming
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-23 12:31:05 +02:00
AnErrupTion 6f3fdc4708
Merge branch 'master' of codeberg.org:fairyglade/ly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-22 17:16:53 +02:00
AnErrupTion 0cee1c039a
ly-kmsconvt: Remove usage of gone --seats argument
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-22 17:15:17 +02:00
Louis Pate f03aca0379 Be specific about zig version in readme (#996)
## What are the changes about?

There have been quite a few issues about the required zig version which
have appeared on codeberg recently. Largely these issues are opened
(like mine, #995) because individuals attempt to build using development
versions of zig and not the tagged releases.

The lack of a locked version (only a minimum) creates these issues.
Barring a locking mechanism, which I do not feel is my place to
implement, we should be clear to newer developers in Zig that you need
this specific version, not a development/master versioned release.

This is WIP mainly because I feel that a version file would be a better solution
than a README note, and I don't have enough zig experience or knowledge of
this repo to make a guess at what is best for this scenario.

## 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

Co-authored-by: Louis Pate <louispate@gmail.com>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/996
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-05-20 20:17:11 +02:00
AnErrupTion 0cd8b2ebfc
README: Add section for testing config changes (closes #994)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-18 19:46:28 +02:00
AnErrupTion 4c066ce564
Handle termbox2 errors
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-17 13:26:46 +02:00
AnErrupTion 05c1d4bece
Improve errors for lock state
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-16 10:33:06 +02:00
AnErrupTion 78794b3e10
Stream dur reading instead of reading all at once
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-15 23:22:50 +02:00
AnErrupTion afee1d9194
Remove TODO and stop forcing LLVM usage (again)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-15 21:46:20 +02:00
AnErrupTion 9b1965a3d8
Always build translate-c in Debug
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-15 21:42:13 +02:00
AnErrupTion 741e9e0345
Use correct naming convention for functions in DurFile.zig
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-12 20:35:17 +02:00
AnErrupTion de8579854c
Use $EXECUTABLE_NAME in kmscon service
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-11 21:03:01 +02:00
AnErrupTion ee3196bab8
Fix labels_max_length calculation (closes #984)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-11 21:00:52 +02:00
AnErrupTion 9ff4ddd129
Improve keyboard handling (closes #982)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-10 13:55:19 +02:00
Titanium Brain b3830d5bb6 fix(dur): apply correct offset for animations bigger than the terminal (#966)
Animations bigger than the rendering area would have an alignment to the
top left instead of center.

## What are the changes about?

Fixes incorrect offset calculations for dur movies bigger than the screen.

## 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/966
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-05-09 21:06:45 +02:00
Titanium Brain b8ae126623 Apply the typestate pattern to DurFormat (#972) 2026-05-04 12:34:32 +02:00
AnErrupTion 4db9295102
Fix building without X11
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-03 20:05:44 +02:00
AnErrupTion 864f5f2892
Implement syslog functionality (closes #
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-01 21:51:27 +02:00
AnErrupTion c50af66407
Fix log file race condition
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-01 20:54:54 +02:00
MartorSkull fdf241bed5 Add option to move the box relative to the screen size (#964)
## What are the changes about?

Added a new option in the configuration file for moving the box relative to the screen size.

```
box_h_position = 0.5
box_v_position = 0.5
```

The big clock is centered relative to the box. In the cases where it would be outside of the screen, it moves the box to fit in the screen.

## What existing issue does this resolve?

Add more options for personalization

## Examples

Normal usage:
```
box_h_position = 0.15
box_v_position = 0.35
```
![image](/attachments/6595dfa9-aade-45f4-887c-e5db7f8d5a89)

Clock would be outside of the screen vertically:
```
box_h_position = 0.15
box_v_position = -1.0
```
![image](/attachments/0d6bdcc4-e9dd-4671-a65d-b8b9f063ffb6)

Clock would be outside of the screen horizontally and vertically:
```
box_h_position = -1.0
box_v_position = -1.0
input_len = 3
```
![image](/attachments/630b07fd-b400-4e71-8a67-1baf3a6700a0)

Clock would be outside of the screen horizontally and vertically on the bottom left of the screen:
```
box_h_position = 2.0
box_v_position = 2.0
input_len = 3
```
![image](/attachments/28902967-11a8-4c02-a4c9-1b92f9a728ee)

## What existing issue does this resolve?

_Replace this with a reference to an existing issue, or N/A if there is none_

## Pre-requisites

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

Co-authored-by: AnErrupTion <anerruption+codeberg@disroot.org>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/964
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-05-01 20:09:34 +02:00
AnErrupTion 79eebd8ee0
Prefer std.log instead of stderr directly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-01 17:43:28 +02:00
AnErrupTion 3869bfd2f9
Add config validation argument (closes #969)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-01 17:40:04 +02:00
AnErrupTion 5905e054c5
Start Ly v1.5.0 development cycle
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-05-01 07:47:48 +02:00
AnErrupTion 807f6d249a
Remove further & all @cImport() usage in interop
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-04-30 22:48:29 +02:00
AnErrupTion 15cd0c4779
Use SIGINT instead of SIGCHILD for TTY control transfer
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-04-30 14:38:56 +02:00
AnErrupTion 51c5c3ee0b
Fix waitpid() being interrupted by SIGCHLD
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-04-29 22:52:58 +02:00
AnErrupTion 59c07aa3ba
Fix xauth log not being flushed
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-04-28 19:35:21 +02:00
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