Commit Graph

18 Commits

Author SHA1 Message Date
jlucaso 6933c4db02 Merge branch 'master' into refactor/termbox2-dependency 2025-07-25 06:31:10 +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 48e5369f56
Fix character width calculation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2025-07-08 16:32:20 +02:00
João Lucas 7b81336761 refactor: Use zig fetch for termbox2 dependency
Replaced the local `termbox2.h` header file with a proper dependency managed by the Zig package manager. This improves maintainability and makes it easier to track and update the library in the future.

The previous `termbox2.h` contained a custom `tb_get_cell` function that is not present in the upstream repository. This function has been re-implemented in Zig (`src/tui/termbox_extras.zig`) to maintain compatibility, especially for the failed-login "cascade" animation.

This change also involved updating `build.zig` and `build.zig.zon` to use the new dependency.
2025-07-04 08:32:49 -03: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 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 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
AnErrupTion a393525212
Support multiple info lines in UI
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2024-07-31 13:58:49 +02:00
AnErrupTion c1f1c8f5c1
Use usize instead of u64 in most places for better 32-bit compatibility
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2024-07-29 13:46:14 +02:00
Moabeat 19d4b195f3
Display error messages differently in info line (#661)
* Add list of error messages to InfoLine.zig

* Change info and error cases according to review

* Add changes from review for width calculation
2024-07-28 13:02:42 +02:00
AnErrupTion b84e6c9eed
Use default PRNG and retrieve better seed
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2024-07-26 21:39:27 +02:00
アシュ 291e0d836b
Various bug fixes and small features (#606)
* Fix stray cursor, integer overflows and other bugs

* check for getenvlist error, shorten code

* fix cascade, set info_line before auth, make code clearer and a bug fix

* Add option to turn on numlock at startup

* Fix setting numlock

* Update build.zig

* Custom info text

* Shift+Tab for previous input

* update changelog and res/config

* Some fixes

* update build.zig

* update build.zig again

* Fix xauth command for some shells and fix building in ReleaseSafe

* Use git describe to get dev version str

* revert change to getLockState (it broke the doom animation)

* add new ly error messages. Only try to make path for pam/exe during install when dest_directory is defined + print warning on error.

* add warning message for workaround
2024-07-02 10:52:38 +02:00
ShiningLea d8d2d5a8bf
Nobody expects the Ziguanas (#517)
* Add build.zig, remove makefile, add .idea directory to .gitignore

* Remove submodules, add projects directly

* Remove submodules

* Add projects

* Rename sub/ to dep/, remove makefiles

* Rewrite main.c

* Remove Argoat dependency

* Remove unused dependencies

* Rewrite config.c

* Add files

* Change default fg to 8 in config.ini

* Partially rewrite utils.c

* Use Zig package manager

* Rewrite INPUTS enum in Zig

* Commit unfinished full rewrite (Zig 0.11.0)
What needs to be dealt with:
- Matrix animation
- Authentication part
- Testing on actual TTY (not just virtual console)

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Implement more (untested) authentication code

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Fix some bugs (hopefully)

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Try to fix some more bugs

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Oops, forgot to allocate hehe

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Changes in the Zig rewrite (#596)

* Everything

* make matrix.zig a bit cleaner

* make long lines shorter and add changelog

* vi mode

* update changelog

* get errors from child process and (hopefully) fix some other things

* fix utmp entry

* run authentication in a child process

* update changelog

* small code improvements

* change that

* clear terminal on SIGTERM

* Remove LogFile

* moved ini to a lib, fixed alternative langs

* fix logging out

* oops

* code improvements

* consistency

* clearing the env isn't needed anymore (afaik)

* replace vi_mode with a bool

* type aliases, avoiding zeroes(), breaking a long line

* lowercase insert/normal, merge conditionals, code improvements

* Add experimental save file migrator + bug fixes + add "-dev" version suffix

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Resolve conflicts

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Clean up when SIGTERM is received (#597)

* clean up child processes on SIGTERM

* small code improvement

* consistency.. i guess?

* Properly set XDG_CURRENT_DESKTOP

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Zig 0.12.0 and more! (#599)

* less alloc, update migrator, get DesktopNames from .desktop

* small cleanup

* Update zigini to improve compatibility with old config

* Code improvements

* Update to zig version 0.12.0

* Some fixes

* tiny changes

* remove useless comment

* migrator changes, and small things

* set XDG env vars differently

* free memory on error when appending environments

* Fix out of bounds issue when using the Delete key

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Update zig-ini to fix configuration issue (#603)

* Mention display-manager-init for Gentoo/OpenRC in readme.md

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Tidy up readme.md

Signed-off-by: AnErrupTion <anerruption@disroot.org>

* Fix authentication in a few edge cases (#604)

* fix loginConv and auth

* fix potential mem leak with configs

* BIG changes

---------

Signed-off-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: アシュ <120780645+Kawaii-Ash@users.noreply.github.com>
2024-05-09 15:30:12 +02:00