docs: update CHANGELOG, README keybindings, gitignore ly/
Some checks failed
Integration Check CI / check (push) Has been cancelled
Continuous integration / Check (push) Has been cancelled
Continuous integration / Rustfmt (push) Has been cancelled
Continuous integration / Clippy (push) Has been cancelled

This commit is contained in:
2026-07-19 01:54:45 +05:30
parent d7c9951d6b
commit 1723ab53b8
3 changed files with 20 additions and 10 deletions

1
.gitignore vendored
View File

@@ -6,3 +6,4 @@ session.md
build/*
examples/*
things_todo.md
ly/*

View File

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

View File

@@ -65,9 +65,9 @@ pacman -S latchd
systemctl enable latchd
```
## command line
## Command Line
```
```bash
latchd [options]
-c, --config <file> config path (default: /etc/latchd/config.toml)
@@ -82,9 +82,9 @@ latchd [options]
--initial-path <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/