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

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>
* Change config type for bigclock
* Seprates big clock's hard codes from its logic
* Adds Farsi (fa) to big clock langs
* Minor changes
* Makes requested changes
* 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>