mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-21 11:44:55 +00:00
* 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>
58 lines
2.3 KiB
Markdown
58 lines
2.3 KiB
Markdown
# Termbox
|
|
[Termbox](https://github.com/nsf/termbox)
|
|
was a promising Text User Interface (TUI) library.
|
|
Unfortunately, its original author
|
|
[changed his mind](https://github.com/nsf/termbox/issues/37#issuecomment-261075481)
|
|
about consoles and despite the
|
|
[community's efforts](https://github.com/nsf/termbox/pull/104#issuecomment-300308156)
|
|
to keep the library's development going, preferred to let it die. Before it happened,
|
|
[some people](https://wiki.musl-libc.org/alternatives.html)
|
|
already noticed the robustness of the initial architecture
|
|
[became compromised](https://github.com/nsf/termbox/commit/66c3f91b14e24510319bce6b5cc2fecf8cf5abff#commitcomment-3790714)
|
|
in a nonsensical refactoring frenzy. Now, the author refuses to merge features
|
|
like true-color support, invoking some
|
|
[spurious correlations](https://github.com/nsf/termbox/pull/104#issuecomment-300292223)
|
|
we will discuss no further.
|
|
|
|
## The new Termbox-next
|
|
This fork was made to restore the codebase to its original quality (before
|
|
[66c3f91](https://github.com/nsf/termbox/commit/66c3f91b14e24510319bce6b5cc2fecf8cf5abff))
|
|
while providing all the functionnalities of the current implementation.
|
|
This was achieved by branching at
|
|
[a2e217f](https://github.com/nsf/termbox/commit/a2e217f0fb97e6bbd589136ea3945f9d5a123d81)
|
|
and cherry-picking all the commits up to
|
|
[d63b83a](https://github.com/nsf/termbox/commit/d63b83af04e0fd6da836bb8f37e5cec72a1dc95a)
|
|
if they weren't harmful.
|
|
|
|
## Changes
|
|
A lot of things changed during the process:
|
|
- *waf*, the original build system, was completely removed from the
|
|
project and replaced by make.
|
|
- anything related to python was removed as well
|
|
|
|
## Getting started
|
|
Termbox's interface only consists of 12 functions:
|
|
```
|
|
tb_init() // initialization
|
|
tb_shutdown() // shutdown
|
|
|
|
tb_width() // width of the terminal screen
|
|
tb_height() // height of the terminal screen
|
|
|
|
tb_clear() // clear buffer
|
|
tb_present() // sync internal buffer with terminal
|
|
|
|
tb_put_cell()
|
|
tb_change_cell()
|
|
tb_blit() // drawing functions
|
|
|
|
tb_select_input_mode() // change input mode
|
|
tb_peek_event() // peek a keyboard event
|
|
tb_poll_event() // wait for a keyboard event
|
|
```
|
|
See src/termbox.h header file for full detail.
|
|
|
|
## TL;DR
|
|
`make` to build a static version of the lib under bin/termbox.a
|
|
`cd src/demo && make` to build the example programs in src/demo/
|