Files
homelab/tools/quickshell-preview/README.md

40 lines
1.1 KiB
Markdown

# Headless Quickshell previews
This directory provides a reproducible Docker wrapper around
[qsmcp](https://github.com/fedsfarm/qsmcp). It renders a Quickshell `Item` to a
PNG with Qt's `grabToImage()` without connecting to the host Wayland session.
Both nixpkgs and qsmcp are pinned in `Dockerfile`. The runner uses
`docker create` plus `docker cp` rather than bind mounts, so it also works with
rootless/remote daemons whose mount namespace cannot see the checkout.
## Smoke test
Start Docker, then run from the repository root:
```sh
./tools/quickshell-preview/render.sh
```
The default output is:
```text
/tmp/homelab-quickshell-preview/smoke.png
```
## Render another Item-rooted component
```sh
./tools/quickshell-preview/render.sh \
tests/DenseBarHeadless.qml \
.artifacts/quickshell-preview/dense-bar-1920.png \
1920 164
```
The component path is relative to `dotfiles/quickshell`. Keep production
`PanelWindow` wrappers thin and put their visual content in an `Item` component
so it can be rendered through this offscreen path.
`PanelWindow`-rooted previews require a nested compositor and are intentionally
outside this first smoke-test image.