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>
This commit is contained in:
ShiningLea
2024-05-09 15:30:12 +02:00
committed by GitHub
parent 4ee2b3ecc7
commit d8d2d5a8bf
65 changed files with 6636 additions and 3763 deletions

View File

@@ -1,24 +1,25 @@
# Animation enabled/disabled
#animate = false
# The active animation
# 0 -> PSX DOOM fire (default)
# 1 -> CMatrix
#animation = 0
# none -> Nothing (default)
# doom -> PSX DOOM fire
# matrix -> CMatrix
animation = none
# format string for clock in top right corner (see strftime specification)
#clock = %c
# Format string for clock in top right corner (see strftime specification). Example: %c
clock = null
# enable/disable big clock
#bigclock = true
# Enable/disable big clock
bigclock = false
# The character used to mask the password
#asterisk = *
asterisk = *
# Erase password input on failure
#blank_password = false
clear_password = false
#The `fg` and `bg` color settings take a digit 0-8 corresponding to:
# Enable vi keybindings
vi_mode = false
# The `fg` and `bg` color settings take a digit 0-8 corresponding to:
#define TB_DEFAULT 0x00
#define TB_BLACK 0x01
#define TB_RED 0x02
@@ -29,118 +30,124 @@
#define TB_CYAN 0x07
#define TB_WHITE 0x08
#
# Setting both to zero makes `bg` black and `fg` white. To set the actual color palette you are encouraged to use another tool
# such as [mkinitcpio-colors](https://github.com/evanpurkhiser/mkinitcpio-colors). Note that the color palette defined with
# `mkinitcpio-colors` takes 16 colors (0-15), only values 0-8 are valid for `ly` config and these values do not correspond
# exactly. For instance, in defining palettes with `mkinitcpio-colors` the order is black, dark red, dark green, brown, dark
# blue, dark purple, dark cyan, light gray, dark gray, bright red, bright green, yellow, bright blue, bright purple, bright
# cyan, and white, indexed in that order 0 through 15. For example, the color defined for white (indexed at 15 in the mkinitcpio
# Setting both to zero makes `bg` black and `fg` white. To set the actual color palette you are encouraged to use another tool
# such as [mkinitcpio-colors](https://github.com/evanpurkhiser/mkinitcpio-colors). Note that the color palette defined with
# `mkinitcpio-colors` takes 16 colors (0-15), only values 0-8 are valid for `ly` config and these values do not correspond
# exactly. For instance, in defining palettes with `mkinitcpio-colors` the order is black, dark red, dark green, brown, dark
# blue, dark purple, dark cyan, light gray, dark gray, bright red, bright green, yellow, bright blue, bright purple, bright
# cyan, and white, indexed in that order 0 through 15. For example, the color defined for white (indexed at 15 in the mkinitcpio
# config) will be used by `ly` for `fg = 8`.
# Background color id
#bg = 0
bg = 0
# Foreground color id
#fg = 9
fg = 8
# Border color
border_fg = 8
# Blank main box background
# Setting to false will make it transparent
#blank_box = true
blank_box = true
# Remove main box borders
#hide_borders = false
hide_borders = false
# Main box margins
#margin_box_h = 2
#margin_box_v = 1
margin_box_h = 2
margin_box_v = 1
# Input boxes length
#input_len = 34
input_len = 34
# Max input sizes
#max_desktop_len = 100
#max_login_len = 255
#max_password_len = 255
max_desktop_len = 100
max_login_len = 255
max_password_len = 255
# Input box active by default on startup
#default_input = 2
# Available inputs: session, login, password
default_input = login
# Load the saved desktop and username
#load = true
load = true
# Save the current desktop and login as defaults
#save = true
save = true
# Deprecated - Will be removed in a future version
# New save files are now loaded from the same directory as the config
# Currently used to migrate old save files to the new version
# File in which to save and load the default desktop and login
#save_file = /etc/ly/save
save_file = /etc/ly/save
# Remove power management command hints
#hide_key_hints = false
hide_key_hints = false
# Specifies the key used for shutdown
#shutdown_key = F1
# Specifies the key used for shutdown (F1-F12)
shutdown_key = F1
# Specifies the key used for restart
#restart_key = F2
# Specifies the key used for restart (F1-F12)
restart_key = F2
# Specifies the key used for sleep (F1-F12)
sleep_key = F3
# Command executed when pressing shutdown_key
#shutdown_cmd = /sbin/shutdown -a now
shutdown_cmd = /sbin/shutdown -a now
# Command executed when pressing restart_key
#restart_cmd = /sbin/shutdown -r now
restart_cmd = /sbin/shutdown -r now
# Command executed when pressing sleep key (can be null)
sleep_cmd = null
# Active language
# Available languages are found in /etc/ly/lang/
#lang = en
lang = en
# tty in use
#tty = 2
# TTY in use
tty = 2
# Console path
#console_dev = /dev/console
# Default path
#path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin
console_dev = /dev/console
# Default path. If null, ly doesn't set a path.
path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin
# Event timeout in milliseconds
#min_refresh_delta = 5
min_refresh_delta = 5
# Service name (set to ly to use the provided pam config file)
#service_name = ly
service_name = ly
# Terminal reset command (tput is faster)
#term_reset_cmd = /usr/bin/tput reset
term_reset_cmd = /usr/bin/tput reset
# Terminal restore cursor command
term_restore_cursor_cmd = /usr/bin/tput cnorm
# Cookie generator
#mcookie_cmd = /usr/bin/mcookie
mcookie_cmd = /usr/bin/mcookie
# Wayland setup command
#wayland_cmd = /etc/ly/wsetup.sh
# Add wayland specifier to session names
#wayland_specifier = false
wayland_cmd = /etc/ly/wsetup.sh
# Wayland desktop environments
#waylandsessions = /usr/share/wayland-sessions
waylandsessions = /usr/share/wayland-sessions
# xinitrc
#xinitrc = ~/.xinitrc
# xinitrc (hidden if null)
xinitrc = ~/.xinitrc
# Xorg server command
#x_cmd = /usr/bin/X
x_cmd = /usr/bin/X
# Xorg setup command
#x_cmd_setup = /etc/ly/xsetup.sh
x_cmd_setup = /etc/ly/xsetup.sh
# Xorg xauthority edition tool
#xauth_cmd = /usr/bin/xauth
xauth_cmd = /usr/bin/xauth
# Xorg desktop environments
#xsessions = /usr/share/xsessions
xsessions = /usr/share/xsessions

View File

@@ -29,17 +29,22 @@ err_perm_dir = failed to change current directory
err_perm_group = failed to downgrade group permissions
err_perm_user = failed to downgrade user permissions
err_pwnam = failed to get user info
err_unknown = an unknown error occurred
err_user_gid = failed to set user GID
err_user_init = failed to initialize user
err_user_uid = failed to set user UID
err_xsessions_dir = failed to find sessions folder
err_xsessions_open = failed to open sessions folder
insert = insert
login = login
logout = logged out
normal = normal
numlock = numlock
password = password
restart = reboot
shell = shell
shutdown = shutdown
sleep = sleep
wayland = wayland
xinitrc = xinitrc
x11 = x11

View File

@@ -25,7 +25,7 @@ err_pam_session = greska sesije
err_pam_sys = greska sistema
err_pam_user_unknown = nepoznat korisnik
err_path = neuspjelo postavljanje path-a
err_perm_dir = neuspjelo mijenjanje foldera
err_perm_dir = neuspjelo mijenjanje foldera
err_perm_group = neuspjesno snizavanje dozvola grupe
err_perm_user = neuspijesno snizavanje dozvola korisnika
err_pwnam = neuspijesno skupljanje informacija o korisniku
@@ -33,7 +33,7 @@ err_user_gid = neuspijesno postavljanje korisničkog GID-a
err_user_init = neuspijensa inicijalizacija korisnika
err_user_uid = neuspijesno postavljanje UID-a korisnika
err_xsessions_dir = neuspijesno pronalazenje foldera sesija
err_xsessions_open = neuspijesno otvaranje foldera sesija
err_xsessions_open = neuspijesno otvaranje foldera sesija
login = korisnik
logout = izlogovan
numlock = numlock

View File

@@ -2,6 +2,7 @@
Description=TUI display manager
After=systemd-user-sessions.service plymouth-quit-wait.service
After=getty@tty2.service
Conflicts=getty@tty2.service
[Service]
Type=idle