Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

This repository is archived. The code moved to Crown-OS/crownOs.

It is now crates/crownuikit in the CrownOS workspace, with its history intact. The crate name on crates.io is unchanged -- cargo add crownuikit 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.

crownuikit

A widget kit for CrownOS, built on xilem and Masonry — sidebar, sliders, toggles, selects, context menus and icons.

Status: Early. It builds and runs a widget gallery, but is not yet wired to anything.

Why it exists alongside crownshell

Two different jobs:

crownshell crownuikit
For Desktop surfaces — bars, docks, toasts Ordinary application windows
Stack Raw wlr-layer-shell + direct Vello painting xilem / Masonry, reactive
You write A paint callback A view tree

crownuikit is intended for the CrownOS settings panel. crownos-config ships a xilem feature providing watch, watched and watched_key views that exist to feed exactly this kind of app — though nothing connects the two yet.

Prerequisites

crownuikit has no CrownOS dependencies and needs no dev overlay — but winit and xilem do need a Wayland session, a Vulkan loader and fontconfig at build and run time.

Native dependencies (Arch):

sudo pacman -S --needed base-devel pkgconf \
  wayland wayland-protocols libxkbcommon \
  vulkan-icd-loader mesa libglvnd fontconfig

Full list, including Debian/Ubuntu: Prerequisites, or run crownos-setup's ./bootstrap.sh --check to have them installed for you.

Rust 1.88+ (pinned in rust-toolchain.toml).

Build and run

cargo build
cargo run

Opens a desktop window with the widget gallery: sidebar, sliders, toggles and a select.

Three dependencies only — xilem, winit, blinc_icons (Lucide icon bodies). No CrownOS dependencies.

API

pub mod animation;
pub mod config;    // global Theme behind an RwLock: theme() / set_theme()
pub mod layouts;   // sidebar and its parts
pub mod util;      // lerp_color, Inter font, shadows, inflated_pill
pub mod widgets;   // context_menu, icon, select, slider, toggle

Theming is a process-global Theme behind an RwLock, read with theme() and replaced with set_theme(). The default palette is a shadcn-derived dark scheme with GradientStops and PopoverColors.

The sidebar is composed from sidebar, sidebar_brand, sidebar_group, sidebar_item, sidebar_subitem and sidebar_separator, plus an animated-height collapse container. layouts/sidebar/mod.rs opens with a design note explaining the composition — read it before adding a part.

Inter is embedded with include_bytes! from resources/fonts/.

Known limitations

  • The demo content is placeholder. The gallery's sidebar shows fintech material from a design mock — "Untitled UI", "Bank accounts", "Upgrade to PRO". It is not CrownOS settings navigation.
  • It is wired to nothing, in both directions. No crownos-config dependency, so it reads and writes no settings — and no repository in the organization depends on crownuikit, so nothing consumes it either. Connecting it to the settings panel is the obvious next step.
  • Dead and empty files: widgets/status.rs and layouts/header/mod.rs are zero bytes and undeclared; widgets/search.rs is zero bytes but is declared, so it is an empty live module.
  • No tests, no examples.
  • It carries its own spring implementation — the fifth in the project.

Tests

There are none. cargo test compiles the crate and reports zero tests. There are no examples either — the gallery in main.rs is the only exercise of the widgets.

Contributing

See the organization-wide contribution guide. Default branch here is main.

License

Licensed under the MIT License.

About

CrownUI kit is a UI toolkit built for xilem

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages