From 1723ab53b82aeb2bc7d62ae6a5c7b21211b82eda Mon Sep 17 00:00:00 2001 From: Zane Walker Date: Sun, 19 Jul 2026 01:54:45 +0530 Subject: [PATCH] docs: update CHANGELOG, README keybindings, gitignore ly/ --- .gitignore | 3 ++- CHANGELOG.md | 10 +++++++++- README.md | 17 +++++++++-------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index c29a0a4..258b784 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ documentation.md session.md build/* examples/* -things_todo.md \ No newline at end of file +things_todo.md +ly/* \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 818f3a9..c20c087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,14 @@ first public release ### Recent Fixes +- **DesktopNames parsing** — `.desktop` files now parse the `DesktopNames` field. the first semicolon-delimited entry becomes `XDG_SESSION_DESKTOP`, and the full list with `:` separators becomes `XDG_CURRENT_DESKTOP`. fixes GNOME/KDE sessions not getting proper environment variables +- **utmpx accounting wired** — `AddUtmpx` and `Close` are now called from `spawnSession` so user logins appear in `who`/`w`/`last` +- **fixed hardcoded shell** — `Credentials.Shell` now reads from `/etc/passwd` instead of always returning `/bin/sh`. removes duplicate `userShell` logic in exec.go +- **automata background wired** — `Automata.Frame()` is now rendered in `View()` as the base layer with the login form card overlaid using ANSI cursor positioning. the form has a dark card background for readability +- **clock widget** — added a datetime display (`Mon Jan 02 15:04:05`) to the top bar, updated every tick +- **session specifier label** — the environment switcher now shows the session type (`x11`, `wayland`) above the session name, like ly's specifier +- **form card background** — login content is rendered inside a padded card with a dark background so it reads cleanly over the animated automata + - **utmpx time field portability** — replaced hardcoded `C.__uint32_t` / `C.__int32_t` casts with a C helper function (`auth/utmpx_time.h`) that lets the compiler handle type conversion. fixes build failure on systems where `ut_tv` uses `struct timeval` instead of the 32/64 compat struct - **cgo pointer safety for pam** — replaced `unsafe.Pointer(&h)` (Go stack pointer passed to C) with `storeHandle`/`loadHandle` helpers that keep the `cgo.Handle` in C-heap memory. fixes `cgo argument has Go pointer to unpinned Go pointer` panic on Go 1.22+ - **pam conversation callback** — fixed `unsafe.Slice` using `&r` (pointer-to-pointer) as the backing array instead of `r` (the calloc'd response array), which wrote password bytes into random stack memory. also now only responds to `PAM_PROMPT_ECHO_OFF`/`PAM_PROMPT_ECHO_ON` messages — info and error messages get nil. fixes `pam_unix: auth could not identify password` @@ -46,4 +54,4 @@ first public release - session leader is the latchd process, not the desktop — pam session tracking via systemd-logind may be imperfect - not all config options affect the rendering yet - occasional terminal state corruption on abrupt exit -- automata background rendered as tick-only visual (not wired into the view yet) +- automata background visible at screen edges; form card covers the center diff --git a/README.md b/README.md index da50479..c9c1523 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,9 @@ pacman -S latchd systemctl enable latchd ``` -## command line +## Command Line -``` +```bash latchd [options] -c, --config config path (default: /etc/latchd/config.toml) @@ -82,9 +82,9 @@ latchd [options] --initial-path override initial PATH value ``` -## adding sessions +## Adding Sessions -drop executable scripts into the right folder and they show up in the switcher. +Drop executable scripts into the right folder and they show up in the switcher. **x11** — put your xinitrc scripts in `/etc/latchd/wms/`: @@ -113,7 +113,7 @@ tty sessions are added automatically if no other environments are found, or you ## configuring -the config lives at `/etc/latchd/config.toml`. all options are documented inline in the file. you can also use a `variables.toml` file with `$VAR` syntax: +The config lives at `/etc/latchd/config.toml`. all options are documented inline in the file. you can also use a `variables.toml` file with `$VAR` syntax: ```toml # /etc/latchd/variables.toml @@ -127,7 +127,7 @@ title_color_focused = "$accent" border_color_focused = "$accent" ``` -## debugging +## Debugging three log files: @@ -137,7 +137,7 @@ three log files: run `latchd --show-config` to verify your configuration. run `latchd --preview` to test the login screen without leaving your current session. -## keybindings +## Keybindings standard shell-style bindings in text fields: @@ -151,6 +151,7 @@ standard shell-style bindings in text fields: | ctrl+b/f | left/right | | ctrl+p/n | up/down (previous/next field) | | tab, shift+tab | next/prev field | +| down / up | next/prev field | | left/right | previous/next session (switcher mode) | | , / . | previous/next session (any mode) | | f1, f2 | power controls | @@ -158,7 +159,7 @@ standard shell-style bindings in text fields: ## source layout -``` +```bash src/ ├── main.go entry point, cli, vt switching, session forking ├── auth/