Commit Graph

62 Commits

Author SHA1 Message Date
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
AnErrupTion
5a4605ffb6 Add layering system for widgets
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 11:29:14 +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
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
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
AnErrupTion
70e95f094a Fix incorrect key parsing
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-10 10:41:08 +01:00
AnErrupTion
207b352888 Add central Widget struct + clean up code
In particular, move all termbox2 usage to TerminalBuffer.zig &
keyboard.zig

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-10 00:22:27 +01:00
AnErrupTion
852a602032 Support more configurable keybindings (closes #679)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-09 11:11:00 +01:00
AnErrupTion
1db780c7a7 Better handle screen resizes
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-08 22:18:00 +01:00
AnErrupTion
941b7e0dae Properly calculate string lengths
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-08 22:04:09 +01:00
AnErrupTion
769aefd6e9 Add separate big label widget for bigclock
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-08 21:14:49 +01:00
AnErrupTion
f678e3bb28 Add update function for Label
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-08 19:50:32 +01:00
AnErrupTion
f22593f828 Add Label component & make colors custom
This commit also makes Ly more resilient to (impossible) screen
resolutions.

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-08 17:40:50 +01:00
AnErrupTion
7bbdebe58b Fix center offset error
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-08 15:09:55 +01:00
AnErrupTion
bca38856b1 Completely refactor widget placement code
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-08 14:53:36 +01:00
AnErrupTion
fd81da7cbd Organise imports
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-07 17:01:11 +01:00
AnErrupTion
2e04ea4d79 Add time, severity & category in logs
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-01-31 11:17:36 +01:00
AnErrupTion
0c12008327 Move more termbox usage into TerminalBuffer
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-01-31 10:36:08 +01:00
AnErrupTion
d7f64676ee Split core code into ly-core library
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-01-18 21:07:53 +01:00
AnErrupTion
8e893932f2 Clamp user session index if invalid
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-12-30 18:09:46 +01:00
AnErrupTion
26e7585b0b Don't forget to allocate :D
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-12-30 17:43:00 +01:00
AnErrupTion
ced8f9bee3 Fix session not being saved correctly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-12-17 17:32:16 +01:00
AnErrupTion
e6966a628c Fix wrong session index + save file corruption
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-12-06 14:25:01 +01:00
AnErrupTion
92beb24c80 Fix save file initialisation & incorrect saved session index
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-12-05 19:49:27 +01:00
hynak
7e18d906c4 [Feature] Add support for .dur file format and animations (closes #719) (#833)
Adds support for durdraw's .dur file format. Supports ascii, animations, and 16/256 color display.

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/833
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: hynak <hynak@noreply.codeberg.org>
Co-committed-by: hynak <hynak@noreply.codeberg.org>
2025-12-05 19:46:42 +01:00
AnErrupTion
f0758d812e Fix potential out of bounds issue when automatically changing session
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-11-19 22:15:07 +01:00
ferreo
0cf752f3b8 [Feature] Add autologin support (#841) (closes #200)
This is the simplest change I could come up with to add working autologin, only bit I really dislike is the event but it seemed like the cleanest way without refactoring.

Co-authored-by: ferreo <harderthanfire@gmail.com>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/841
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: ferreo <ferreo@noreply.codeberg.org>
Co-committed-by: ferreo <ferreo@noreply.codeberg.org>
2025-10-25 23:09:24 +02:00
AnErrupTion
b3f1e91cf6 Remember last session for each user (closes #619)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-10-14 21:05:54 +02:00
AnErrupTion
f988bd334b Update termbox2
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-08-29 00:45:28 +02:00
AnErrupTion
6d7dbb9f27 Fix typo & remove unused import
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-08-29 00:07:32 +02:00
AnErrupTion
7cfb947187 Reduce libc usage & move more stuff to interop
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-08-28 01:39:19 +02:00
Matthew Rothlisberger
a7ff18aa16 Add option for eight-color terminal output (#802)
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/802
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: Matthew Rothlisberger <mattjrothlis@gmail.com>
Co-committed-by: Matthew Rothlisberger <mattjrothlis@gmail.com>
2025-08-03 23:37:53 +02:00
RadsammyT
5c3da10386 fix: confined labels cutting off
`drawConfinedLabel` didn't take into account the starting x axis
when checking to break for exceeding `max_length`.

This should fix the box title not appearing on
terminals with larger column counts.
2025-07-16 22:03:51 -04:00
AnErrupTion
1d4e32ba82 List all users in the system (fixes #373)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-07-10 10:06:19 +02:00
AnErrupTion
48e5369f56 Fix character width calculation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-07-08 16:32:20 +02:00
AnErrupTion
9ded9fd765 Remove use of deprecated aliases/types + use upstream zigini
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-16 22:45:46 +01:00
AnErrupTion
13ba52319c Clean termbox2 usage + fix animation bug
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-16 11:40:27 +01:00
AnErrupTion
1672d4a9ec Make main code less directly dependent on termbox2
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-16 11:17:38 +01:00
AnErrupTion
e0ed1b4eb1 Add animation framework
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-16 10:54:06 +01:00
AnErrupTion
86ea38f460 Split session crawling from TUI component
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-16 00:24:56 +01:00
AnErrupTion
e19a23b54c Allow using up to a UTF-32 codepoint as a password asterisk (closes #715)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-06 21:16:24 +01:00
AnErrupTion
9c79137c9f Remove all deprecated calls to tb_cell_buffer()
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-06 15:42:33 +01:00
AnErrupTion
55abc4d7f1 Decouple TerminalBuffer and auth from Config
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-06 14:32:05 +01:00
AnErrupTion
d0ccaa4d69 Enable true color output (closes #705)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-06 12:47:28 +01:00
AnErrupTion
bebccf4d5a Support Zig 0.14.0 only (with 1 downstream dependency fork)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-03-05 19:42:00 +01:00
llc0930
b84158e1c0 Add option to center env name (#683) 2024-08-09 18:44:49 +02:00
AnErrupTion
2c428f5537 Reduce dependence on tb_cell and tb_cell_buffer()
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2024-08-05 11:08:51 +02:00
AnErrupTion
071b7a2182 Make all colors u16
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2024-08-05 10:41:34 +02:00