docs: add kitty‑day‑save support and update related documentation

This commit is contained in:
Prad Nukala committed 2026-10-08 10:17:09 -04:00
1 parent 7e2ae53560
commit 472695e596
6 files changed
+39 -12

No files matched your search

+12
View File
@@ -41,6 +41,7 @@ Several scripts below also exist as fish functions of the same name (`ai`, `c2p`
| [`ghn`](#ghn) | sh | Create a private repo, clone it, print the path |
| [`git-summary`](#git-summary) | sh | Aggregate a repo's `AGENTS.md` files with code2prompt |
| [`gop`](#gop) | sh | Open the current repo's web page |
| [`kitty-day-save`](#kitty-day-save) | bash | Save kitty's daily session right before shutdown/reboot |
| [`launch_omp_livediff_overlay`](#launch_omp_livediff_overlay) | sh | omp overlay plus a livediff split in kitty |
| [`lc-elir`](#lc-elir) | sh | Run `/leetcode-eli5` via omp on picked solutions |
| [`mdcp`](#mdcp) | sh | Fetch a URL as Markdown, copy it, preview it |
@@ -189,6 +190,17 @@ Opens a repo's web page for any forge whose URL layout is `https://<host>/<owner
**Needs:** `git`, a browser or `xdg-open`.
## kitty-day-save
```sh
kitty-day-save # hold a logind delay lock, flush on shutdown, exit
kitty-day-save --now # flush every running kitty immediately
```
Run by `kitty-day-save.service` (`dot_config/systemd/user/`, `WantedBy=graphical-session.target`, `Restart=always` after 10 s). It wraps itself in `systemd-inhibit --what=shutdown --mode=delay` and waits on `gdbus monitor` for login1's `PrepareForShutdown (true,)`. logind sends that before anything is killed and waits for the lock (`InhibitDelayMaxSec`, 5 s by default), so every kitty still has all its windows. It then sends `kitten day_session.py flush` over remote control to each `@kitty-<pid>` socket in `/proc/net/unix` (3 s timeout each) and exits, which releases the lock. The kitty that owns today's session saves it and holds further saves for 60 s; other kitties ignore the flush. See [kitty daily sessions](/terminal/kitty#daily-sessions).
**Needs:** `systemd-inhibit`, `gdbus`, `kitten`. Linux desktop/laptop roles only (`.chezmoiignore.tmpl`).
## launch_omp_livediff_overlay
```sh