Show compute, power, VRAM, encoder, and decoder as equal dials. Drop spark history charts.
2.8 KiB
2.8 KiB
Quickshell
Tokyo Night bar + overlay shell. QML lives here; Nix copies it into ~/.config/quickshell via ../quickshell.nix and generates Theme.qml from lib/colors.nix.
Layout
- Root
*.qmlsingletons are state (Net,Tail,Sync,Stats,Audio,Fmt,Popups). Filename = type name. Auto-discovered by Quickshell. widgets/are bar chips.ui/is shared chrome. Widgets import".."+"../ui".- Name collisions are avoided by suffixing:
Tail.qml+widgets/Tailnet.qml,Sync.qml+widgets/Syncthing.qml.
Visual rules
- Palette is Tokyo Night. Prefer
Theme.fg/Theme.fgDark/Theme.commentfor text. Accent colors (blue,magenta,cyan,green) are for marks, meters, and wells — not body copy. - Never
property color x: Theme.fg. QML evaluates that once at create time and it freezes to black if Theme is not ready. Useproperty alias color: label.colorand setlabel.color: Theme.fg, orproperty var inkand bindcolor: ink || Theme.fg. - Bar glyphs are ~15px, monochrome, vertically centered with Chip text. Official marks (Tailscale 3×3, Syncthing ring+hub) stay one-color.
- Ranked process lists use
Rank. Dial clusters useGauge. Do not add history sparks. - Panels are
PanelCard. Inset groups useWell. Lists useChoiceonly when they are actions; read-only rows areStatRow. - One popup at a time (
Popups). Panels grow to content up to remaining screen height.
Code rules
- Import
QtQuickanywhere you useTimer,Behavior, orNumberAnimation.Processcannot host aTimer— wrap both inui/Poll.qml. - New files must be
git added beforenh os switch. Flakes ignore untracked paths, so QML will reference a type that is not in the store. - After a failed reload, IPC dies (
Not ready to accept queries yet). Restart withsystemctl --user reset-failed quickshell.service && systemctl --user restart quickshell.service. Do not restart if Steam is a child of the old cgroup. - After a successful rebuild, apply from the existing herdr split:
nh os switch --diff=always && qs ipc call shell reload. - Poll expensive commands only while the panel is open (
Stats.hot,Net.scan). Keep secrets out of argv; talk to local APIs from QML (XHR), not helper scripts. - Shared formatters live in
Fmt. Shared on/off chrome isPills { binary: true }. - Launch
Terminal=truedesktop entries withghostty +new-window -e.DesktopEntry.execute()ignores that flag.
Adding a widget
- State singleton at repo root if it needs polling or IPC.
- Chip in
widgets/, usingPanelCard+Heading+ existingui/bits. - Mount it in
Bar.qml. - Stage the new files, switch, reload.
Do not
- Copy Omarchy panels wholesale. Steal behavior, keep this chrome.
- Generate widgets from Nix. Only
Theme.qmlis generated. - Put Linux-only packages in
home.nix; add them inquickshell.nix.