Commit Graph

708 Commits

Author SHA1 Message Date
AnErrupTion 7c2ae2738c
positionSingleWidget: Resist integer overflows
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-10 13:02:58 +02:00
AnErrupTion 84950136c9
positionWidgets: Less integer overflows possible
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-10 00:15:07 +02:00
AnErrupTion d00780d6ce
zig: Remove usage of [*c]
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-08 01:29:57 +02:00
AnErrupTion 014a00d33e
Improve templates
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-07 22:35:06 +02:00
AnErrupTion fb544b3357
Change default box_position_v to 0.5
This can potentially be confusing to users.

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-07 12:22:43 +02:00
AnErrupTion 5ccd91c132
Prepare for Zig 0.17.0
Still requires Zig 0.16.x for now.

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-07 11:51:05 +02:00
AnErrupTion 78c7c2e2e8
Decouple save file path from config directory (closes #1025)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 22:11:52 +02:00
AnErrupTion a41ebe8f6f
Remove cornersContain()
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 21:33:30 +02:00
AnErrupTion e4e399cd07
Allow toggling visibility of shutdown, restart & show password keybinds
(closes #993)

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 21:18:49 +02:00
AnErrupTion 018d797ed6
Brother what am I doing
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 20:19:40 +02:00
AnErrupTion 54f1ff14ee
corners: Break up "keys" into individual keys
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 20:17:46 +02:00
AnErrupTion 7e6474924c
config: Order battery_id alphabetically
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 19:57:29 +02:00
AnErrupTion 26377fd319
FreeBSD: Fix compilation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 19:56:24 +02:00
AnErrupTion 5fc5fd62a0
Remove shutdown_cmd & restart_cmd + sleep & hibernate
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 19:44:10 +02:00
AnErrupTion acb532b5d4
migrator: Free old save path later
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 18:33:13 +02:00
AnErrupTion e1696a4e73
config: Better document corner customisation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 17:32:49 +02:00
AnErrupTion 954e90b3bd
Remove options superseded by corner customisation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 17:20:05 +02:00
AnErrupTion 7eae544418
systemd: Add more conflicts, better kmscon service
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 12:43:10 +02:00
AnErrupTion 32f11cdbe5
Modify link to black hole animation (closes #1006)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 11:47:37 +02:00
AnErrupTion 9b8046e37c
auth: chown & chmod TTY (closes #944)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 11:10:26 +02:00
AnErrupTion 4513033bcb
ly@.service: Use agetty
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 02:22:40 +02:00
AnErrupTion 102d1c9a9b
Unset Shift and Ctrl for arrow keys (closes #1015)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-06 00:22:51 +02:00
Luna e0c287306e feature: add corner customization (closes #961) (#963)
## What are the changes about?

Add corner customization (what is in which corner of the screen)

## What existing issue does this resolve?

Issue #961

## 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@disroot.org>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/963
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-07-05 23:22:03 +02:00
HigherOrderLogic 25fad28c34 Add `type_username` option (closes #891) (#1012)
## What are the changes about?

Add an option to allow user manually input username, instead of selecting from a list of discovered users.

I have not tested the changes yet since I wasnt able to get it build locally. Will try to resolve this asap.

## What existing issue does this resolve?

#891

## Pre-requisites

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

Co-authored-by: HigherOrderLogic <73709188+HigherOrderLogic@users.noreply.github.com>
Co-authored-by: AnErrupTion <anerruption@disroot.org>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1012
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-07-05 22:43:15 +02:00
AnErrupTion 006749b2ec
Format README
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-05 21:20:02 +02:00
Lars Engels cf731dbce1 Add battery capacity support on FreeBSD (#988)
## What are the changes about?

So far ly only supported showing battery capacity on Linux. This adds support for FreeBSD as well using `sysctlbyname()` instead of reading from `/sys/...`

## What existing issue does this resolve?

No battery shown on FreeBSD.

_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>
Co-authored-by: AnErrupTion <anerruption@disroot.org>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/988
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-07-05 21:19:30 +02:00
dumbsplash 1d272ff74f Updated readme to address SELinux problems (closes #494) (#1019)
PR is an edit of the repo readme. See commit message.

Co-authored-by: AnErrupTion <anerruption+codeberg@disroot.org>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1019
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-07-05 20:59:40 +02:00
Tim132 63f0f4931c Fix authentication error with ly-freebsd-autologin (#1020)
## What are the changes about?

Remove the line "auth include login" from ly-freebsd-autologin

## What existing issue does this resolve?

The autologin at the beginning and further logins with password always failed with this message in the log: "failed to authenticate: PamAuthError". When I removed the line "auth include login" from ly-freebsd-autologin, autologin and login worked great.

## Pre-requisites

- [X] I have tested & confirmed the changes work locally
- [X] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md`

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1020
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-07-03 18:37:40 +02:00
AnErrupTion 8f4ca8d3f0
Autologin: Don't draw info line (closes #1002)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-03 18:33:58 +02:00
AnErrupTion 4d882f7997
Fix example.lua doc + add ly-community in README
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-19 20:18:45 +02:00
RadsammyT eeccb7421b feat: LuaJIT Animations (#1001)
## What are the changes about?
TL;DR:
![ly_meme](/attachments/f4c3a93b-6ede-42ab-a351-292e2105d4e2)

Slaps the entire LuaJIT runtime onto Ly, allowing for the creation of custom dynamic animations like GameOfLife, ColorWave, Doom, etc.
This PR adds the [ziglua](https://github.com/natecraddock/ziglua?ref=zig-0.16) dependency for its zig bindings and considerable buildtime config (mainly lua version selection).

### Example
 <video src="/attachments/3f91cf72-ae24-459c-8ef6-099f71e866fd" title="Screencast_20260519_172320" controls></video>
```lua
ly.frame_delay = 5
local timer = 0
local clock = os.clock()
local clock_diff = 0
function draw()
	timer = timer + 1
	byte = string.byte(' ')
	clock_diff = os.clock() - clock
	clock = os.clock()
	timer = timer + clock_diff
	for x = 0, ly.width-1 do
		for y = 0, ly.height-1 do
			local xc = 0xFF
			if x < 255 then xc = ((x + math.floor(timer / 2)) * 3) % 255 else xc = 0 end
			local yc = 0xFF
			if y < 255 then yc = ((y) * 3) % 255 else yc = 0 end
			ly.putCell(byte, xc, bit.bor(xc, yc), x, y)
		end
	end
end
```

### The API

The API that Ly gives to the user is minimal. A table is globally available, named `ly`, which provides the following:

| Member  | Purpose  |
|---------|---------|
| `ly.width` & `ly.height` | Respective Width/Height from the `TerminalBuffer` |
| `ly.putCell(byte, fg, bg, x, y)` | Literally `Cell.init(byte, fg, bg).put(x, y)`.|
| `ly.clock()` | The current real-time, in microseconds. |

### Error Handling

On a Lua Error, Ly won't quit but will instead paint the entire background red. The lua error in question can be found in the Ly log file and on-screen.
```log
2026-05-19 16:13:40 [err/Lua] Error (Cannot call draw()): attempt to call a nil value
2026-05-19 11:05:51 [err/Lua] Lua Error: ...dsammyt/programming/probe/ly/scratch/testConfig/test.lua:30: bad argument #1 to 'ipairs' (table expected, got number)
```

## 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/1001
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-06-19 20:05:00 +02:00
AnErrupTion e833c4bc1d
auth: Create XDG_RUNTIME_DIR if /run/user/UID exists
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-18 20:16:25 +02:00
AnErrupTion e138563874
README: Specify Alpine for /etc/inittab
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-18 19:51:18 +02:00
AnErrupTion 8942e30a9e
Merge branch 'master' of codeberg.org:fairyglade/ly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-18 00:05:51 +02:00
AnErrupTion a801d1a569
Clean up save code
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-17 22:23:12 +02:00
AnErrupTion aa00f7c8c7
Replace ArrayListUnmanaged with ArrayList
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-15 16:53:24 +02:00
Yuri dos Santos ed783b5a23 Minor pt_BR translation correction to sound more natural (#1018)
## What are the changes about?

Changed two sentences to sound more natural to Brazilian Portuguese speakers.

- Token to masculine adj. Token is often (if not always) described as masculine subject (e.g [Wikipedia](https://pt.wikipedia.org/wiki/Token_(an%C3%A1lise_l%C3%A9xica)))
- Moved sentence to be written using "falhou" always in the end of a phrase to follow the same pattern as the other similar sentences. Also, using "falhou" at the beginning of the sentence is not wrong, but sounds a bit weird and it's not common in formal texts

## What existing issue does this resolve?

Just translation related issues

## Pre-requisites

- [x] I have tested & confirmed the changes work locally
- [x] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md`

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1018
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-06-14 21:59:15 +02:00
oliebe f683a82f56 Fix small typos in readme.md (#1017)
## What are the changes about?

I fixed some incorrect inflections and typos in the readme

## What existing issue does this resolve?
N/A

## Pre-requisites

- [x] I have tested & confirmed the changes work locally
- [x] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md`

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1017
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-06-14 21:03:41 +02:00
Дмитрий 008d413295 Fix user detection if /etc/login.defs does not contain both UID_MIN and UID_MAX (#1014)
## What are the changes about?

I modified getUserIdRange(), so it checks if either of UID_MIN and UID_MAX is set in /etc/login.defs. If any, but not both, is not set, it uses fallback value. I don't know zig build system, so I added ugly fallback values passthrough.

## What existing issue does this resolve?

#1013

## Pre-requisites

- [X] I have tested & confirmed the changes work locally
- [X] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md`

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1014
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-06-12 12:09:37 +02:00
AnErrupTion a07ca88c74
build.zig: Fix new locales not being installed
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-11 20:35:42 +02:00
AnErrupTion d8c3aec668
Update PR template to reflect new contributing guidelines
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-10 14:49:39 +02:00
AnErrupTion 5b8ebeba6e
Create CONTRIBUTING.md
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-06-10 14:45:48 +02:00
koru 32436d438e Update `err_crawl` for Russian lang (#1011)
See: https://codeberg.org/fairyglade/ly/pulls/997#issuecomment-15674144
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1011
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-06-06 11:54:29 +02:00
Wicin-134 ace79f76b5 Overhaul language files (#997)
- Added sr_Cyrl.ini as new Cyrillic  variant for the Serbian Language
- Added zh_TW.ini (Traditional Chinese)
- Completed ALL missing keys in EVERY translation

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/997
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-06-06 11:48:31 +02:00
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