mirror of
https://github.com/fairyglade/ly.git
synced 2026-09-22 03:50:23 +00:00
## What are the changes about? Allows the game of life animation to be ran with configurable rules, specifically: the neighbors required for birth and survival. ### Example: [B3/S12345 (Maze)](https://conwaylife.com/wiki/OCA:Maze) (where numbers after B are neighbors required for birth, and S for survival) <video src="/attachments/49120c5e-ce21-4025-852e-924befbc2621" title="Screencast_20260814_233338" controls></video> Introduces two keys to the config: ```ini # Sets the multiple amounts of neighbors needed for a cell to survive. # Each numerical digit from 0 to 8 inclusive in this string becomes # one of the targets required for this cell to survive. # Example: a string of "23" makes the cell survive on 2 or 3 neighbors gameoflife_param_survival = "23" # Sets the multiple amounts of neighbors needed for a cell to be born. # Each numerical digit from 0 to 8 inclusive in this string becomes # one of the targets required for this cell to be born. # Example: a string of "3" makes the cell be born on 3 neighbors gameoflife_param_birth = "3" ``` ## What existing issue(s) does this resolve? Solves !1023 ## Pre-requisites - [x] I have tested & confirmed the changes work locally - [x] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md` Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1041 Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
104 lines
3.9 KiB
Zig
104 lines
3.9 KiB
Zig
const build_options = @import("build_options");
|
|
|
|
const enums = @import("../enums.zig");
|
|
const Animation = enums.Animation;
|
|
const Input = enums.Input;
|
|
const ViMode = enums.ViMode;
|
|
const Bigclock = enums.Bigclock;
|
|
const DurOffsetAlignment = enums.DurOffsetAlignment;
|
|
|
|
allow_empty_password: bool = true,
|
|
animation: Animation = .none,
|
|
animation_frame_delay: u16 = 5,
|
|
animation_timeout_sec: u12 = 0,
|
|
asterisk: ?u32 = '*',
|
|
auth_fails: u64 = 10,
|
|
auto_login_service: [:0]const u8 = "ly-autologin",
|
|
auto_login_session: ?[]const u8 = null,
|
|
auto_login_user: ?[]const u8 = null,
|
|
battery_id: ?[]const u8 = null,
|
|
bg: u32 = 0x00000000,
|
|
bigclock: Bigclock = .none,
|
|
bigclock_12hr: bool = false,
|
|
bigclock_seconds: bool = false,
|
|
bigclock_outline_fg: ?u32 = null,
|
|
blank_box: bool = true,
|
|
border_fg: u32 = 0x00FFFFFF,
|
|
box_position_h: f32 = 0.5,
|
|
box_position_v: f32 = 0.5,
|
|
box_title: ?[]const u8 = null,
|
|
brightness_down_cmd: [:0]const u8 = build_options.prefix_directory ++ "/bin/brightnessctl -q -n s 10%-",
|
|
brightness_down_key: ?[]const u8 = "F5",
|
|
brightness_up_cmd: [:0]const u8 = build_options.prefix_directory ++ "/bin/brightnessctl -q -n s +10%",
|
|
brightness_up_key: ?[]const u8 = "F6",
|
|
clear_password: bool = false,
|
|
clock: ?[:0]const u8 = null,
|
|
cmatrix_fg: u32 = 0x0000FF00,
|
|
cmatrix_head_col: u32 = 0x01FFFFFF,
|
|
cmatrix_min_codepoint: u16 = 0x21,
|
|
cmatrix_max_codepoint: u16 = 0x7B,
|
|
colormix_col1: u32 = 0x00FF0000,
|
|
colormix_col2: u32 = 0x000000FF,
|
|
colormix_col3: u32 = 0x20000000,
|
|
corner_bottom_left: []const u8 = "version",
|
|
corner_bottom_right: []const u8 = "labels",
|
|
corner_top_left: []const u8 = "shutdown,restart,britup,britdown,password battery",
|
|
corner_top_right: []const u8 = "clock numlock,capslock",
|
|
custom_bind_width: ?u32 = null,
|
|
custom_sessions: []const u8 = build_options.config_directory ++ "/ly/custom-sessions",
|
|
default_input: Input = .login,
|
|
doom_fire_height: u8 = 6,
|
|
doom_fire_spread: u8 = 2,
|
|
doom_top_color: u32 = 0x00FF0000,
|
|
doom_middle_color: u32 = 0x00FFFF00,
|
|
doom_bottom_color: u32 = 0x00FFFFFF,
|
|
dur_file_path: []const u8 = build_options.config_directory ++ "/ly/example.dur",
|
|
dur_offset_alignment: DurOffsetAlignment = .center,
|
|
dur_x_offset: i32 = 0,
|
|
dur_y_offset: i32 = 0,
|
|
edge_margin: u8 = 0,
|
|
error_bg: u32 = 0x00000000,
|
|
error_fg: u32 = 0x01FF0000,
|
|
fg: u32 = 0x00FFFFFF,
|
|
full_color: bool = true,
|
|
gameoflife_fg: u32 = 0x0000FF00,
|
|
gameoflife_entropy_interval: usize = 10,
|
|
gameoflife_frame_delay: usize = 6,
|
|
gameoflife_initial_density: f32 = 0.4,
|
|
gameoflife_param_birth: []const u8 = "3",
|
|
gameoflife_param_survival: []const u8 = "23",
|
|
hide_borders: bool = false,
|
|
inactivity_cmd: ?[]const u8 = null,
|
|
inactivity_delay: u16 = 0,
|
|
initial_info_text: ?[]const u8 = null,
|
|
input_len: u8 = 34,
|
|
lang: []const u8 = "en",
|
|
login_cmd: ?[]const u8 = null,
|
|
login_defs_path: []const u8 = "/etc/login.defs",
|
|
logout_cmd: ?[]const u8 = null,
|
|
lua_animation_file: []const u8 = build_options.config_directory ++ "/ly/example.lua",
|
|
ly_log: ?[]const u8 = "/var/log/ly.log",
|
|
margin_box_h: u8 = 2,
|
|
margin_box_v: u8 = 1,
|
|
numlock: bool = false,
|
|
path: ?[]const u8 = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
|
restart_key: ?[]const u8 = "F2",
|
|
save_file_dir: ?[]const u8 = build_options.config_directory ++ "/ly",
|
|
service_name: [:0]const u8 = "ly",
|
|
session_log: ?[]const u8 = "ly-session.log",
|
|
setup_cmd: []const u8 = build_options.config_directory ++ "/ly/setup.sh",
|
|
shell: bool = true,
|
|
show_password_key: ?[]const u8 = "F7",
|
|
shutdown_key: ?[]const u8 = "F1",
|
|
start_cmd: ?[]const u8 = null,
|
|
text_in_center: bool = false,
|
|
type_username: bool = false,
|
|
vi_default_mode: ViMode = .normal,
|
|
vi_mode: bool = false,
|
|
waylandsessions: ?[]const u8 = build_options.prefix_directory ++ "/share/wayland-sessions",
|
|
x_cmd: []const u8 = build_options.prefix_directory ++ "/bin/X",
|
|
x_vt: ?u8 = null,
|
|
xauth_cmd: []const u8 = build_options.prefix_directory ++ "/bin/xauth",
|
|
xinitrc: ?[]const u8 = "~/.xinitrc",
|
|
xsessions: ?[]const u8 = build_options.prefix_directory ++ "/share/xsessions",
|