Important
This repository is archived. The code moved to Crown-OS/crownOs.
It is now crates/crowndock in the CrownOS workspace, with its history intact. The
crate name on crates.io is unchanged -- cargo add crowndock is unaffected by
where the source lives.
The nine desktop crates were merged because a change crossing two of them used to be two pull requests in two repositories that nothing built together. A schema change once broke the compositor for eight days before anyone noticed. One workspace, one lockfile, one CI run.
Issues and pull requests: https://github.com/Crown-OS/crownOs
This repository stays read-only so existing links keep resolving. Everything below describes the state at the time of the merge.
The dock for CrownOS. A bottom-anchored, auto-hiding layer-shell surface with drag-and-drop application pinning.
Status: Partial. It builds and runs, animates nicely, and cannot launch applications. See Known limitations.
| Layer | Overlay |
| Anchor | BOTTOM |
| Size | 1044 × 100, fixed |
| Exclusive zone | 0 (it auto-hides) |
| Namespace | Crowndock |
Any Wayland compositor supporting wlr-layer-shell — crownpositor, Hyprland,
Sway, river, KWin.
Native dependencies (Arch):
sudo pacman -S --needed base-devel pkgconf \
wayland wayland-protocols libxkbcommon \
vulkan-icd-loader mesa libglvnd fontconfig dbusFull list, including Debian/Ubuntu: Prerequisites.
You need the dev overlay first.
crowndockdepends oncrownshell = "0.3", and 0.3 is not published — crates.io has onlycrownshell0.1.0 and 0.2.0. A fresh clone fails atcargo metadatauntil Cargo is pointed at a localcrownshellcheckout.
crownos-setup's./bootstrap.sh --devclones the repos side by side and writes a[patch.crates-io]overlay into a.cargo/config.tomlone directory above them:~/crownos/ ├── .cargo/config.toml # [patch.crates-io] crownshell = { path = "crownshell" } ├── crowndock/ └── crownshell/Cargo walks up from the working directory to find that file, and the paths in it are relative to the file's own directory. No particular layout inside a repo is required.
cargo runDrag a .desktop file onto the dock to pin it. Pinned items persist to
~/.config/crowndock/items.toml.
crowndockdoes not callenv_logger::init(), so itslog::warn!output is invisible regardless ofRUST_LOG. Add the init locally if you need to debug it.
Visibility is a state machine — Hidden → PendingShow → Showing → Shown → PendingHide → Hiding — driven by a spring (stiffness 240, damping 28, damping
ratio ≈ 0.904, integrated at a fixed 1/240 s substep).
Two details worth knowing if you touch the surface code:
- The input region shrinks to a 1-pixel strip at the bottom edge while hidden, so clicks fall through to whatever is underneath.
- The blur region is striped into 32 bands so the compositor blurs behind the icon row rather than the whole rectangle.
Icons come from the .desktop file's Icon= key, parsed with
freedesktop_entry_parser and resolved through freedesktop-icons. SVG is
rasterised with resvg/tiny-skia; raster formats through image.
Drag and drop accepts text/uri-list, filters to .desktop files, and
hand-rolls file:// percent-decoding.
- Clicking an icon does not launch anything. There is no
Exec=parsing and nostd::process::Commandanywhere in the crate —on_pointer_pressandon_pointer_releaseonly drive drag state. This is the most valuable open task in the repo. - It deviates from the CrownOS config convention, storing pinned items in
~/.config/crowndock/items.toml— TOML, in its own directory — rather than a section in~/.config/crownos/. - The size is fixed at 1044 × 100, not derived from screen width or icon count.
- Blur is requested but does not happen under
crownpositor, which never advertisesext-background-effect-v1. - No tests.
- It does not build from a fresh clone on its own.
crownshell = "0.3"is an unpublished version; you need the[patch.crates-io]overlay described under Build and run. tiny-skia(0.11) anddirs(5) are a major version behind sibling crates;tracingis declared and unused.- It carries its own spring implementation rather than using
crownshell's.
There are none. cargo test compiles the crate and reports zero tests. The
.desktop parsing and the file:// percent-decoder are pure functions and the
obvious place to start.
See the organization-wide
contribution guide.
Default branch here is main.
Licensed under the MIT License.