Compare commits

174 Commits
Author SHA1 Message Date
darmanandClaude Opus 5.5 2f686df2cc feat(gitea): LFS over ssh, direct LAN route at home
LFS_ALLOW_PURE_SSH keeps LFS objects on the ssh connection instead of
ROOT_URL via neptun. On terra/titan, ssh to git.mgaction.town goes
straight to jupiter when it answers on the LAN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 05:57:39 +01:00
darmanandClaude Opus 5.5 8a1b952ce6 feat(terra): game-dev harness tools next to the Unreal env
Newest Blender from unstable (pkgsRocm for HIP, hiPrio over
desktop-apps' copy), python3 and git-lfs for the harness and project
repos, the harness's bin first on PATH, Tripo CLI telemetry off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 05:57:39 +01:00
darmanandClaude Opus 5.5 709bc50164 feat(flake): hyprchrome harness replaces the per-app inputs
hyprchrome-claude and hyprchrome-files now come from one `hyprchrome`
input (the harness repo carrying both as submodules with their shared
patches). The lock also bumps nixpkgs-unstable, nix-citizen and
nix-gaming.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 05:57:39 +01:00
darmanandClaude Opus 5.5 cd1915336b feat(honcho): Claude Code memory in luna's Honcho
mars: bearer-gated tailnet door to Honcho on :8099 (Caddy), limited to
luna's workspace; Honcho itself stays on loopback with auth off, so
Hermes and honcho-console are unchanged.

terra: config for the claude-honcho plugin (installed via /plugin) plus a
SessionStart hook that adds luna as an observer of each Claude session,
so Hermes' directional recall sees what is learned here. HONCHO_* env in
settings.json pins the server: the plugin's config migration otherwise
drops baseUrl and falls back to Plastic Labs' cloud.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 05:56:44 +01:00
darmanandClaude Opus 5.5 f0a6c3552e chore(flake): update hyprchrome-files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:12:48 +01:00
darmanandClaude Opus 5.5 72dc1bbc71 chore(desktop): drop codex
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:12:48 +01:00
darmanandClaude Opus 5.5 5690b06fd3 feat(terra): Epic Games Launcher Preview in a Steam-runtime FHS env
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:12:48 +01:00
darmanandClaude Opus 5.5 7756e8e6fb fix(flake): repos moved to /mnt/hdd_01/dev/repos
tbctl and nexusmods-app pointed at the old /mnt/hdd_01/data/Dev/repos
path, which no longer exists. Relocked at the same revisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:02:46 +01:00
darmanandClaude Opus 5.5 efa387d21e feat(terra): Unreal Engine editor in an FHS env
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:55:48 +01:00
darmanandClaude Opus 5.5 587ca68c24 chore(flake): update inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:55:48 +01:00
darmanandClaude Opus 5.5 54a5c5441f chore(mars): Hermes Agent v0.22.3 -> v0.23.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:55:48 +01:00
darmanandClaude Opus 5.5 aac93eab62 fix(neptun): headplane API key under settings.headscale
headplane 0.7.0 (nixos-26.05) dropped oidc.headscale_api_key_path in favour of headscale.api_key_path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:55:48 +01:00
darmanandClaude Opus 5.5 135c5b9c31 fix(terra): heroic from unstable for GOG login
2.22.4 fixes GOG login; nixpkgs has 2.22.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:08:56 +01:00
darmanandClaude Opus 5.5 71f1e8abc0 chore(flake): update inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:08:56 +01:00
darmanandClaude Opus 5.5 e9a64d780b chore(desktop): drop yaak
It no longer builds on the updated nixpkgs: wasm-pack 0.15.1 obeys the
x86_64 CARGO_BUILD_TARGET that cargo-tauri's hook sets, so yaak-templates
compiles without producing a .wasm file. Removed from terra and titan
until nixpkgs fixes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 10:21:17 +01:00
darmanandClaude Opus 5.5 a2f6a8a23d feat(terra): hyprchrome apps from gitea, drop turtle-beach-swarm-re
hyprchrome-claude and hyprchrome-files now come from their own gitea
repos instead of the local checkouts, so updating them means pushing
there, then `nix flake update <input>` here.

The turtle-beach-swarm-re input and its KB7 release service are gone.
Also adds Heroic on terra, sets git's init.defaultBranch to master, and
updates the flake inputs (nixpkgs, nixpkgs-unstable, home-manager,
sops-nix, disko, nixos-anywhere, authentik-nix, Millennium, nix-citizen,
tbctl, livesync-bridge and their transitive inputs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 09:40:37 +01:00
darmanandClaude Opus 5.5 0c7628d9e8 style(desktop): split merged yaak/blender comment lines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 00:38:56 +01:00
darmanandClaude Opus 5.5 b02d698c1a feat(terra): Quickshell lock screen, Star Citizen, NexusMods, TeamSpeak
Also jellyfin-mpv-shim, mangohud logging, portal-backed xdg-open,
systemd-resolved with fallback DNS, and keyring under the user manager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 00:37:40 +01:00
darmanandClaude Opus 5.5 7a68716c1c feat(matrix): Synapse + MAS on jupiter, published by neptun
Homeserver for mgaction.town (@user:mgaction.town). Synapse and the
Matrix Authentication Service share jupiter's postgres; logins are
OIDC-only through Authentik via MAS, since Element X can't use
Synapse's own SSO. neptun serves the apex .well-known delegation plus
matrix. and account. vhosts; the admin API stays tailnet-only.

Synapse's signing key is a sops secret so the federation identity
survives losing the RAID0 array. Covered by checks.matrix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 13:04:52 +02:00
darmanandClaude Opus 5.5 2719ed7707 feat(terra): qBittorrent confined to a ProtonVPN WireGuard netns
The qBittorrent GUI runs as a system unit inside a `proton` network
namespace whose only interface is WireGuard to Proton (NL#490, P2P with
NAT-PMP) and whose only route is the tunnel, so a dropped VPN stalls
torrents instead of leaking them. DNS goes to Proton's 10.2.0.1, with
the host's nscd/resolved sockets hidden since they would answer from the
root namespace. A NAT-PMP loop keeps Proton's forwarded port mapped and
sets it through the netns-local WebUI.

qbittorrent itself is not on PATH: the qbittorrent-vpn launcher and
desktop entry (also the magnet/.torrent handler, via a watch folder)
start the unit, which polkit lets darman start and stop without a
password. The namespace comes up with the GUI and goes away with it.

The client is internet-facing, so it is sandboxed too: it sees only its
own state, the watch folder, the download dir and read-only theming;
the rest of $HOME, /mnt, darman's sops secrets, pass-broker/tailscale
sockets and the session bus are gone. The bus would let it run anything
through systemd --user, so no tray icon or notifications.

Covered by checks.qbittorrent-vpn against a fake Proton peer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:38:05 +02:00
darmanandClaude Opus 5.5 71f3dec4b5 feat(workstation): Steam with Millennium
Steam is now millennium-steam from the Millennium flake's overlay (client
themes and plugins), on terra and titan. The overlay builds against our
nixpkgs; its nixpkgs-bun input stays pinned because a fixed-output hash
depends on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:37:18 +02:00
darmanandClaude Opus 5.5 662e8b5caf feat(terra): hyprchrome-claude and hyprchrome-files from local checkouts
Both are flake inputs on their local checkouts, like tbctl (commit there,
then `nix flake update <input>` here). hyprchrome-claude is the HyprChrome
desktop app around the claude CLI. hyprchrome-files becomes the default
file manager (inode/directory, SUPER+E via the new homelab.desktop.fileManager)
and the FileChooser portal. Both defaults are set system-wide rather than
through its home-manager module, which would take over mimeapps.list and
write a hyprland-portals.conf that shadows portals.conf for every other
portal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:36:35 +02:00
darmanandClaude Opus 5.5 205ed14970 chore(flake): update inputs
nixpkgs (26.05), nixpkgs-unstable, home-manager, sops-nix,
nixos-anywhere, authentik-nix, livesync-bridge and their transitive
inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:34:59 +02:00
darmanandClaude Opus 5.5 e95726d69c feat(mars): pass-broker approval gateway for every host
A Telegram bot has a single getUpdates consumer, so a broker per host
would split approval taps between them. mars now runs the gateway: the
bot's only poller, relaying prompts and taps for terra's and titan's
brokers over the tailnet (:8097) without ever seeing an item. Each broker
authenticates with its own pass_broker_gateway_token; mars holds only the
sha256, and the prompt is labelled with the host that token belongs to.

The bot token and chat id move to mars and are dropped from the other
hosts' sops files (terra.yaml also loses its leftover LibreChat keys and
gains protonvpn_wg_private_key, which a later commit uses). Covered by
checks.pass-broker-gateway (two nodes: labels, cancel, expiry, per-host
token isolation, gateway down); the fakes are shared with checks.pass-broker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:34:19 +02:00
darmanandClaude Opus 5.5 760e353335 feat(titan): Zenbook laptop on a shared workstation profile
terra's desktop is split into profiles/workstation.nix (NixOS side) and
home/desktop/ (home-manager side, moved from hosts/terra/home*), so titan,
an ASUS Zenbook Pro Duo UX581 (Intel iGPU + RTX 2060 PRIME offload),
gets the same Hyprland workstation. Per-host monitors, primary/secondary
output and wallpaper are homelab.desktop.* options; the quickshell widgets
read the outputs from QS_PRIMARY_OUTPUT/QS_SECONDARY_OUTPUT instead of
hardcoding DP-2/HDMI-A-1. Folder icons come from a new HyprChrome-Folders
icon theme.

titan gets its own sops file and recipient. LibreChat is removed from
terra along with its secrets declarations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:33:03 +02:00
darmanandClaude Opus 5.5 e191ea3c8a feat(terra): bigger HyprChrome cursor, also on the greeter
Cursor size 24 -> 36 (with a 36px XCursor frame so X clients don't snap
to 32). The greeter's Hyprland gets the same theme via a new
homelab.greeter.cursor option, linked into the greeter's ~/.icons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:43:03 +02:00
darmanandClaude Opus 5.5 8c0c2822c6 feat(terra): pass-broker prompts say who asked
Prompts and the journal now show "darman via Claude Code" (a `claude`
ancestor) or the terminal holding the tty, plus the caller's command with
store/profile paths cut to program names, and the process chain. It is
a hint, not identity: anything running as darman can fake it.

A client that has already hung up now always loses the race against the
prompt lock and Telegram polling, so it can no longer get a prompt, and
gone clients get no reply (no more EPIPE noise). The ghost-request test
freezes the broker to reproduce the queued-while-restarting case exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:12:04 +02:00
darmanandClaude Opus 5.5 3dccafe2b8 feat(terra): pass-broker for Telegram-approved Proton Pass access
A Rust daemon running as its own system user holds terra's only pass-cli
session, an agent PAT scoped to the HomeLab vaults. `pass-broker get` asks
it for an item; per-item rules decide auto/ask/deny, and "ask" sends a
Telegram prompt that only darman's account can approve (10-min grant for
darman@*/root@*). Requests whose client is gone are dropped or withdrawn,
and the client gives up after 30s without an answer.

scripts/deploy uses the broker exclusively when its socket exists. Covered
by checks.pass-broker (fake pass-cli + Telegram). Secrets added for all
hosts; only terra runs the broker so far.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:48:46 +02:00
darmanandClaude Opus 5.5 e6ceacb63b feat(terra): HyprChrome cursor theme
Built from the HyprChrome Cursors canvas: 20 shapes as XCursor (24/32/48)
plus SVG hyprcursor, replacing Bibata.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:41:20 +02:00
darmanandClaude Opus 5.5 cfbc14a9e7 feat(terra): launcher rows slant only when selected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:22:40 +02:00
darmanandClaude Opus 5.5 66760c1ded feat(terra): SUPER+V mutes luna's mic without cutting her off
The key now only opens and closes the mic. Her reply keeps playing, the
switch takes effect mid-turn (also while a tool-call reply is still
streaming), and a muted mic can't barge in. Muting mid-sentence sends what
was said so far, like releasing push-to-talk. The rail panel shows
MIC ON / MIC OFF and her own state even while muted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:01:48 +02:00
darmanandClaude Opus 5.5 efb690206b feat(terra): luna speaks with ElevenLabs v4 turbo
eleven_v4_turbo is the new default, same price per character as
v3_conversational. v4 also streams over Text to Dialogue, so the switch is
now uses_dialogue() for both. Audio tags may carry free-text directions
("[whispers, in a German accent]"): commas and apostrophes allowed, up to
80 chars. The voice prompt and luna-soul.md teach her the wider tag set,
including in text_to_speech voice notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:01:48 +02:00
darmanandClaude Opus 5.5 1209f165e9 feat(terra): bump claude-desktop to 2.42304.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:01:48 +02:00
darmanandClaude Opus 5.5 94b2b4695c feat(terra): reinstall tome with the license-denial fix
tome dropped out of home.packages in an auto-stash merge (6406e06). Its
NuGet lockfile also pinned 8.0.29/9.0.18 runtime packs, which the 10.0.401
SDK no longer accepts for Photino.NET's net8/net9 targets, so it no longer
built; regenerated with fetch-deps.

Bumps the tome input to 011a69e: 10-byte device serial (Audible denies
licenses to 20-byte ones since 2026-09) and denial reasons in the error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:00:26 +02:00
darmanandClaude Opus 5.5 4d33b92bbc feat(neptun): Quad9 fallback for tailnet DNS
mercury's tailscaled crash-looped on SD-card corruption and took DNS down on
every tailnet node, since pihole over the tailnet was the only global
nameserver. Cost: queries can skip pihole while mercury is slow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:32:37 +02:00
darmanandClaude Opus 5.5 e849827ebb feat(mercury): trim closure 2.9G → 1.6G; deploy with --use-substitutes
mercury drops the sd-image installer profile (rescue tools, ZFS), linux-firmware,
docs, installer tools and the nixpkgs registry pin — every deploy rewrites the
changed closure onto the SD card.

deploy switch/boot/test now passes --use-substitutes on all hosts: targets pull
cache hits themselves (compressed) instead of the laptop pushing uncompressed
NARs over ssh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:32:37 +02:00
darmanandClaude Opus 5.5 a05057a074 feat(terra): tbctl for the KB7/KP7/Kone II Air; bump flake inputs
CLI, GUI and the tbd daemon/agent from openbeach, pinned to a local
checkout for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:43:56 +02:00
darmanandClaude Opus 5.5 3debd6f7c2 feat(terra): bump claude-desktop to 2.37337.1
The native binding now links libpipewire directly, so pipewire moves
into buildInputs for autoPatchelf as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:43:56 +02:00
darmanandClaude Opus 5.5 059319cb1b feat(terra): release KB7/KP7 from host control on boot/replug
Adds turtle-beach-swarm-re as a flake input and enables its release
module, so a warm reboot from Windows no longer leaves the KB7 showing
Swarm's last streamed frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 19:54:53 +02:00
darmanandClaude Opus 5.5 d1afbba50c feat(terra): host permissions for Turtle Beach Swarm II RE
usbmon + wireshark group for USB capture, and uaccess on vendor 10f5
USB/hidraw nodes for QEMU passthrough and the RE tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:15:30 +02:00
darmanandClaude Opus 5.5 eec1f33e96 feat(jupiter): shrink system closure for the 29G eMMC
Run immich and seerr as official images (their node/python stacks live in
podman's graphroot on the array), ship only the firmware the board loads,
and point jellyfin at intel-media-driver directly instead of
hardware.graphics (mesa + llvm).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:15:30 +02:00
darmanandClaude Opus 5.5 14f5e96f7e chore: bump flake inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:15:30 +02:00
darmanandClaude Opus 5.5 e46346c446 fix(terra): persist Claude Desktop logins via gnome-libsecret
Chromium doesn't recognise Hyprland as a desktop, falls back to the
basic_text password store, and logins are lost on restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 20:18:54 +02:00
darmanandClaude Opus 5.5 9f9c5df790 feat(terra): give run0 5min to authenticate
run0 waits on systemd over D-Bus, and the 25s default call timeout ran
out while the polkit dialog was still open. Scoped to an alias so a hung
systemctl does not also wait 5min.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:49:36 +02:00
darmanandClaude Opus 5.5 acd08afaad feat(terra): Proton Pass picker in the polkit/askpass dialog
A collapsed panel under the dialog lists logins from every vault via
pass-cli, one tab per vault with overflow into a dropdown; picking one
fetches its password into the field. Listing never touches secrets, and
the `darman@<config>` items are `custom`, not `login`, so both types are
listed. Adds a show/hide toggle to the password field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:49:36 +02:00
darmanandClaude Opus 5.5 4b366f952e feat(terra): multilingual whisper small for luna's voice
base.en heard "backup" as "Mac up" and turned German into English nonsense.
small with -l auto gets both right at ~1s per turn (vs ~0.4s); turbo was
~2.3s for no visible gain. Drops the subtitle credits multilingual whisper
invents out of silence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011XkDJkdDzneVVdnkZfrvTY
2026-10-03 01:48:29 +02:00
darmanandClaude Opus 5.5 d4b6616d88 fix(mars): rotated keys reach every Hermes profile's .env
Named profiles keep their own .env, so coder kept the old OpenCode key and
librarian, with no OPENCODE line at all, was left on an exhausted pool entry.
The OpenCode key now goes to every profile; other keys only to profiles that
already carry them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011XkDJkdDzneVVdnkZfrvTY
2026-10-03 01:48:29 +02:00
darmanandClaude Opus 5.5 96604e3367 chore(mars): bump honcho-console (import keeps summary settings)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:46:23 +02:00
darmanandClaude Opus 5.5 0e00512773 feat(mars): honcho-console phase 4 — hermes recall preview
Tells the console Hermes' user and AI peers, as hermes-agent.nix writes
them into honcho.json, for the "what luna sees" preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:38:59 +02:00
darmanandClaude Opus 5.5 c13a0093c3 feat(mars): honcho-console phase 3 — metrics, stage models, spend
Honcho now exports Prometheus metrics (METRICS_ENABLED) for the
console's token, cost and latency views. The console prices each stage
with the models read from honcho-api's own environment, and reads
Honcho's OpenRouter key as a systemd credential for actual spend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:54:48 +02:00
darmanandClaude Opus 5.5 8886b9a2b5 chore(mars): bump honcho-console to phase 2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:28:58 +02:00
darmanandClaude Opus 5.5 59b291d000 chore(mars): bump honcho-console to phase 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:08:49 +02:00
darmanandClaude Opus 5.5 ca725c73b5 feat(mars): honcho-console, tailnet-only web UI for luna's Honcho
Own repo (darman/honcho-console) as a flake input; its module runs on
mars with a SELECT-only grant on Honcho's database, at
http://mars.orbit.sol:8095 with the port closed on the LAN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:45:43 +02:00
darmanandClaude Opus 5.5 1db3105d50 fix(mars): directional Honcho observation so luna's own messages are derived
A honcho.json host block without observationMode counts as a legacy config
and gets "unified" (ai observe_me off), so the seed and everything luna
says were never derived.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:03:16 +02:00
darmanandClaude Opus 5.5 2b376d5035 secrets(mars): rotate darman's password
The old one leaked into a session transcript.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:34:29 +02:00
darmanandClaude Opus 5.5 a5a07a8792 chore(scripts): edit_secrets opens Zed when installed
Takes precedence over the shell's $EDITOR (nano on terra); falls back to
the old $EDITOR/nano logic elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:31:06 +02:00
darmanandClaude Opus 5.5 53a19c6b54 feat(terra): luna's voice rules live in luna-voiced's system prompt
Audio-tag and speech-stripping rules moved here from her SOUL.md: only
luna-voiced sends [voice], so they no longer ride along in every
Telegram prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:25:45 +02:00
darmanandClaude Opus 5.5 df7696ae60 feat(mars): pin luna's minimal SOUL.md; full persona seeds Honcho
- prepare-dirs writes hosts/mars/luna-soul.md over her SOUL.md on every
  start: a short anchor (identity, register, non-negotiables). Her own
  approved edits no longer stick; a broken one corrupted the file on
  2026-09-24 with GLM tool-call markup.
- luna-soul-full.md keeps the full persona. It seeded her Honcho
  identity (hermes honcho identity), minus the voice rules, which moved
  to luna-voiced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:25:45 +02:00
darmanandClaude Opus 5.5 ed2ce8fafc feat(terra): stored Hermes sessions for luna's voice
- Each daemon run creates a Hermes session (source "desktop") on its
  first turn, so voice chats show in the dashboard's default Chats view.
  Hermes only allows a fixed set of sources; unknown ones become the
  hidden api_server.
- Turns carry X-Hermes-Session-Id (Hermes keeps the transcript) and
  X-Hermes-Session-Key: voice (one Honcho memory session for voice).
- With a stored session only the base prompt and what's new since her
  last reply are sent; falls back to full client-side history if the
  session can't be created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:53:12 +02:00
darmanandClaude Opus 5.5 b2a700571f feat(mars): switch luna's memory provider to Honcho
- prepare-dirs pins memory.provider = honcho in Hermes's config.yaml and
  merges the local server into honcho.json (workspace/aiPeer luna, user
  peer darman). Only those keys are asserted; Hermes's own additions stay.
- The SDK installs itself into the image's durable lazy-install target
  (/opt/data/lazy-packages), so nothing to package here.
- Hermes starts after Honcho but doesn't require it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:23:51 +02:00
darmanandClaude Opus 5.5 99e5260619 feat(mars): self-hosted Honcho memory server for luna
Honcho v3.2.2 (API + deriver containers) on loopback, with native
Postgres/pgvector and Ollama embeddings. Not wired into Hermes yet;
Mnemosyne stays her memory provider until the switch.

- Peer auth over the Postgres socket: the containers run as the host's
  honcho uid, so there is no DB password.
- Embeddings: qwen3-embedding:0.6b (1024 dims, fixed at first migration).
  The API runs configure_embeddings on start to resize Honcho's default
  vector(1536) schema.
- LLMs via OpenRouter: glm-5.3-flash:nitro at minimal reasoning for the
  deriver and quick dialectic, deepseek-v4-pro for deep dialectic and
  dreams (which maintain the peer cards).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:15:18 +02:00
darmanandClaude Opus 5.5 2523494d10 fix(mercury): disable pihole's DNS rate limit
Steam's query bursts got terra rate-limited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 02:23:07 +02:00
darmanandClaude Opus 5.5 48aa11eab5 fix(terra): surface empty Hermes replies, reconnect the voice widget
- luna-voice treats an empty reply or a stream error frame as a failure,
  so a dead provider key notifies instead of speaking "".
- The Luna widget reads `luna-voice watch` instead of Quickshell's
  Socket, which never retries after one failed connect and left the
  widget OFFLINE after a daemon restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 02:23:07 +02:00
darmanandClaude Opus 5.5 a9022fa8fc fix(mars): make a rotated OpenCode key actually reach Hermes
Luna went silent after the OpenCode Go subscription lapsed, and a new key
still 401'd after deploying it.

- Rotate opencode_go_api_key.
- prepare-dirs writes it into Hermes's .env like the other keys, so a
  stale line there can no longer override the container env.
- Changing the key restarts prepare-dirs and the container; podman only
  reads --env-file at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 02:23:07 +02:00
darmanandClaude Opus 5.5 6f1262b0fe chore: bump flake inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:22:07 +02:00
darmanandClaude Opus 5.5 bee9b49ce1 fix(terra): surface Claude usage errors and retry sooner
The CLD panel went blank with no reason when Claude Code's saved OAuth
token had expired and the widget's own renewal was refused.

- Collapsed panel shows EXPIRED/ERR instead of dashes; failures are
  logged to `qs log`.
- Retry every minute after a failure instead of every 5.
- claude-usage identifies as claude-cli, the suspected cause of the
  refresh 429s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:21:20 +02:00
darmanandClaude Opus 5.5 c33d184228 chore: bump flake inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:27:27 +02:00
darmanandClaude Opus 5.5 896368ef56 feat(terra): launcher most-used sort, power buttons, SUPER opens rail
- Launcher sorts by launch count by default (persisted in quickshell's
  state dir); Ctrl+S or the sort chip toggles A–Z.
- Logout/Reboot/Shutdown in the footer, each needing a confirming click.
- SUPER now opens the launcher with the rail expanded; closing the
  launcher collapses the rail again unless it was already open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:26:44 +02:00
darmanandClaude Opus 5.5 f84611bc6e feat(terra): Claude subscription limits panel on the rail
CLD panel next to luna showing the 5-hour and weekly usage windows (plus
any per-model weekly caps), polled every 5 min via a new `claude-usage`
script that reuses Claude Code's OAuth login and refreshes it when expired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:26:44 +02:00
darmanandClaude Opus 5.5 13e8db74ce fix(mercury): register DHCP clients under .sol
pihole v6 made dns.domain an object and silently ignores a bare
FTLCONF_dns_domain, so every lease resolved as <host>.lan and names like
mars.sol (luna's apps) did not resolve at all. Set dns.domain.name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:58:57 +02:00
darmanandClaude Opus 5.5 e4ee637ccd feat(terra): luna v3 voice, channel marker and rail panel
- TTS defaults to eleven_v3_conversational over the Text to Dialogue
  socket: performs audio tags and gets her German right. Flash still
  works via the TTS socket.
- Every spoken message is prefixed with a [voice] marker so luna's
  profile on mars can tell the channel apart.
- LunaIndicator/LunaCall replaced by a LunaPanel in the bar rail, with
  captions; headless test updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:52:03 +02:00
darmanandClaude Opus 5.5 386a46c4fe feat(terra): ROCm blender
pkgsRocm build so Cycles can render on the RX 6800 XT over HIP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:52:03 +02:00
darmanandClaude Opus 5.5 f8a7b61280 feat(terra): Claude Desktop with Cowork
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:52:03 +02:00
darmanandClaude Opus 5.5 4adb9347b8 feat(jupiter): tailnet-only gitea MCP server
gitea-mcp in HTTP mode on :8093, reachable only over tailscale0. It
holds no token; each client sends its own PAT as a Bearer header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:52:03 +02:00
darmanandClaude Opus 5.5 565308a448 chore: bump flake inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:52:03 +02:00
darmanandClaude Opus 5 b3200d965d docs: record the voice-loop traps
Three that each cost a debugging round, and none of which looks like its
cause: terra's mic levels (every default threshold was above the user's
speech), the noise floor chasing a rising sound, and `try_recv()` popping
a command that an `if let Ok(Cancel)` then throws away — which is why
SUPER+V during her reply did nothing at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 23:38:06 +02:00
darmanandClaude Opus 5 ef1be8a7d9 feat(terra): luna voice-mode readout in quickshell
Top-left under the rail: whether the mic is open, whether she is
thinking, and whether she is talking — the states a 5s reply makes you
want to see. No avatar yet; the meter is a placeholder for it, and the
states and their colours are the part that has to read correctly first.

LunaIndicator is Item-rooted so render.sh can shoot all five states
offscreen (tests/LunaIndicatorHeadless.qml); LunaCall is the thin
PanelWindow. Beside the notification stack rather than among the modals:
it never takes the keyboard and raises no scrim, so it is deliberately
absent from `modalOpen`.

LunaState is read-only — the toggle runs the CLI — and treats a missing
socket as normal, since the daemon is a user service that may start after
the shell or not be installed at all.

Two things measurement decided rather than reasoning. ExclusionMode
.Ignore put it OVER the bar (it ignores other surfaces' zones, not just
its own), and switching to Normal was not enough either: the rail's
exclusive zone still left it at y=8 against a bar occupying 0..147. So
the shell passes bar.contentHeight down, the same value the backdrop
already reads. And the card is one chamfered path rather than a
rectangle with a triangle over its corner, which left the square border
showing underneath and read as an artifact.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 23:38:01 +02:00
darmanandClaude Opus 5 67dd30eb72 feat(terra): hands-free voice mode, toggled with SUPER+V
The key is a toggle rather than push-to-talk, because "voice mode is
active" has to be a state something can display; a held key cannot
sustain one. So the daemon grew a VAD loop: speech starts a capture,
`silenceMs` of quiet ends it. A turn is awaited inline, which is also
what stops her hearing herself — the tick cannot fire while she speaks.

The keybind runs the CLI, not a quickshell GlobalShortcut, so the mic can
still be switched off while the shell is reloading and a QML error can
never leave it open with nothing on screen saying so.

Every threshold had to be resized for terra's mic, which is QUIET:
0.001-0.002 ambient against 0.0045 speaking, about 6dB apart. The VAD
floor of 0.006 and whisper's own 0.015 gate both sat ABOVE the user's
voice, and a 3.5x multiplier cannot separate signals that close — three
independent reasons nothing could ever trigger. Hence vadMult 1.8,
vadFloor 0.0025, and stt::normalize lifting the clip (capped at 30x, so
near-silence is not amplified into words) before whisper sees it.

The floor tracker also had to stop feeding on everything: a rising sound
dragged its own threshold up faster than it rose, and a tone peaking at
0.029 was outrun by a threshold that reached 0.018. Only samples below
the current trigger update it now.

Four diagnostics, because none of the above was visible while it was
failing: `watch` prints the socket protocol, `say` runs a turn from typed
text (a broken mic vs a broken pipeline), `level` is a live meter with
the trigger marked, `devices` lists the inputs. Amplitude is now emitted
on every tick, not only while she speaks — a meter that moves only during
playback cannot answer "is it hearing me".

Also: connect-time replay of mode/state, so restarting the shell while
voice mode is on does not leave it blind until the next event, which in
an idle conversation is never.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 23:37:51 +02:00
darmanandClaude Opus 5 d089743f75 feat(terra): talk to luna with push-to-talk
luna-voiced: mic -> whisper-cpp (local, vulkan) -> Hermes' API on mars ->
ElevenLabs streaming TTS -> speaker, bound to SUPER+V. State, amplitude
and a viseme timeline are published on a unix socket; nothing consumes
that yet, but it is the data source the quickshell avatar will read.

STT stays local on purpose. mars already runs faster-whisper for Telegram
voice notes, but routing the mic through it would put every spoken word
on the network for no latency win.

Shape notes, all of them things the first live runs decided:

  - Viseme offsets are relative to speech_start (emitted when the first
    PCM frame reaches the speaker), never wall clock, so the shell and
    the daemon never have to compare clocks. ElevenLabs sends character
    alignment, not visemes, so the mapping is ours; the glTF morph target
    names are the contract.
  - clean_for_speech is a whitelist. She writes "(¬‿¬)", whose characters
    live in Latin-1 and punctuation blocks rather than any emoji range,
    so enumerating what to drop never converges. Em dashes become commas
    because they are a pause — dropping one ran two clauses together and
    changed what a sentence meant.
  - whisper invents words out of silence ("you", "Thank you."), and a
    held key over a quiet room is long AND empty, so has_speech gates on
    the loudest 100ms window rather than on duration.
  - Beeps on key down/up and a distinct low tone for "heard nothing":
    push-to-talk with no acknowledgement is indistinguishable from broken,
    and a dead mic must not feel like a slow reply.
  - A warmup request at startup: her first reply after the container
    starts costs ~16s against ~5s warm, and the first one is always the
    one you are waiting for.
  - `luna-voice watch` prints the socket protocol and `luna-voice say`
    runs a turn from typed text, which is how a broken mic is told apart
    from a broken pipeline.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 22:45:17 +02:00
darmanandClaude Opus 5 8dc3affdda feat(mars): expose luna over the OpenAI-compatible API server
API_SERVER_ENABLED/HOST/PORT in the env template, bound 0.0.0.0 for the
same reason the dashboard is: the container is --network=host and nothing
opens 8642 in the firewall, so it is reachable over tailscale0 only.

API_SERVER_KEY has to go through .env like the ElevenLabs key did
(461d6cc). Confirmed the same way: with the key set only in the container
env the server came up — so API_SERVER_ENABLED/HOST *did* pass through —
but answered every bearer token with "Invalid gateway API key". The s6
passthrough list carries the plain API_SERVER_* vars and drops the secret
one. The .env write is now a write_env_key helper so both keys share it.

restartUnits gains prepare-dirs, which is what writes the .env line; the
container then has to come back up to read it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 22:45:05 +02:00
darmanandClaude Opus 5 9566624686 secrets(mars,terra): add the Hermes API server key
hermes_api_server_key is the bearer token for Hermes' OpenAI-compatible
API server, generated once and stored in both vaults: mars serves it,
terra is its only client.

elevenlabs_api_key is mirrored into terra for the same reason — terra
calls ElevenLabs directly (the client-direct path Hermes documents)
rather than relaying audio through mars, so both hosts need the value
and a rotation touches two files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 22:44:57 +02:00
darmanandClaude Opus 5 10046bf846 fix(mars): restart hermes when prepare-dirs' script changes
prepare-dirs is an inactive oneshot and switch-to-configuration only
restarts active units, so the .env delivery added in 461d6cc deployed
cleanly and then did nothing — the container kept running with the old
script until something else restarted it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 18:36:21 +02:00
darmanandClaude Opus 5 461d6cc441 fix(mars): deliver the ElevenLabs key through Hermes' .env
The image's s6 init hands the gateway a fixed set of container env vars;
ELEVENLABS_API_KEY is not one of them, so --env-file alone left
text_to_speech reporting it unset even though the var was in the
container config and the resolver read os.environ fine.

prepare-dirs now merges the single line into ${hermesHome}/.env
(HERMES_HOME=/opt/data), as uid 986 so root never writes into hermesHome,
with the key on an fd opened as root so it stays out of argv and the journal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 18:35:13 +02:00
darmanandClaude Opus 5 1dd8edcbb0 fix(mars): restart hermes when the ElevenLabs key rotates
podman reads --env-file only at container creation, so re-rendering
hermes-agent.env left the running container on its old environment and
TTS kept reporting ELEVENLABS_API_KEY not set after the key landed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 18:10:04 +02:00
darmanandClaude Opus 5 b4c60b9f7b secrets(mars): add luna's ElevenLabs API key
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 17:42:31 +02:00
darmanandClaude Opus 5 1bdd70fc4d feat(mars): provision luna's ElevenLabs API key via sops
ELEVENLABS_API_KEY is the only env override ElevenLabs takes; provider,
voice_id and model_id are config.yaml-only. Seeds tts.provider through the
existing prepare-dirs yq merge so it defaults to elevenlabs without pinning
it — KittenTTS stays provisioned as the offline fallback.

Needs elevenlabs_api_key in secrets/mars.yaml before the next deploy, or
sops-nix fails activation on the missing key.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 17:28:27 +02:00
darmanandClaude Opus 5 a723222223 Merge origin/master (KittenTTS + local STT) into the unpushed mars fixes
origin/master gained PRs #7/#8 on a base that never received the three
local commits, so it still carried FORWARDED_ALLOW_IPS="*" and lacked
jupiter-reachable.service.

Conflict in hosts/mars/hermes-agent.nix resolved by keeping this side's
narrower dashboard trust (trusted_proxies + HERMES_DASHBOARD_PUBLIC_URL,
fec8d7c) and dropping the wildcard it replaced, while keeping both
KittenTTS env vars and PR #8's PYTHONPATH.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 17:27:03 +02:00
darman 71900ddfcf Merge pull request 'mars(kittentts): local STT add-on — faster-whisper in the audio side-venv' (#8) from feat/mars-hermes-kittentts-stt into master
Reviewed-on: #8
2026-09-20 17:24:41 +02:00
darman a0519b5004 Merge pull request 'mars: add KittenTTS voice provider (CPU-only, offline mini model)' (#7) from feat/mars-hermes-kittentts into master
Reviewed-on: #7
2026-09-20 17:24:27 +02:00
luna 2b2f0994e9 mars(kittentts): local STT add-on — faster-whisper in the audio side-venv
Telegram voice-note transcription on mars, no cloud: faster-whisper 1.2.1
(ctranslate2 CPU) installed into the SAME kittentts side-venv via
stt-requirements.txt (appended by the provisioning unit; input stamp
extended). Second auto-patchelf pass RPATHs the newly installed
ctranslate2/av binaries. Container env gains
PYTHONPATH=/opt/data/kittentts-venv/... so hermes's local-stt provider
imports faster-whisper in-process (the image venv is read-only for uid
986, so the built-in lazy installer cannot work there).

Validated live: Telegram voice note transcribed on CPU (i5-4460,
lang=en, text exact) with the same pins.
2026-09-19 13:31:26 +00:00
darmanandClaude Opus 5 22caa06904 mars(kittentts): patch venv .so RPATHs so numpy/onnxruntime load
The venv's python is Nix python313 (also inside the container, via the
/nix/store mount), whose loader never searches /usr/lib, so PyPI manylinux
wheels failed with "libstdc++.so.6: cannot open shared object file".
auto-patchelf the staged venv against gcc-lib + zlib; RPATHs are store
paths, so the delivered copy works in the container too. The lib paths join
the input hash so a toolchain bump rebuilds.

Verified locally with mars's exact uv/python313: construct offline from the
staged hub layout and synthesize with voice "Luna".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:05:01 +02:00
darmanandClaude Opus 5 812c1af1f2 mars(kittentts): install the wheel under its real filename
uv reads the version from the wheel filename, and the fetchurl store path's
hash prefix made it reject the file ("invalid version"). Expose it via a
linkFarm under kittentts-0.8.1-py3-none-any.whl.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:59:01 +02:00
darmanandClaude Opus 5 e0f5c6b37b mars(kittentts): fix review round 3 — eval, delivery and stale-venv bugs
- pkgs.setpriv does not exist (mars failed to eval); setpriv is in util-linux.
- `sh` is not on a unit's PATH; call ${pkgs.runtimeShell} directly.
- Drop `env HOME="$hermesHome"`: unset shell var under `set -u`, and unneeded.
- Staging dir 0700 -> 0755: the uid-986 delivery step could not read it.
- Rebuild the staging venv whenever the stamp misses, else an input bump
  delivered the old venv under the new stamp.
- Add diffutils: `cmp` in the fast path was missing, so every boot re-delivered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:51:05 +02:00
luna bef5215bea mars(kittentts): review round 2 — setpriv delivery, staged hub tree, ordering fix
1: stageVenv declared with the other path vars before the early-exit
reads it (set -u no longer kills the self-heal path on later boots).
2: delivery is rm+cp as the container uid via setpriv — no mv -Tf
rename-replace on a non-empty directory (that failed every
re-provision); chown -R step gone with it.
3: network-online.target back in after= — this unit CAN download at
boot, so uv must not run pre-network.
4: root never writes into hermesHome at all. refs/main, snapshots and
venv staging happen under root-owned staging; delivery drops to uid 986
via setpriv, rm -rf + cp -a from the staging sources. Symlink-takeover
of refs/install targets and the rm/cp race on the delivered tree are
structurally gone.
Minor: sanity check now constructs KittenTTS against the staged hub
tree, not just imports; fetchurls pinned to the commit sha matching
refs/main; fast-path comment matches behavior (staging venv skips
rebuild on damaged delivery).
2026-09-19 12:46:14 +00:00
luna b2982c47a1 mars(kittentts): review fixes — root-owned staging, offline cache resolved, full-input stamp
Review round 1 fixes:
1+2 (security): build+stamp+uv-cache moved out of hermesHome into a
0700 root-owned staging dir (/var/lib/hermes-kittentts). Root executes
python only from the staging venv after an offline import check;
finished artifacts are copied into hermesHome and the stamp compares
delivered copy vs staging byte-for-byte. No root code path follows
anything the container can write, so no stamp symlink-takeover and no
planted-wheel-in-cache execution.
3: HF snapshot dir is the real commit sha with refs/main written, so
hf_hub_download resolves the seeded cache offline (was 'kitten', never
found).
4: container env pins HF_HOME=/opt/data/kittentts-hf + HF_HUB_OFFLINE=1.
5: stamp keyed on the full input set (requirements+wheel+stub+models),
not requirements alone; deletion of a delivered file drops out of the
fast path and re-provisions cheaply.
6: orders after/requires hermes-agent-prepare-dirs.
2026-09-19 12:33:55 +00:00
luna 524315f495 mars: add KittenTTS voice provider (CPU-only, offline mini model)
tts.provider: kittentts, voice Luna, mini-0.8 model (80M params) per
darman. CPU-only onnxruntime inference — no GPU on mars, validated ~1x
realtime on a weaker dev box. Upstream's misaki[en]+spacy declaration is
deliberately not honored (pulls torch→CUDA, 5.6 GB); a .pth-registered
stub satisfies the dead misaki import, failing loudly if it is ever
actually used. HF model cache pre-seeded from hash-pinned store paths so
HF_HUB_OFFLINE=1 runs with zero boot-time network. Provisioner shaped by
the Mnemosyne review: uv venv --clear, root never executes python from
the venv, ownership to the container uid before anything imports, stamp
checked against venv+model files.
2026-09-19 12:14:53 +00:00
darmanandClaude Opus 5 625938922c fix(mars): wait for jupiter over the tailnet before mounting its share
jupiter resolves to its tailnet IP, but network-online.target fires on
the LAN link before tailscaled routes tailscale0. Hermes'
RequiresMountsFor pulls the mount at boot, so it failed with ENETUNREACH
and took prepare-dirs, the Mnemosyne link and the container down with it,
with nothing retrying. The mount now requires a oneshot that polls
jupiter:445 for up to 5 minutes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 02:25:14 +02:00
darmanandClaude Opus 5 fec8d7cb25 fix(mars): trust only neptun's proxy for the Hermes dashboard
Replaces FORWARDED_ALLOW_IPS="*" with dashboard.trusted_proxies pinned to
neptun's tailnet IP (merged into config.yaml by prepare-dirs via yq) and
pins HERMES_DASHBOARD_PUBLIC_URL so the OIDC redirect_uri stays https.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 02:25:14 +02:00
darmanandClaude Opus 5 be98be0100 feat(quickshell): move notifications into HyprChrome
The notification daemon and popup stack now live under
HyprChrome/Widgets/Notifications and are owned by HyprChromeShell, so
popups land on the rail's monitor below its exclusive zone. Replaces
widgets/notifications; NotificationCard renders headless for tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 02:25:14 +02:00
darman 25e17f163e Merge pull request 'mars: provision the Mnemosyne memory provider for Hermes' (#6) from feat/mars-hermes-mnemosyne into master
Reviewed-on: #6
2026-09-19 02:16:35 +02:00
darmanandClaude Opus 5 9b96d3c6f8 mars(mnemosyne): fix env build and plugin symlink target
- fetchPypi: sdists are published underscore-named, so the hyphenated
  pname 404'd.
- sitePackages is relative; prefix the env path so the unit's -d check
  and the symlink point at the store.
- hermes_memory_provider ships in mnemosyne-memory, not mnemosyne-hermes;
  move the import check accordingly.
- Drop the unused /opt/data/mnemosyne-env mount, the orphaned
  requirements.txt, and trim comments.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 02:09:14 +02:00
luna 32dd2abdce mars: build Mnemosyne env as a Nix derivation (review rework)
Supersedes the venv-based fix attempt in 694317a entirely: replaces the
runtime side-venv with a python3.withPackages derivation
(pkgs/mnemosyne-env.nix: mnemosyne-memory 3.15.1 + mnemosyne-hermes 0.5.0
via fetchPypi, base deps only). Env mounted :ro into the container; the
oneshot only writes the plugins/mnemosyne symlink to the env's
site-packages passthru — a canonical store path valid on both sides. No
runtime fetch, no stamp, no root-executes-luna-writable-code, no
host/container path mismatch, no config.yaml sed.
2026-09-18 23:55:05 +00:00
luna 694317acbb mars(mnemosyne): fix review blockers — relative plugin symlink, wipe-and-rebuild venv, PyYAML config cue, drop root-executes-luna-tree 2026-09-18 23:48:32 +00:00
luna a8e5c200dc Drop stale webhook-relay lineage leftovers (superseded on master) 2026-09-18 23:19:06 +00:00
luna ee0a2f39e9 mars: provision the Mnemosyne memory provider for Hermes
Mnemosyne isn't bundled with the official image; third-party PyPI plugin.
Built as a side venv + plugin symlink inside hermesHome so it lands
inside HERMES_WRITE_SAFE_ROOT and survives image rebuilds. Pinned
requirements captured from a validated live install.
2026-09-18 23:11:12 +00:00
luna 666e84bb26 Merge remote-tracking branch 'origin/master' into feat/mars-hermes-mnemosyne
# Conflicts:
#	README.md
#	hosts/jupiter/secrets.nix
#	services/dev/gitea-hermes-webhook-relay.nix
#	services/dev/gitea.nix
2026-09-18 22:59:28 +00:00
darmanandClaude Opus 5 f3dddc9150 feat(terra): replace tuigreet with a quickshell greeter
greetd now runs a throwaway Hyprland hosting dotfiles/quickshell/greeter.qml,
configured per host via homelab.greeter.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 23:34:10 +02:00
darmanandClaude Opus 5 4adb59808f fix(mars): unbreak hermes webhook-routes script, bump Hermes to v2026.9.14
An apostrophe in a condensed comment closed the single-quoted jq program,
so the unit script failed to build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 23:32:35 +02:00
darman a5edaab80d Removed comments & mercury tailscale key 2026-09-18 23:03:08 +02:00
darmanandClaude Sonnet 5 7d9bb7d183 fix(common): expose /etc/timezone so flatpak apps stop defaulting to UTC
Flatpak detects the sandbox timezone from /etc/timezone, not the
/etc/localtime symlink NixOS creates by default. Without it every
flatpak app (Telegram included) silently falls back to UTC, showing
message timestamps 2h off from local time.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJqEmY1y3AYX3JoX4Y6b21
2026-09-18 21:36:41 +02:00
darmanandClaude Sonnet 5 6f24ab69ad docs: condense comments across the repo
Comments had drifted into multi-paragraph narrative (git commit
lineage, debugging stories, restated code) in several hot spots
(scripts/deploy, hermes-agent.nix, flake.nix, gitea.nix, headscale.nix).
Trim every comment to its load-bearing "why" — gotchas, safety
warnings, and non-obvious rationale survive verbatim in substance,
just tightened to 1-2 sentences; historical narrative and anything
already covered in CLAUDE.md is cut. No code/logic changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJqEmY1y3AYX3JoX4Y6b21
2026-09-18 21:36:30 +02:00
darman 3899290c5b added obsidian flatpak 2026-09-18 20:53:22 +02:00
darman bd0aab4e61 Merge pull request 'feat(quickshell): add dense telemetry bar' (#4) from feat/quickshell-dense-bar into master
Reviewed-on: #4
Reviewed-by: darman <mail@erik-s.dev>
2026-09-18 20:44:10 +02:00
darman 1b2260293b Merge branch 'master' into feat/quickshell-dense-bar 2026-09-18 20:43:46 +02:00
darman f7b12bc7cd WIP 2026-09-18 20:39:06 +02:00
darmanandClaude Opus 5 b3c3cc38f0 feat(quickshell): give the prompt its own panel, ESC handling and placement
PolkitPanel replaces BarPanel as the dialog's chrome. Deliberately not a
subclass or a fork: most of BarPanel is density machinery — summary slot,
animated height, state pair, transitions — that a modal never uses, and
inheriting it would tie the dialog's look to a component whose real job is the
rail, so every restyle here would have to be justified against the panels up
there. It keeps the shell's silhouette (cut corners with detached accent caps,
the accent rules, the header strip) and drops the rail's tick decoration.

ESC closes the rail. The bar had no keyboard focus at all, so this adds it,
gated by the shell rather than left to the compositor to arbitrate between two
exclusive surfaces — that resolves by stacking and would invert silently the
day the layers change:

    grabsKeyboard: shell.expanded && !polkit.prompting

so ESC dismisses the prompt while one is open and closes the rail afterwards.
Verified by instrumenting the handoff: expanded -> true, prompt open -> false,
prompt dismissed -> true, collapsed -> false. Note the rail now takes EXCLUSIVE
keyboard focus while expanded, which is the cost of answering a keypress the
user has not aimed at anything.

The dialog sits a third of the way down rather than centred, panel centre on
the third so it grows symmetrically as the message wraps, floored at a margin
so a tall prompt on a short output cannot be pushed off the top.

Also carries the backdrop tuning: dim 0.75 -> 0.65, gridOpacity 0.15 -> 0.10,
crossOpacity 0.45 -> 0.15, now that the scrim is used by the prompt as well as
the rail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAq2kKCLazZmrKvkd3akud
2026-09-01 23:38:23 +02:00
darmanandClaude Opus 5 27b924f5e9 docs(quickshell): correct CLAUDE.md's config-path and architecture claims
The file said ~/.config/quickshell is a symlink to this repo and that saving a
file hot-reloads the running shell. Both are wrong and cost real debugging
time: hosts/terra/home.nix ships the tree with xdg.configFile."quickshell",
which COPIES it into the store, so the config dir is a read-only symlink into
/nix/store and the running shell watches the frozen copy. Hot reload only
applies to a working-tree instance, which is what `nix develop` + qs-dev is
for.

Also records the trap that follows from it: a new file must be git-added
before it can be deployed at all, because flakes read the git tree and drop
untracked files silently — producing a deployed config that fails to load,
which does not surface until the next restart because the running shell keeps
serving the store path it resolved at launch.

Architecture section was stale independently of that: shell.qml has not
instantiated Bar/BarTop/BarBottom for a while, there are eleven launcher
variants rather than eight, the HyprChrome tree was undocumented, and there
are TWO Theme singletons — a token added to one does not exist in the other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAq2kKCLazZmrKvkd3akud
2026-09-01 23:38:09 +02:00
darmanandClaude Opus 5 38608c4008 feat(quickshell): give the shell the polkit agent and one shared scrim
Moves PolkitPrompt from shell.qml into HyprChromeShell. Whether a prompt is
open is shell state by the same rule as the screen and the layer pair: two
surfaces read it.

The prompt no longer carries a backdrop of its own. There is one
ChromeBackdrop per output and a prompt raises them all, so a prompt over an
already-expanded rail reuses the scrim that is there rather than stacking a
second one on it, and a prompt over a collapsed rail expands that same scrim
from its bar-height band to the whole output.

The layer pair now keys off `scrimUp` (expanded OR prompting) rather than off
the density, which keeps bar and backdrop exactly one level apart in every
state. A prompt over a collapsed rail raises both: BACKGROUND sits under
ordinary windows so a scrim there dims nothing, and the bar has to stay one
above the scrim or the shell dims its own chrome. The rail is raised but
stays collapsed — its layer answers to the scrim, its height to `expanded`.

Outputs the rail does not live on get a scrim only while a prompt is up; a
modal that dims one monitor and leaves the others lit does not read as modal.
Expanding the rail still dims only the rail's screen, which is the existing
behaviour and the right one.

The dialog follows Hyprland.focusedMonitor rather than the rail's screen — a
password prompt belongs where the user is looking — matched by name against
Quickshell.screens, falling back to the rail's screen rather than to nothing.

SUPER A is frozen while a prompt is open, and dropped rather than queued, so
the rail does not spring open the moment the dialog goes.

Verified on two monitors via hyprctl layers, both densities, plus the toggle
block with an odd number of presses (two cancel out and prove nothing).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAq2kKCLazZmrKvkd3akud
2026-09-01 23:24:05 +02:00
darmanandClaude Opus 5 05d26e386f feat(quickshell): add polkit authentication agent
Registers a polkit agent for the logind session and presents its requests in
the hyprchrome panel chrome. PolkitPrompt owns the agent, the layer-shell
surface and focus; PolkitPromptContent is the headlessly renderable visual
core, staged by tests/PolkitPromptHeadless.qml.

Replaces terra's hyprpolkitagent autostart, which had been dead for a while:
the unit was never installed, so the start failed silently and the session
ran with no polkit agent at all.

Verified against a live agent — registration, the PAM conversation, retry
after a rejected attempt, and cancellation. Behaviours found by tracing that
the component now documents:

  * registration is ASYNCHRONOUS, so a Component.onCompleted check reports a
    false failure while a change handler cannot see a total failure at all
    (a failed registration never changes the property) — hence the deadline
  * a flow arrives with isResponseRequired false and an empty prompt, so the
    field is still disabled when the window first becomes visible and the
    re-focus on that transition is load bearing
  * concurrent requests SUPERSEDE rather than queue, orphaning the older one.
    Cancelling it from QML trips "QObject::connect(AuthFlow, PolkitAgentImpl):
    invalid nullptr parameter" upstream and costs the live prompt as well, so
    it is deliberately left alone
  * Identity.id is the raw uid, not unix-user:<name>

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAq2kKCLazZmrKvkd3akud
2026-09-01 22:35:23 +02:00
darmanandClaude Opus 5 2bf71494f4 feat(quickshell): cap the rail's open chamfers and trace between them
A chamfer with no neighbour behind it now carries the corner it removed,
put back OUTSIDE the panel as a detached accent triangle. capGap is the
perpendicular distance from the cut, hence the per-axis shift of capGap
over root 2: the cap moves along the cut's normal, not along an axis.

The trace joining two caps belongs to the RAIL, not the panel — the run it
draws is the gap BETWEEN two panels, which no panel can see. HyprChromeBar
filters the row down to panels (a slack Item has no `rightChamfer`, so
spacers drop out, and dropping them is exactly what makes a trace span
them), then joins each right cap to the next left cap: straight, one 45°
step at the midpoint of the gap, straight. It meets the middle of each
cap's outward face rather than its tip.

TestPanel is a staging slot between two spacers. It counts seconds since
load, which is the cheapest proof the panel is live, and standing alone it
exercises a cap and a trace at both ends — something a rail of butted
panels never does.

Restructures the module in the same commit, since the moves and the edits
above land in the same files: folders are PascalCase, the bar and its
widgets moved under Widgets/Bar, and DebugWindow takes the HyprChrome Theme
instead of the legacy one. The two singletons are identical today, so that
is not a visual fix — it is a palette edit reaching the debug stage in
future. Rename detection needs -M40% to follow HyprChromeBar, which grew
past the default similarity threshold.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U19X5LGTxtq4pb4jdNVivv
2026-08-31 00:30:58 +02:00
darmanandClaude Opus 5 3aecaf9de5 feat(quickshell): add HyprChromeShell, workspaces panel, persistent backdrop
HyprChromeShell owns what the rail's surfaces have to agree on: the target
screen, the density and the shortcut that toggles it, and the bar/backdrop
layer PAIR. That pair is why the wrapper exists — the backdrop has to sit
exactly one layer below the bar in both densities, and split across two
files the two assignments drifted apart and put the scrim over the bar.
HyprChromeBar is now just its own surface; ChromeBackdrop takes its layer.

The backdrop renders in both densities instead of fading out: full-screen
while expanded, scoped to the band the rail occupies while collapsed, with
a proportional tail fading off the bottom of that band. Both gradients end
on their solid color when there is no fade — with a zero-length ramp the
start and end stops coincide, Qt sorts stops unstably, and the transparent
one winning turned "no fade" into a ramp across the whole scrim.

WorkspacesPanel, between host and vitals, shows the active workspace per
monitor: one accent box per output collapsed, the full strip with the shown
one filled expanded, lined up in a column behind a fixed-width name cell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U19X5LGTxtq4pb4jdNVivv
2026-08-30 22:41:30 +02:00
darman 15e081e52d Merge remote-tracking branch 'origin/feat/quickshell-dense-bar' into feat/quickshell-dense-bar 2026-08-30 21:18:05 +02:00
luna abccf536f6 [verified] feat(quickshell): add cyber dock launcher 2026-08-30 16:54:19 +00:00
darmanandClaude Opus 5 61da7748af chore(terra): unload hypr-chrome, round corners at 25
Comments out both the plugin and its `plugin.hyprchrome` settings — Hyprland
rejects plugin config for a plugin that is not loaded, so the two have to go
together. The flake input stays, so re-enabling is two uncommented lines.

With the window frames gone, decoration rounding goes 10 -> 25 and
rounding_power 2.0 -> 1.0 (previously unset). Both were applied live first via
`hyprctl eval 'hl.config{...}'`; plain `hyprctl keyword` is refused by the lua
config's non-legacy parser.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 04:13:54 +02:00
darmanandClaude Opus 5 bbe35dd72e feat(quickshell): join adjacent panels into a continuous rail
At spacing 0 a row of panels read as separate tiles, each closing its own
silhouette. BarPanel can now drop either cut corner — rightChamfer (top-right)
and leftChamfer (bottom-left), the only two the shape cuts — so an edge that a
neighbour butts against runs square into it. The bar turns off the host's right
and the vitals' left; the tray keeps both, since the spacer between them is not
a panel and that edge is free.

A side with its chamfer off also draws a connector: the shared edge restroked
in accent at outlineWidth + 2, so the join reads as a deliberate seam rather
than two outlines that happen to touch. The outline's own width becomes a
property so the connector can be defined against it instead of as a second
literal.

The lower-right accent strip takes accentLineWidth, the same slug-derived width
the upper-left one already used, instead of its own Math.min(49, width / 3).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 04:13:43 +02:00
darmanandClaude Opus 5 c69aa4fea2 fix(quickshell): stop the bar twitching when a collapse finishes
Two causes, both outside the panel animation itself.

bodyBottom and bodyEndPadding are animated reals, so their sum spends the tail
of every transition on a fraction. A layout rounds that up, then drops a pixel
the moment the animation lands on its exact value — a 1px hop after the motion
has visibly finished. implicitHeight and targetHeight now round.

The rest was the surface. Hyprland animates layer-surface resizes (animations
enabled, `layers` left at its default), and the deferred shrink put that resize
exactly where the panel motion ended. The bar is now sized once to the expanded
rail via the new BarPanel.expandedHeight and never resizes; only exclusiveZone
tracks the state, so the desktop still reflows once per toggle, at the start.
That retires barHeight, the content-height handler and the 340ms shrink timer.

A surface that stays tall would swallow clicks across the screen while the rail
is collapsed, so input is masked to the panel row.

Instrumenting BarPanel per frame ruled the panels themselves out first: slug
and summary hold the same absolute y through an entire collapse.

The bar and scrim also get their own layer namespaces. Nothing depends on them
yet; they are the handle for a layerrule that would exempt the rail from
compositor animations without catching the launchers, which share the default
"quickshell" namespace and do want their fade.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 03:44:40 +02:00
darmanandClaude Opus 5 e7c30fd39d feat(quickshell): show local and tailnet address in HostPanel
A third line under user // timezone, muted so the identity block stays a
descending three tiers.

Unlike the name, user and zone — none of which can change under a running
shell — addresses can, so this polls on a 30s timer instead of joining the
startup one-shot. The local one is read off the interface holding the default
route with tailscale0 excluded: as an exit node tailscale0 holds that route
itself, and the panel would show the tailnet address on both sides.

Drops the expanded body's `height: 48`. A third line has to grow the panel,
and BarPanel measures the body to decide how tall it is, so a fixed height
would have clipped the new row instead. The bar follows through targetHeight.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 03:30:35 +02:00
darmanandClaude Opus 5 15698d3a78 feat(devshell): stream quickshell warnings and errors in nix develop
qs-log follows the working-tree instance's log filtered to WARN|ERROR (-a for
everything), and the shellHook starts it in the background once qs-dev is up,
taking it down again in the exit trap alongside qs-prod. A binding loop or a
failed binding is a WARN, and easy to miss when it scrolls past unwatched.

It starts at the end of the log rather than replaying the backlog, and
re-attaches in a loop: `qs log -f` ends when the instance it attached to exits,
and the dev shell outlives individual instances.

Also corrects the hot-reload note added in 7268221, which was wrong on both
counts. Tested against the running shell: `touch` never reloads (mtime is not a
content change) and inode-replacing edits like `sed -i` are picked up fine. The
reliable check is whether `qs log` shows a "Reloading configuration..." line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 03:25:26 +02:00
darmanandClaude Opus 5 7eb7b948e8 feat(quickshell): dim the desktop behind the expanded hyprchrome bar
A full-screen scrim carrying the dense bar's drafting grid, shown while the
rail is expanded and faded out with it.

It sits on the TOP layer while the bar moves to OVERLAY. Both on one layer
would stack by surface creation order, which is not something to rely on; a
layer apart makes "above windows, below the bar" a guarantee. The mask is an
empty Region, so the scrim takes no clicks and reserves nothing.

The grid is the dense bar's, at twice the spacing and with registration
crosses on every other intersection. Its 0.018 opacity was tuned against a
near-black panel and is invisible over a scrim on lit windows, so grid and
crosses are both properties rather than constants, and the lines take a
desaturated accent derived from the palette instead of plain text colour.

Cross geometry rounds with Math.floor on both the mark's offset and the bars
inside it. anchors.*Center halves the box unfloored, which put an even-sized
mark half a pixel off the 1px rule it registers against. crossThickness is in
steps for the same reason: 1 -> 1px, 2 -> 3px, 3 -> 5px, since only an odd
width straddles a rule symmetrically.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 03:25:14 +02:00
darmanandClaude Opus 5 7268221a51 fix(quickshell): drop layout-overridden geometry in HostPanel
The expanded body is a RowLayout, so the divider's `y`/`width`/`height`, the
clock column's `width: 210`, and the user/zone text's `y: 32` were all being
discarded silently — a layout assigns its children's geometry, and a Column
positions its own. Only the anchors among these ever warned.

The divider's 8px inset becomes Layout margins, and `Layout.alignment` goes
from the clock column, where it is ignored while the item fills.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 02:41:39 +02:00
darmanandClaude Opus 5 e38a8403ac feat(quickshell): add hyprchrome bar with collapsible panels
A second shell chrome under dotfiles/quickshell/hyprchrome, built around a
BarPanel that carries TWO renderings of its data: the default children are the
expanded detail view, `summary` the terse one shown while collapsed. Both stay
bound to the same sources, so the densities cannot disagree, and the panel
cross-fades between them while its height animates.

Panels: HostPanel (hostname, user, timezone, clock), VitalsPanel (CPU load and
temperature, memory, GPU load and temperature, all metered), TrayPanel (system
tray, self-sizing). HyprChromeBar pins them to DP-2 and owns `expanded` for the
whole rail — SUPER A, via GlobalShortcut "chrome".

GPU busy comes off sysfs rather than the node_exporter scrape VitalsData
already does: the hwmon collector carries the card's temps, power and clocks
but not its utilisation.

The bar's height binds to each panel's `targetHeight` — where it will settle,
not where the animation currently is — because the exclusive zone is
window-sized by default, and binding to the animated height relayouts every
tiled window on the output twelve times per toggle. The zone follows the target
immediately so the desktop reflows once, at the start; the surface itself
shrinks only after the panels finish, or it would clip them mid-animation.

DebugWindow stages a widget in the middle of the secondary monitor
(SUPER CTRL D), masked so only the staged widget takes pointer input.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HEtXvseVb5gwAtKNhFx2PU
2026-08-29 02:38:00 +02:00
darman 6406e06330 Auto stash before merge of "feat/quickshell-dense-bar" and "origin/feat/quickshell-dense-bar" 2026-08-28 23:03:36 +02:00
luna 9b6b799a5d [verified] feat(quickshell): add orbit launcher variant 2026-08-28 20:58:37 +00:00
luna 5ecc73f084 [verified] feat(quickshell): add blade launcher variant 2026-08-28 20:48:23 +00:00
luna fdc00a8574 [verified] feat(quickshell): add dense application launcher 2026-08-28 07:35:06 +00:00
darmanandClaude Opus 5 b16cc93ff6 refactor(quickshell): move every color and font into a Theme singleton
The shell was running two unrelated palettes: an amber one (#FFD063 accent,
#EEEEEE text, #0F1012 panels) hardcoded as ~200 raw hex literals across the
launchers, sidebar, systray, vitals and notifications, and an orange one
(#e8722a) that only the dense bar had, tokenized as per-file properties.

This unifies on the ORANGE values under the AMBER naming scheme, and moves the
lot into widgets/theme/Theme.qml. `surface` takes the dense bar's void
(#0a0a0a) rather than the old panel background. Zero color and font literals
remain anywhere under widgets/ outside Theme.qml.

Collisions resolved, all near-duplicates that wanted to be one token:
  - #0F1012 + #0A0A0C + #0a0a0a -> surface
  - #EEEEEE + #dedede           -> text
  - #7A7B7D + #858585           -> muted
  - #292C30 + #22262C           -> raised
  - #FFD063 + #e8722a           -> accent

Two derived things rather than literals. accentSoft (the pale flash the
top/bottom bars show while a launcher is open) was a hand-picked #FFF3C0
against amber, which is simply wrong against orange; it is now
Qt.tint(accent, white 55%), a ratio checked against the original (amber tinted
55% gives #FFE9B8 vs the hand-picked #FFF3C0). And the dense bar had been
hand-encoding Qt.rgba(0.87,0.87,0.87,a) and Qt.rgba(0.91,0.45,0.16,a), which
are just text and accent at alpha -- now textAlpha(a)/accentAlpha(a), so they
track a palette change instead of silently drifting.

Fonts came along too. Digital-7 Mono is dropped for DepartureMono: it was
never packaged, relying on a manual ~/.dots/fonts/digital_7 install that does
not exist on terra, so `fc-match "Digital-7 Mono"` resolved to DejaVu Sans and
all 38 of those sites -- the launcher lists, sidebar clock, systray labels,
every vitals readout -- were silently rendering in a PROPORTIONAL fallback.
Numeric columns should visibly improve. readoutFont is an alias of displayFont
rather than a second literal so the two roles cannot drift apart.

quickshell/CLAUDE.md updated: it said "No shared theme/tokens file yet" and
told contributors to grep for the existing hex color, which would now
reintroduce exactly what this removes.

Verified: no file references Theme. without the import, none imports it
unused, and the whole shell -- launchers, sidebar, vitals, systray,
notifications, not just the harness -- hot-reloaded clean on terra.
tests/HeadlessSmoke.qml deliberately keeps its own copies; its value is having
no dependencies.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgcWkm3t6BDQktYHQvb8Hx
2026-08-28 07:56:25 +02:00
darmanandClaude Opus 5 01bc169180 refactor(quickshell): rework the panel chrome, extract it as StatusBarPanel
The dense bar's panel chrome gets a squarer outline (top-right and bottom-left
chamfers only, square on the other two corners) and a second accent line in
the lower right to balance the existing upper-left one.

The chrome then moves out of DenseBarContent's inline `component
TelemetryPanel` into its own file. The call sites are unchanged apart from the
name -- children still come from the default property -- and the widgets they
pass in (RadarGauge, NetworkTrace, MetricBlock) stay declared in
DenseBarContent, so their scope is unaffected by moving only the definition.

Two things could not come along and had to be reproduced locally, because a
component in its own file has no access to the enclosing scope:

  - the palette and the two font families, previously read off `root`. They
    are properties with defaults matching DenseBarContent's, which is this
    repo's per-component convention. Duplicated on purpose for now; a shared
    theme singleton is the place to collapse it.
  - MicroText, which is an *inline* component of DenseBarContent and so
    invisible from another file. Expanded to the Text it desugars to.

Also qualified the bare offsetY/chamfer/accentLineThickness references as
panel.*; they resolved through the component scope before, but being explicit
avoids ComponentBehavior: Bound warnings in the new file.

Verified the move was verbatim by normalising the old inline block and the new
file body and diffing them -- the only differences are the relocated property
block, the panel.* qualification and the MicroText expansion. Loads clean both
headlessly and in the real layer-shell shell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgcWkm3t6BDQktYHQvb8Hx
2026-08-28 07:55:59 +02:00
darmanandClaude Opus 5 54896033c6 feat(flake): add a quickshell hot-reload devShell
hosts/terra/home.nix ships dotfiles/quickshell via xdg.configFile, which
copies the tree into the store: ~/.config/quickshell is a read-only symlink
into /nix/store and every QML tweak costs a nixos-rebuild. quickshell does
hot-reload on file save -- but only for the files it watches, which are those
frozen store copies. `nix develop` now swaps the running shell to the working
tree (`qs -p`) and swaps it back on exit, so QML edits need no rebuild at all.

The swap starts the dev instance FIRST and kills the packaged one only once
dev is confirmed up. A QML error in the working tree then leaves you on your
normal bar instead of no bar, which matters because a broken save is exactly
when you would be running this. Liveness is "did `qs list -j` return json" --
it exits 0 whether or not it found anything, so the exit code says nothing.

Every kill is scoped to one config (`qs kill` = default, `qs kill -p` = that
path). A blanket kill would also take out unrelated instances; pkgs/rishot.nix
is one.

Three guards on the auto-swap, all learned by testing it:
  - interactive only. `nix develop --command X` EXECs X, replacing the shell
    that set the `trap ... EXIT`, so the restore never runs and you are left
    on the dev instance. Non-interactive use gets `nix develop -c qs-dev`.
  - WAYLAND_DISPLAY, so entering the shell over ssh cannot kill the desktop's
    bar and leave nothing in its place.
  - a sentinel, so a nested `nix develop` does not swap and restore twice.

Deliberately not wired to direnv (no .envrc): programs.direnv is enabled for
this user, so a `use flake` would swap the running desktop shell on every `cd`
into the checkout.

Verified end to end on terra: swap, hot-reload of a working-tree edit, and
restore, plus both the interactive and non-interactive paths.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgcWkm3t6BDQktYHQvb8Hx
2026-08-28 07:55:03 +02:00
darman 45e08e35a2 Merge pull request 'Feat/obsidian livesync' (#5) from feat/obsidian-livesync into master
Reviewed-on: #5
2026-08-28 05:16:36 +02:00
luna 22fe8ab778 feat(quickshell): add dense telemetry bar 2026-08-27 23:52:47 +00:00
darmanandClaude Opus 5 a8a1cffa3e mars: mirror luna's Obsidian vault to disk with livesync-bridge
Gives the Hermes agent a real directory of markdown for the luna_wiki
vault, at /var/lib/livesync-bridge/vault and mounted into her container at
/opt/data/vault (inside HERMES_WRITE_SAFE_ROOT, so she can write, not only
read). Obsidian itself is an Electron GUI with no headless mode, and an
agent wants files rather than an app.

livesync-bridge is Deno, not packaged, and publishes no image — upstream
ships only a `build: .` compose file. So it comes in as a pinned non-flake
input and runs under systemd. Two things that are not obvious:

  - The source is COPIED to a fixed path rather than run from /nix/store.
    Deno keys localStorage — where the bridge records per-file sync state —
    by the main module's origin. Verified by running one source tree from
    two paths against a single DENO_DIR: two origin directories appear. Run
    from the store, every input bump would silently reset both peers to a
    full rescan.
  - It runs as uid 986/gid 983, the same identity the hermes container
    uses. Two uids in a shared group only works while every file stays
    group-writable, and one 0644 file dropped by the agent would stall sync
    on that path.

Talks to CouchDB over the tailnet (jupiter.orbit.sol:5984), so neptun's
vhost, its TLS and its path allowlist are all out of the picture.

Verified before deploying: `deno check` passes on nixpkgs' 2.8.3 (upstream
pins 2.6.9), and the bridge starts, reads LSB_CONFIG, detects a file and
writes its health heartbeat. Both directions confirmed working on mars
afterwards.

Credentials are currently the `obsidian` admin account and the personal
vault's passphrase, which means mars can decrypt every vault database and
not just luna's. Deliberate reuse of what existed; hosts/mars/secrets.nix
records the two independent ways to narrow it.

⚠️ Upstream has three open, unanswered issues on the storage->couchdb
direction (#50, #23, #46) and all fail silently — the log reports the
upload and the database is never updated. Do not treat this directory as
durable storage for anything luna cannot regenerate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLN5nkLBtCciD3ZnUwtw2b
2026-08-26 00:10:34 +02:00
darmanandClaude Opus 5 15ae1cf608 obsidian: self-hosted vault sync via CouchDB on jupiter
Adds services/dev/obsidian-livesync.nix — CouchDB 3 from the native
nixpkgs module, tuned as the backend for the Self-hosted LiveSync plugin
— and publishes it as notes.mgaction.town through neptun.

It goes out over the public reverse proxy rather than staying on the LAN
because Obsidian's mobile apps refuse cleartext HTTP and *.jupiter.sol
cannot hold a publicly trusted cert. That makes the hardening load-bearing
rather than decorative:

  - require_valid_user in both [chttpd] and [chttpd_auth], so nothing
    answers unauthenticated on the open internet;
  - neptun's vhost matches on CouchDB's own naming rule (system endpoints
    all begin with `_`, user databases never can), so Fauxton, /_all_dbs
    and /_node/_local/_config — which rewrites the server config given
    admin credentials — 404 at the proxy while any number of per-vault
    databases pass. Verified against both sets of paths with caddy run
    against a stub backend;
  - the plugin's own E2EE carries the actual confidentiality: jupiter only
    ever stores ciphertext. Its passphrase is deliberately NOT in sops —
    it never leaves the clients, and pairing it with the server credential
    would defeat the point.

flush_interval -1 is required, not tuning: replication rides a continuous
_changes feed that caddy would otherwise buffer into a stall.

Storage sits on the array with RequiresMountsFor, since a CouchDB that
starts without /mnt/data would create an empty database on the eMMC and
LiveSync would replicate that emptiness back to every client. Logs go to
journald rather than the unrotated /var/log/couchdb.log, for the same
29G-eMMC reasons as the rest of jupiter.

The admin password reaches CouchDB as an [admins] ini fragment via
extraConfigFiles; services.couchdb.adminPass would have rendered it into
the world-readable store.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLN5nkLBtCciD3ZnUwtw2b
2026-08-25 23:25:37 +02:00
darmanandClaude Opus 5 94061bd80a monitoring: create the victoriametrics state dir, and pin the scrape timeout
The bind onto /var/lib/private/victoriametrics needs its source to exist or
the mount fails -- and because it is `nofail`, quietly: RequiresMountsFor is
satisfied by /mnt/data itself, so the service would start anyway and write
the TSDB to the eMMC, which is the one thing the bind exists to prevent.
prowlarr.nix has no tmpfiles rule only because its directory predates the
module (migrated from ZimaOS); this is a fresh service, so it creates its
own, same as seerr.nix. Verified on jupiter: the mount is live on md127 and
nothing lands on the OS disk.

scrape_timeout was left implicit at the Prometheus default of 10s, which is
longer than the 5s interval -- VictoriaMetrics clamps it down rather than
erroring, so the config claimed 10s while the scraper used 5s. Say what
actually happens. Checked with `victoria-metrics -promscrape.config.dryRun`,
not just nix eval, which never builds the checked-config derivation.

Also comments: why the bind exists and why `nofail` is load-bearing (the
fileSystems block had none, unlike prowlarr.nix and seerr.nix), and why
mercury needs its own job -- scrape_interval is per-job and job_name must be
unique, so its `job` label will always differ from the other hosts'. Select
on `host` in dashboards or mercury drops out of them silently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-24 04:58:12 +02:00
darman 15fc18ab50 Merge pull request 'jupiter: add VictoriaMetrics monitoring' (#1) from feat/mars-victoriametrics into master
Reviewed-on: #1
Reviewed-by: darman <mail@erik-s.dev>
2026-08-24 04:48:45 +02:00
luna eec17b77df monitoring: move metrics state to the data array 2026-08-24 02:03:51 +00:00
luna b6aec1e307 monitoring: scrape mars node exporter 2026-08-24 01:45:00 +00:00
luna dfe8504402 monitoring: move VictoriaMetrics to Jupiter 2026-08-24 01:42:07 +00:00
luna 5764e6c644 mars: tune VictoriaMetrics scrape targets 2026-08-24 01:30:37 +00:00
darmanandClaude Opus 5 b99337adb7 gitea: subscribe the review hook to pull_request_review
The hook registered with no events at all and delivered nothing.
"pull_request_review_comment" and "pull_request_review_rejected" are real
HookEventTypes and real X-GitHub-Event-Type values, but they are not
things gitea's hook API accepts. updateHookEvents
(routers/api/v1/utils/hook.go) matches a fixed list of api names and
silently ignores anything else, so every event flag stayed false, the POST
succeeded, and the hook sat there inert.

There is no narrower api name: HasEvent (models/webhook/webhook.go)
collapses approved, rejected and review-comment onto
HookEventPullRequestReview, so `pull_request_review` is a single switch for
all three. Approvals consequently cannot be excluded at the hook any more.
They now cross the wire as "pull_request_approved", which is not in the
route's event list, so Hermes ignores them on the event match -- before the
filter script and before any LLM call. Gitea's delivery log will show them
answered 200/ignored, which is intended.

That makes three namespaces for the same event rather than two, so the
tables in both nix files and the README now carry the api column, and the
README warns about the silent-ignore behaviour that hid this.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-24 03:27:52 +02:00
luna fb1226f9b5 Merge master into feat/mars-victoriametrics 2026-08-24 01:17:42 +00:00
luna dc037312b3 Merge master into feat/mars-victoriametrics 2026-08-24 01:15:07 +00:00
luna 082cbaff2a mars: reduce VictoriaMetrics retention to 15 days 2026-08-24 01:12:50 +00:00
darmanandClaude Opus 5 152c38b56b readme: document both hermes routes and the toolset grant
Fills in the subscription/wire name table for all five mappings rather
than the two prose examples, and records why the routes are written as
config instead of subscribed -- including that the toolset grant is
deliberate but not enforced, since the file it lives in is inside
HERMES_WRITE_SAFE_ROOT.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-24 03:10:43 +02:00
darmanandClaude Opus 5 753573aeea gitea: register a hook per hermes route, and keep both secrets out of argv
One webhook per route, from a list, so adding a route is an entry rather
than a copy of the unit. The PR-review hook subscribes
pull_request_review_comment and pull_request_review_rejected.

The unit runs as the gitea user on a multi-user box, where
/proc/<pid>/cmdline is world-readable for the lifetime of the process, so
`-H "Authorization: token $t"` published the admin token and
`jq --arg secret "$s"` the webhook secret -- which is exactly what the
existing comment claimed to be avoiding by putting the body on stdin. The
token now goes through a 0600 `curl -K` config written with printf (a
shell builtin, so the substitution never reaches an argv) and the secret
through jq --rawfile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-24 03:10:43 +02:00
darmanandClaude Opus 5 c18413d16d hermes: write the webhook routes as config, and add a PR-review route
`hermes webhook subscribe` has no --toolsets flag, so a webhook run got
Hermes's constrained default (web_search, web_extract, vision_analyze,
clarify) -- no shell, no file access, which meant neither prompt could
actually be carried out: luna was woken, read the comment, and had no way
to act on it. Upstream's documented answer is to add the `toolsets` key to
webhook_subscriptions.json by hand, and a hand edit does not survive this
unit's re-provision. So the whole route definition moves here and the CLI
is not used at all.

The file is written host-side with jq. hermesHome is the bind-mount source
for /opt/data, so the container sees the same inode and hot-reloads it on
the next delivery -- no podman exec, no readiness loop, and no quoting
chain between nix and the prompt text. The merge is per-route: routes this
unit does not name survive, created_at is carried over, and every other
key is replaced outright so a hand-added `deliver_only` or `filters`
cannot linger.

The secret now comes from the sops file directly instead of being read
back out of the container's environment, which drops podman-hermes-agent
from restartUnits (the ordering constraint it existed for is gone) and
takes GITEA_HERMES_WEBHOOK_SECRET out of an env var luna can read.

The new gitea-pr-reviews route covers reviews with a body and
changes-requested. Those are not IssueCommentPayloads: gitea sends a
PullRequestPayload with action "reviewed" and a `review` object of exactly
{type, content} -- no review id, no line comments. So the prompt fetches
them with `tea pulls review-comments` and acts only on ones whose
`resolver` is empty, resolving each as it goes; with no stable id in the
payload, resolved state is the only workable duplicate-delivery guard.
An empty review body is deliberately NOT a drop, unlike in the comment
filter: a review whose substance is entirely in line comments has none.

Approvals are left unsubscribed -- an approval is darman signing off, not
asking for work.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-24 03:10:33 +02:00
darmanandClaude Opus 5 6f99a1fed1 prompt: drop the nix eval validation step
Not executable under the toolset a webhook run actually got: Hermes
defaults those to web_search/web_extract/vision_analyze/clarify, with no
shell. Worth revisiting now that the routes grant `terminal` explicitly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-24 03:10:19 +02:00
darmanandClaude Opus 5 b516a800bf filter: make drops visible in the gateway log
Every drop so far has been silent. The script printed its reason to stderr
and exited 0 with "[SILENT]", but Hermes only logs stderr on the nonzero
path, as

  script ignored webhook path=... code=... stderr=...

so from outside, a deliberate drop, a crash, a timeout and a missing file all
looked identical: {"status":"ignored","reason":"script"} and nothing else.
Finding out which one it was meant re-running the payload through the script
by hand.

Drops now exit 3 with an empty stdout. Both still mean "ignored" to Hermes,
but the reason lands in the log. Exit 3 rather than 1 keeps a deliberate drop
distinguishable from an unhandled exception, which exits 1, so the code alone
says which happened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 08:55:17 +02:00
darmanandClaude Opus 5 e75f474726 hermes: match --events issue_comment, not pull_request_comment
A timeline comment on a PR never reached the route. Gitea reuses the same
strings in two namespaces and they collide:

  subscription name            wire name (X-GitHub-Event)   what it is
  pull_request_comment         issue_comment                comment on a PR
  issue_comment                issue_comment                comment on an issue
  pull_request_review_comment  pull_request_comment         review on a PR

The hook's `events` array takes the subscription name; Hermes matches
--events against X-GitHub-Event, the wire name, produced by
HookEventType.Event() in modules/webhook/type.go. So --events
pull_request_comment was selecting review submissions and could never match a
comment -- the exact inversion of what it reads like.

That also explains both observed failures. The review submission matched
(wire name pull_request_comment) and reached the filter, which correctly
dropped it on action=reviewed since a PullRequestPayload carries no comment
object. The timeline comment arrived as issue_comment, matched nothing, and
was dropped by the events filter before the script ever ran.

gitea.nix and hermes-agent.nix now deliberately name the same event
differently, so both carry the table and say the other is not a typo.

issue_comment on the wire also covers comments on plain issues. The hook does
not subscribe those, and the filter's is_pull check drops them regardless, so
widening the hook later cannot leak issue comments into the agent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 08:46:31 +02:00
darmanandClaude Opus 5 6116ec4e5a gitea: name the hermes hook and send only PR comments
Names the webhook "PR comments Hermes" (gitea's CreateHookOption/EditHookOption
both carry an optional `name`, so it survives the create and the update path)
and narrows it from all 26 event types to pull_request_comment alone.

Gitea sends pull_request_comment distinctly from issue_comment, so the hook
now covers comments on pull requests and nothing else. Hermes would have
dropped the rest anyway -- its route filters on X-GitHub-Event before any LLM
call -- so this is defence in depth rather than the only gate, but it keeps
traffic that can never be acted on from crossing the wire and reaching the
agent's process at all.

The tradeoff is that event selection now lives on both sides: a second Hermes
route needs its event adding here as well as being subscribed. That is the
right way round for a single-purpose hook, and the comment says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 08:18:11 +02:00
darmanandClaude Opus 5 2a1a1628e1 relay: remove it; gitea already speaks Hermes's protocol
The relay existed on the premise that Gitea sends no header Hermes can read
an event name from, so something had to copy X-Gitea-Event into
X-GitHub-Event. That premise was wrong. Gitea's addDefaultHeaders sets

  req.Header["X-GitHub-Delivery"]   = []string{t.UUID}
  req.Header["X-GitHub-Event"]      = []string{event}
  req.Header["X-GitHub-Event-Type"] = []string{eventType}

unconditionally, for every webhook type, alongside X-Hub-Signature-256 in
GitHub's exact format. (Direct map assignment rather than .Add() specifically
to keep the "GitHub" casing that canonicalisation would destroy.) Hermes
validates that signature on any route without provider gating and reads the
event name from that header, so gitea and hermes already speak the same
protocol and the translation layer was translating nothing.

Gitea now posts straight at http://mars.orbit.sol:8644/webhooks/gitea-pr-comments.
The URL path is the Hermes route name, so a second subscription is a second
hook and nothing else -- the route-in-path indirection the relay grew was a
reimplementation of something Hermes already had.

Removes the module, the 200-line relay, its test, the mars import, the 8645
listener, and the stale gitea-hermes-webhook-relay.service entry left in the
secret's restartUnits. hermes-agent-webhook-route moves to
hosts/mars/hermes-agent.nix, next to the container and the read-only prompt
and filter mounts it depends on.

Also makes that unit refuse to subscribe when GITEA_HERMES_WEBHOOK_SECRET is
unset in the container, matching the existing empty-prompt check. An empty
secret silently fails every delivery signature check afterwards while the
unit still reports success -- the worst possible failure shape, and one this
setup can actually produce on a first deploy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 08:09:01 +02:00
darmanandClaude Opus 5 503623551a secrets: rotate gitea_luna_token with the issue scope
The previous token was write:repository only, which clones, fetches and
pushes branches perfectly well and then fails at `tea pr create` — a pull
request is an issue in gitea's data model, so every /pulls endpoint gates on
the issue scope category rather than the repository one.

Regenerated with write:repository,write:issue,read:user. Confirmed against
the running instance: gitea reports the granted set as
  read:activitypub, read:misc, read:notification, read:organization,
  read:package, write:issue, write:repository, read:user
so write:issue is present rather than only read:issue, which would satisfy
the GET half and still fail the POST that opens the PR. The extra read:*
categories are gitea expanding the request, not something asked for.

No manual step on mars: gitea_luna_token already restarts
hermes-agent-prepare-dirs, which does delete-then-add for the tea login on
every start and so picks up the rotation by itself.

The old token is NOT revoked — gitea's CLI cannot delete tokens and the API
route needs basic auth as luna, which nothing here sets. It stays valid until
removed by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 07:58:20 +02:00
darmanandClaude Opus 5 941a6731bb gitea: add a gitea admin CLI alias on jupiter
Mirrors the `hermes` alias on mars. The admin CLI is effectively
undiscoverable without it: the package is not in systemPackages so `gitea` is
not on PATH at all, every admin subcommand needs GITEA_WORK_DIR pointed at a
stateDir that is not the module default, and it has to run as the gitea user
or it drops root-owned files into that directory. Getting any of the three
wrong fails in a different and unhelpful way.

Both the package path and the stateDir come from the config rather than being
written out, so a gitea bump or a stateDir move cannot leave the alias
pointing at something stale — which is exactly what a hardcoded /nix/store
path would do.

Lives in services/dev/gitea.nix, which only jupiter imports, so it does not
leak onto hosts with no gitea to administer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 07:49:05 +02:00
darmanandClaude Opus 5 ee3051f6e4 gitea: allow tailnet webhook targets
Webhook delivery to the hermes relay was refused outright:

  Post "http://mars.orbit.sol:8645/gitea/gitea-pr-comments":
  dial tcp 100.64.0.6:8645: webhook can only call allowed HTTP servers
  (check your security.ALLOWED_HOST_LIST setting),
  deny 'mars.orbit.sol(100.64.0.6:8645)'

ALLOWED_HOST_LIST defaults to `external`, documented as "a valid non-private
unicast IP". Tailscale addresses come from 100.64.0.0/10 — RFC 6598
carrier-grade NAT space — which is not RFC1918 private but does not satisfy
gitea's notion of external either, so every tailnet target is denied by
default. Nothing about the relay or the URL was wrong; the request never left
jupiter.

Sets the tailnet CIDR explicitly and keeps `external`, so a future webhook to
a public service still works without another edit here.

Goes in [security], not [webhook]: the webhook-section key is deprecated in
favour of this one and now merely falls back to it, and [security] is the
name the delivery error itself reports.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 07:35:03 +02:00
darmanandClaude Opus 5 e14571d029 common: add jq to systemPackages
jq was only ever on the `path` of the units that call it, so it was absent
from an interactive shell — which made the hook-migration commands in the
README unrunnable on the host they target. It is a general-purpose tool and
every host already carries curl, so it belongs alongside it rather than being
pulled in per-unit.

Also simplifies those README commands now that jq is present, and uses mars's
existing `hermes` alias instead of spelling out the podman exec.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 07:04:30 +02:00
darmanandClaude Opus 5 3567591ecf provisioning: stop deleting the pre-rename hook and subscription
Retiring gitea-events is a one-off migration, not something worth re-running
on every boot. Both units now only touch what they own: jupiter's creates or
updates its own hook and deletes nothing, and mars's removes only the route
it is about to re-subscribe, as the idempotency step for `subscribe`.

Keeping the deletes would have meant a redeploy could silently remove a hook
or route someone added deliberately -- a real risk now that sibling hooks
for other Hermes routes are the intended pattern.

README carries the manual commands, and the note that both hooks fire until
the old one is removed by hand, so events arrive twice in the meantime.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 06:57:58 +02:00
darmanandClaude Opus 5 f982c6dc14 relay: take the Hermes route from the request path
Renames the subscription to gitea-pr-comments (it handles one event; the old
gitea-events name promised more than it delivered) and drops --deliver.

Rather than move the hardcoded route from one constant to another, the relay
now reads it from the request path: POST /gitea/<route> forwards to
<base>/webhooks/<route>. The route name was the last thing tying this service
to a specific subscription, so a second Hermes route is now a `hermes webhook
subscribe <name>` plus a Gitea hook at /gitea/<name>, with no relay change --
previously it would also have needed a second relay URL baked in here.

The path segment is interpolated into an outbound URL, so it is validated
against ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ and refused rather than sanitised
when it does not match. The path is matched raw and never URL-decoded, so
percent-encoded separators fail the charset check instead of surviving it;
requiring an alphanumeric first character also rejects "." and "..". Without
this, POST /gitea/..%2fadmin would let anything that can reach the relay
steer it at other Hermes endpoints. Tests cover traversal, encoded traversal,
embedded slashes, leading dot/dash, and the length bound, and assert nothing
reaches the stub Hermes in any of those cases.

Dropping --deliver leaves it at its default of `log`. The prompt tells her to
answer in the pull request, so the PR comment is the delivery and a Telegram
copy would only duplicate it; this also removes the hardcoded chat id that
was a third copy of TELEGRAM_HOME_CHANNEL.

Provisioning retires the pre-rename hook by its EXACT old URL rather than by
"points at the relay". Now that sibling hooks for other routes are the
intended pattern, a prefix match would delete them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 06:52:52 +02:00
darmanandClaude Opus 5 31ba001d06 hermes: give the gitea-events route its prompt and event filter
Completes the subscription: it had a secret, a delivery target and a script,
but no prompt and no event list, so it woke the agent on every forwarded
event with nothing to tell her what to do.

--events pull_request_comment narrows the route to the one event the prompt
handles. This only works because the relay copies X-Gitea-Event into
X-GitHub-Event; without that every delivery arrives as "unknown" and matches
nothing. Gitea sends pull_request_comment distinctly from issue_comment, so
plain issue comments no longer reach the agent at all. The Gitea-side hook
still posts the full event set to the relay and Hermes drops the rest before
any LLM call.

The prompt lives in hosts/mars/gitea-pr-comment-prompt.md, mounted read-only
next to the filter, and is read with $(cat) at subscribe time rather than
passed inline. That is not only about escaping: the text has to survive nix
`` string escaping, the systemd unit file, and `podman exec sh -c '...'`
single-quoting. It contains an apostrophe ("the PR's head branch") that
would terminate that single-quoted string early. Read from a file at runtime
the content never passes through shell source, so it can contain anything.
Verified end to end against the rendered unit with stubbed podman/hermes:
the value reaching --prompt is byte-identical to the repo file apart from
the trailing newline that command substitution strips.

`set -eu` inside the container shell is load-bearing. Without it a missing
prompt file makes cat fail, the substitution yields "", and the subscription
is created with an empty prompt -- a silent failure that still looks like a
healthy unit.

On what read-only does not buy: it protects the sources, and this unit
re-subscribes from them on every start, so a restart restores the intended
prompt, filter and events. The live subscription itself lives in
webhook_subscriptions.json under /opt/data and is hot-reloaded, which is
inside the agent's own write-safe root -- a self-modification would stick
until this unit next runs.

The prompt keeps its own stop conditions even though the filter already drops
those deliveries, and says explicitly that reaching them means the filter
failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 06:41:50 +02:00
darmanandClaude Opus 5 1fc4395068 hermes: add read-only Gitea PR comment filter, break the reply loop
The gitea-events subscription woke the agent on every delivery. That is an
unbounded loop as soon as she is given a prompt that tells her to answer on
the PR: her answer is itself a pull_request_comment, which wakes her again.

Adds a Hermes route script that drops the deliveries that must never reach an
LLM call: luna's own comments (the loop guard), "deleted" actions (the body
is still in the payload, so acting on one means acting on a request that was
explicitly withdrawn), non-pull-request comments, empty bodies, and edits
that did not actually change the body — a label or attachment change fires
"edited" too. Everything else passes through unchanged.

Mounted READ-ONLY from the nix store rather than written into hermesHome.
Hermes resolves route scripts under ~/.hermes/scripts, which here is inside
/opt/data — HERMES_WRITE_SAFE_ROOT — so a filter written there would be a
loop guard sitting in the writable root of the agent it constrains. Deleting
it fails closed (Hermes treats a missing script as "ignore"), but rewriting
it to always-allow would silently restore the loop. Read-only from the store
makes that impossible and keeps the guard in git.

The script also normalises changes.body.from to always exist. Gitea omits
`changes` entirely on created events, and Hermes replaces the prompt payload
with whatever JSON the script emits, so guaranteeing the key here means a
prompt referencing {changes.body.from} renders empty instead of leaving an
unfilled placeholder.

Note the stdout contract (gateway/platforms/webhook.py): only exactly
"[SILENT]", empty output, or a nonzero exit drop a delivery. Any OTHER text
on stdout lets it through and is attached as script_output — so a stray
debug print would silently defeat the filter. All diagnostics go to stderr,
and gitea-pr-comment-filter-test.py asserts that discipline along with each
drop rule (25 cases). Run it after any edit: the fail-closed behaviour means
a syntax error produces silence, not an error.

--events is still unset; event selection remains runtime-tunable policy.
The filter covers only what must not be.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 06:32:31 +02:00
darmanandClaude Opus 5 50f83971de hermes: stop provisioning luna a working copy, fix her git/tea access
Three fixes to how luna's git/tea credentials are set up on mars, all found
against the running instance on 2026-08-23.

Drop the host-side clone. hermes-agent-prepare-dirs used to clone this repo
into ${hermesHome}/workspace/homelab, but nothing ever told luna at runtime
that it was there — she self-manages config/profiles/memories, so a path
baked into this file never reached her. She searched /opt/data/homelab and
/workspace, found neither, and concluded she had no repo at all. The
credentials are what actually grant access; any checkout is hers to make
anywhere inside HERMES_WRITE_SAFE_ROOT. The stale directory left by the old
version is deliberately not cleaned up, just unmanaged from here on.

Point credential.helper at the CONTAINER's path. It was written as the host
path (${hermesHome}/.git-credentials), which does not exist inside the
container where git actually reads the config — broken this way from 3c1f3e5
until now. Nothing host-side consumes those credentials any more, so the
container's view is the only one that has to be right; added `containerHome`
to make the distinction explicit at the point of use.

Chown what the oneshot writes. The image's cont-init only chowns the top
level of hermesHome and its own state — it does not recurse into the
root-owned 0600 files this unit drops there (.git-credentials, and tea's
config.yml, which tea also writes 0600), even though it runs afterwards. The
symptom was not an error but an absence: git reported no credential helper
and tea no login. Uses `if` rather than `[ -d x ] && chown` because under
`set -e` a false test on the left of an && list aborts the unit.

gitea.nix carries the matching comment updates: the luna provisioning unit is
server-side only, and her token needs write:repository,write:issue,read:user.
write:issue is the one that is easy to miss — a pull request IS an issue in
gitea's data model, so /pulls endpoints gate on the issue scope category and
`tea pr create` fails with write:repository alone even though clone, fetch
and push all work.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 06:30:28 +02:00
darmanandClaude Opus 5 2d9be98df7 desktop: add yaak
Desktop API client (REST/GraphQL/gRPC).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 06:30:28 +02:00
darmanandClaude Opus 5 d0aec5b061 secrets: add gitea_hermes_webhook_secret to mars + jupiter
Shared HMAC secret for the Gitea -> Hermes webhook relay merged in #2. Both
hosts need the same value: jupiter signs deliveries with it (the webhook
config registered by gitea-hermes-webhook-provision), and mars verifies them
in the relay and hands it to Hermes through the hermes-agent.env template.

32 random bytes, hex-encoded, stored with no trailing newline — the value
reaches Hermes via an env-file template where a newline would both corrupt
the file and change the key the HMAC is computed with.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 05:18:58 +02:00
darman bdd6107be1 Merge pull request 'mars: add generic Gitea webhook relay' (#2) from feat/mars-gitea-webhook-relay into master
Reviewed-on: #2
Reviewed-by: darman <mail@erik-s.dev>
2026-08-23 05:14:35 +02:00
darmanandClaude Opus 5 b0e7e67c90 relay: copy X-Gitea-Event into X-GitHub-Event, fix deploy ordering
The relay was forwarding X-Gitea-Event and re-signing the body into the
deprecated generic-V1 X-Webhook-Signature header. Neither is something
Hermes acts on, which left the PR's core premise — "Hermes owns event
selection" — impossible to reach:

  - Hermes reads the event name only from X-GitHub-Event/X-GitLab-Event,
    then payload event_type/type, then falls back to the literal string
    "unknown" (gateway/platforms/webhook.py). Gitea sends X-Gitea-Event and
    no such payload key, so every delivery arrived as "unknown" and
    `hermes webhook subscribe --events ...` could never select anything.
  - Gitea's addDefaultHeaders() already signs every webhook type with
    X-Hub-Signature-256 in GitHub's exact format, and Hermes accepts that
    header on any route with no per-route provider gating. Re-signing into
    V1 was both redundant and on a deprecated path.

So the relay now verifies the signature (accepting either X-Hub-Signature-256
or X-Gitea-Signature), forwards body and signature byte-for-byte, and copies
the one header Hermes actually needs. Authentication alone never justified
this service; that header copy does, and the module comment now says so.

Also fixed:
  - gitea-hermes-webhook-provision had no API readiness wait, unlike both
    sibling units in the same file. After=gitea.service does not mean gitea
    is serving HTTP, so under `set -e` a Type=oneshot with no Restart= would
    fail on first boot and stay failed, leaving the webhook unregistered.
  - podman-hermes-agent added to the secret's restartUnits. The secret
    reaches the container only via sops.templates, whose rendered path never
    changes, so systemd would not restart the container when the secret was
    first added — hermes-agent-webhook-route then read an empty value back
    out of it and subscribed with an empty secret.
  - Webhook provisioning passes the request body to curl on stdin rather
    than in argv, keeping the shared secret out of /proc/<pid>/cmdline.
  - Missing Content-Length now returns 411 rather than 413; dropped the
    unreachable non-2xx branch (urlopen raises on non-2xx); env-var secret
    fallback is stripped to match the credential-file path.

Adds gitea-hermes-webhook-relay-test.py, which drives the real relay over
real HTTP against a stub Hermes and covers the header copy as a regression
test. Both nixosConfigurations still evaluate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
2026-08-23 05:02:55 +02:00
luna ea9be6fb8a mars: add VictoriaMetrics monitoring 2026-08-23 00:55:07 +00:00
247 changed files with 27229 additions and 3331 deletions
+1
View File
@@ -0,0 +1 @@
PATH_add scripts
+6
View File
@@ -14,3 +14,9 @@ keys.txt
# local env (PATH etc.) # local env (PATH etc.)
.env .env
# local visual-verification output
.artifacts/
# rust build output
target/
+4
View File
@@ -14,6 +14,7 @@ keys:
- &neptun age1hp72xyx2cnd05937e4eww95g5kdtn0wsf9j2nypw330pa69gfdxqn0lpkp - &neptun age1hp72xyx2cnd05937e4eww95g5kdtn0wsf9j2nypw330pa69gfdxqn0lpkp
- &terra age1rfcmu6zh40v4260l9hnf8ajs9vly0s06rx3ey76eu78dp9t7getqyhmkut - &terra age1rfcmu6zh40v4260l9hnf8ajs9vly0s06rx3ey76eu78dp9t7getqyhmkut
- &mars age1eapjg6tdrr0fuvmgs3q3nlvnjkaxez298qynqqqxt0lpcv0lrsyq7ayxjk - &mars age1eapjg6tdrr0fuvmgs3q3nlvnjkaxez298qynqqqxt0lpcv0lrsyq7ayxjk
- &titan age1qm6ne4mrgwkj7eea5j3vn0qmtw4p5h4eu78vvahhfnd4pk04qausn3qgv2
# mercury (rpi) uses a dedicated age key (SD image, no ssh-host-key delivery); # mercury (rpi) uses a dedicated age key (SD image, no ssh-host-key delivery);
# the private key is dropped on its boot partition after flashing. # the private key is dropped on its boot partition after flashing.
- &mercury age1cpty7zrgnn6l97upq00w5wa8zcvnkxkdt2jvhlj97jh83exure4slha43t - &mercury age1cpty7zrgnn6l97upq00w5wa8zcvnkxkdt2jvhlj97jh83exure4slha43t
@@ -29,6 +30,9 @@ creation_rules:
- path_regex: secrets/terra\.yaml$ - path_regex: secrets/terra\.yaml$
key_groups: key_groups:
- age: [ *admin, *terra ] - age: [ *admin, *terra ]
- path_regex: secrets/titan\.yaml$
key_groups:
- age: [ *admin, *titan ]
- path_regex: secrets/mars\.yaml$ - path_regex: secrets/mars\.yaml$
key_groups: key_groups:
- age: [ *admin, *mars ] - age: [ *admin, *mars ]
+95 -2
View File
@@ -4,7 +4,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
Flake-based NixOS config for a homelab. Hosts: **jupiter** (ZimaBlade NAS, x86_64), Flake-based NixOS config for a homelab. Hosts: **jupiter** (ZimaBlade NAS, x86_64),
**neptun** (netcup public reverse proxy + tailnet node, x86_64), **mercury** (Raspberry **neptun** (netcup public reverse proxy + tailnet node, x86_64), **mercury** (Raspberry
Pi 3B+ DNS/DHCP, aarch64). See `README.md` for the full install/deploy walkthrough. Pi 3B+ DNS/DHCP, aarch64), **terra** (desktop), **titan** (Zenbook Pro Duo laptop),
**mars** (Hermes Agent + luna's apps). See `README.md` for the full install/deploy walkthrough.
## Layout ## Layout
@@ -12,10 +13,12 @@ Pi 3B+ DNS/DHCP, aarch64). See `README.md` for the full install/deploy walkthrou
flake.nix # nixosConfigurations: real hosts + test/util targets flake.nix # nixosConfigurations: real hosts + test/util targets
common.nix # shared base: user darman (key-only ssh), nix settings, firewall :22, tz common.nix # shared base: user darman (key-only ssh), nix settings, firewall :22, tz
services/<cat>/*.nix # one reusable NixOS module per service, grouped by category services/<cat>/*.nix # one reusable NixOS module per service, grouped by category
# (media, network, vpn, identity, dev, desktop); each opens # (media, network, vpn, identity, dev, desktop, comms); each opens
# ITS OWN firewall ports. services/containers.nix (podman # ITS OWN firewall ports. services/containers.nix (podman
# backend) stays at the top level, shared across categories. # backend) stays at the top level, shared across categories.
hosts/<h>/ # configuration.nix + disk-config.nix (disko) + hardware-configuration.nix + secrets.nix hosts/<h>/ # configuration.nix + disk-config.nix (disko) + hardware-configuration.nix + secrets.nix
profiles/workstation.nix # Hyprland workstation shared by terra + titan (NixOS side)
home/desktop/ # its home-manager side; per-host monitors via homelab.desktop.*
secrets/<h>.yaml # sops-nix, age-encrypted per host secrets/<h>.yaml # sops-nix, age-encrypted per host
scripts/deploy # config-agnostic deploy wrapper (all args mandatory) scripts/deploy # config-agnostic deploy wrapper (all args mandatory)
scripts/edit_secrets scripts/edit_secrets
@@ -51,6 +54,18 @@ empty password, so the script resolves the title among `--filter-state active` i
first; a plain `pass-cli item view --item-title` silently returns the trashed copy and first; a plain `pass-cli item view --item-title` silently returns the trashed copy and
you get an interactive prompt with no explanation. you get an interactive prompt with no explanation.
On terra/titan the values come from **pass-broker** (`services/identity/pass-broker.nix`),
not from anyone's own pass-cli session: it runs as its own user with an agent PAT scoped to
the HomeLab vaults and releases an item only after a Telegram tap. Prompts go through the
**gateway on mars** (`hosts/mars/pass-broker-gateway.nix`, tailnet :8097), the bot's only
`getUpdates` consumer: a second poller would split the taps. A new host gets its own
`pass_broker_gateway_token` in its sops file and that token's sha256 in the gateway's
`hosts`. When the socket exists, deploy uses it exclusively; a refused tap falls back to the
interactive prompt.
**Claude: fetch Proton Pass items only via `pass-broker get --item <title> --reason <why>`**,
never `pass-cli login` yourself, and never print a value you fetched. Values go into
variables or pipes, as `scripts/deploy` does.
`HOMELAB_KEXEC_TARBALL` (+ `_CPIO` / `_GZIP`) makes `kexec`/`kexec-local` reuse a `HOMELAB_KEXEC_TARBALL` (+ `_CPIO` / `_GZIP`) makes `kexec`/`kexec-local` reuse a
prebuilt installer instead of rebuilding ~500MB. The VM test below uses this. prebuilt installer instead of rebuilding ~500MB. The VM test below uses this.
@@ -74,6 +89,18 @@ nix build .#nixosConfigurations.mercury-vm.config.system.build.vm -o result
nix build .#nixosConfigurations.jupiter-vbox.config.system.build.virtualBoxOVA nix build .#nixosConfigurations.jupiter-vbox.config.system.build.virtualBoxOVA
# end-to-end VM test of `deploy kexec-local` (~45s once the tarball is built) # end-to-end VM test of `deploy kexec-local` (~45s once the tarball is built)
nix build .#checks.x86_64-linux.kexec-local -L nix build .#checks.x86_64-linux.kexec-local -L
# VM test of luna's app hosting on mars (hosts/mars/luna-sites.nix): podman socket
# proxy, registry validation, caddy routes, reboot persistence
nix build .#checks.x86_64-linux.luna-sites -L
# VM test of pass-broker with fake pass-cli + Telegram: approve/deny/expiry,
# grants, policy, uid check
nix build .#checks.x86_64-linux.pass-broker -L
# two-node VM test of the gateway on mars with a broker using it: labels,
# cancel, expiry, per-host token isolation, gateway down
nix build .#checks.x86_64-linux.pass-broker-gateway -L
# Synapse + MAS on jupiter behind neptun's caddy: C collation, delegation,
# SSO-only login flows, admin API not public, chat + media upload, restart
nix build .#checks.x86_64-linux.matrix -L
``` ```
`checks.kexec-local` is the only way to exercise `kexec-local` at all: it jumps the `checks.kexec-local` is the only way to exercise `kexec-local` at all: it jumps the
@@ -207,3 +234,69 @@ kept its ssh host key. Run it after ANY change to the kexec paths.
- **`kexec-local` stages on `/var/tmp`, not `/tmp`**: `kexec-run.sh` appends a fresh cpio - **`kexec-local` stages on `/var/tmp`, not `/tmp`**: `kexec-run.sh` appends a fresh cpio
to `kexec/initrd` in place and execs binaries from that dir, so a size-capped or to `kexec/initrd` in place and execs binaries from that dir, so a size-capped or
`noexec` tmpfs gives a half-written initrd or a bare "Permission denied". `noexec` tmpfs gives a half-written initrd or a bare "Permission denied".
- **sops-nix values must be STRINGS.** `sops --set '["id"] 123'` stores `type:int`; the
build-time check only sees key names and passes, then activation's sops-install-secrets
fails with "is not a string" and installs NONE of the new secrets. The old generation
stays, so it looks like only the new keys are missing. Quote it: `'["id"] "123"'`.
- **A sops secret a USER service reads needs `owner`, not a mode.** `luna-voiced`
(`services/desktop/luna-voice.nix`) runs as darman's user unit, and a user manager
cannot read root:root 0400 — `LoadCredential` does not bridge that gap either.
Hence `sops.secrets.<x>.owner = "darman"` in `hosts/terra/secrets.nix`.
- **`elevenlabs_api_key` is in BOTH `secrets/mars.yaml` and `secrets/terra.yaml`** —
same value. terra calls ElevenLabs directly (the client-direct path Hermes
documents) rather than relaying audio through mars, so rotating that key means
editing two files. `hermes_api_server_key` is duplicated for the same reason:
mars serves the API, terra is its only client.
- **terra's mic is QUIET, and every voice threshold is sized for it.** Measured on
the AIR 192|4 (`luna-voice level`): ~0.001–0.002 RMS ambient, only 0.0045–0.005
for normal speech — about 6dB of separation. Consequences, all of which looked
like "the daemon is broken": a VAD multiplier above ~2 can never fire, an
absolute trigger floor of 0.006 sits *above* the user's voice, and whisper's own
gate at 0.015 discarded every word the VAD did capture. Hence `vadMult = 1.8`,
`vadFloor = 0.0025`, and `stt::normalize` scaling the clip up (capped at 30x)
before whisper sees it. Raising the gain on the interface is worth more than any
of these; tune via `homelab.lunaVoice.vad*` rather than editing Rust.
- **`try_recv()` POPS — an `if let Ok(Cancel)` destroys every other command.**
luna-voiced polls for a cancel while she speaks; written as a single `if let`,
any `say`/`toggle`/`mode off` arriving mid-reply was taken off the channel and
dropped, so SUPER+V during her answer did nothing at all and the next turn never
ran. Non-cancel commands are collected and re-sent into the channel after the
turn instead (`requeue` in `turn()`).
- **A rising sound must not update the noise floor.** Feeding every sample into the
floor EMA lets speech drag its own threshold up faster than it rises — measured,
a tone peaking at 0.029 was chased by a threshold that reached 0.018 and never
triggered. Only samples *below* the current trigger update the floor.
- **whisper invents words out of silence** — "you", "Thank you.", "Bye." — and a
held push-to-talk key over a quiet room is long AND empty, so duration alone
does not catch it. `stt::has_speech` gates on the loudest 100ms window instead;
without it every stray keypress sends a hallucinated sentence to luna.
- **terra's greeter is a throwaway Hyprland running `dotfiles/quickshell/greeter.qml`**
(`services/desktop/quickshell-greeter.nix`). It must exit after login or greetd never
starts the session, and with a Lua config `hyprctl dispatch exit` is REJECTED — it needs
`hyprctl dispatch 'hl.dsp.exit()'`. Test the flow without touching the real greetd by
running greetd's `fakegreet "qs -p …/greeter.qml"` inside a nested Hyprland
(user `user`, password `password`, then answer `9`).
- **Matrix logins go through MAS, not Synapse's `oidc_providers`** (`services/comms/matrix.nix`).
Element X only supports SSO via Matrix Authentication Service, and moving an existing
Synapse onto MAS is a one-way `syn2mas` migration — so it was there from day one. With
MAS enabled Synapse refuses to start if password login, registration or any SSO
section is on. Admin rights come from MAS:
`sudo -u matrix-authentication-service mas manage promote-admin <user>`.
- **Synapse's database needs `LC_COLLATE`/`LC_CTYPE` = C**, which `ensureDatabases`
can't give (cluster default locale) and `initialScript` never runs on jupiter's
existing immich cluster — hence the `\gexec` CREATE DATABASE in `postgresql-setup`'s
`ExecStartPost`. Synapse's signing key is a sops secret, not generated on first
start: it IS the server's federation identity, and the array it would live on is RAID0.
- **A MAS compat token is "not active" until Synapse has its device.** Synapse rejects
any token whose device it doesn't know, and `mas manage register-user` immediately
followed by `issue-compatibility-token` races: the new user's provisioning job syncs
devices before the token's session is committed and deletes the device just created.
`mas manage provision-all-users` re-syncs it. luna's Matrix bot token
(`hosts/mars/secrets.nix`) hit this.
- **Run the Hermes CLI on mars as `hermes`, never as root** (`podman exec -u hermes`, or
the `hermes` zsh alias). Since v0.22, optional deps (ElevenLabs `tts-premium`, plugin
deps like Honcho's `honcho-ai`) live in PM generations under `/opt/data/installs`; a
root `hermes pm status` created a root-owned `.leases` dir there and every later
install failed with "install state is not writable by this user". Those deps are
luna's volume state, not Nix: after a reset, `hermes pm install --extra tts-premium`
and `hermes plugins install honcho --force --yes-deps --enable`.
+168 -19
View File
@@ -2,8 +2,8 @@
Flake-based NixOS config. Hosts: `jupiter` (ZimaBlade, NAS + services), Flake-based NixOS config. Hosts: `jupiter` (ZimaBlade, NAS + services),
`neptun` (netcup VPS: public reverse proxy, Authentik, headscale), `neptun` (netcup VPS: public reverse proxy, Authentik, headscale),
`mercury` (Raspberry Pi 3B+, DNS/DHCP), `terra` (desktop), `mars` (on-site, `mercury` (Raspberry Pi 3B+, DNS/DHCP), `terra` (desktop), `mars` (on-site:
single-purpose: Hermes Agent only). Hermes Agent, plus the LAN web apps luna hosts at `http://mars.sol/<name>/`).
## Structure ## Structure
@@ -27,9 +27,12 @@ hosts/
vm.nix # VirtualBox test image (jupiter-vbox) vm.nix # VirtualBox test image (jupiter-vbox)
neptun/ # netcup public reverse proxy + tailnet node neptun/ # netcup public reverse proxy + tailnet node
configuration.nix disk-config.nix hardware-configuration.nix secrets.nix configuration.nix disk-config.nix hardware-configuration.nix secrets.nix
mars/ # on-site, single-purpose: Hermes Agent only mars/ # on-site: Hermes Agent + luna's LAN web apps
configuration.nix disk-config.nix hardware-configuration.nix secrets.nix configuration.nix disk-config.nix hardware-configuration.nix secrets.nix
hermes-agent.nix # Hermes Agent (moved here from jupiter) hermes-agent.nix # Hermes Agent (moved here from jupiter)
luna-sites.nix # luna's apps: rootless podman + caddy, no nix edit per app
luna-sites-README.md # what luna is told (mounted into her container)
luna-sites-test.nix # VM test: nix build .#checks.x86_64-linux.luna-sites -L
secrets/ # age-encrypted sops files, one per host secrets/ # age-encrypted sops files, one per host
scripts/ # deploy, edit_secrets scripts/ # deploy, edit_secrets
``` ```
@@ -37,25 +40,84 @@ scripts/ # deploy, edit_secrets
Hosts compose by importing `common.nix` + whichever `services/*` modules they Hosts compose by importing `common.nix` + whichever `services/*` modules they
run. Each service module opens its own firewall ports. run. Each service module opens its own firewall ports.
## Gitea event relay ## Gitea events to Hermes
Mars includes a small HMAC-validating relay for Gitea webhooks. It forwards the Jupiter's Gitea registers one webhook per Hermes route, straight at Hermes on
authenticated request body unchanged, along with Gitea event and delivery mars (`http://mars.orbit.sol:8644/webhooks/<route>`), with no relay in between:
headers, to Hermes over localhost. The relay has no event, repository, action,
payload, or prompt policy; Hermes owns interpretation and response behavior.
Add the Gitea repository webhook manually with target URL
`http://mars.orbit.sol:8645/gitea`.
Hermes separately subscribes to `pull_request_comment` and | route | gitea hook event | wakes luna on |
`pull_request_review_comment`, filters out comments by `luna` and comments on | --- | --- | --- |
pull requests not authored by `luna`, then handles external comments in the | `gitea-pr-comments` | `pull_request_comment` | a timeline comment on a PR |
pull request using Tea/Gitea. This route policy is intentionally outside the | `gitea-pr-reviews` | `pull_request_review` | a review with a body, or changes requested |
relay.
Before deploying Mars, add a random `gitea_hermes_webhook_secret` value to Approvals cannot be excluded at the hook — `pull_request_review` is one switch
`secrets/mars.yaml` with `sops --set`. Use that same value when manually for all three review types — so they are delivered and then dropped by the
creating the Gitea webhook. The value is intentionally not included in the Hermes route, which does not list `pull_request_approved`. Expect them in
repository. gitea's delivery log answered 200/ignored; that is the design, not a failure.
Gitea's `addDefaultHeaders` signs every webhook type with
`X-Hub-Signature-256` in GitHub's exact format and sends `X-GitHub-Event`
unconditionally — which is exactly what Hermes validates against the route
secret and reads the event name from, so the two speak the same protocol
without translation. The URL path is the Hermes route name, so another route
is just another hook.
Gitea will only deliver to hosts in `[security] ALLOWED_HOST_LIST`, which
defaults to `external` and does NOT include tailnet addresses
(100.64.0.0/10 is RFC 6598 carrier-grade NAT, neither private nor external as
gitea classifies it). `services/dev/gitea.nix` sets it accordingly; without
that, deliveries fail with `webhook can only call allowed HTTP servers`.
Gitea spells the same event three ways, and two of the spellings collide. The
hook's `events` array takes an *api* name (`updateHookEvents` in
`routers/api/v1/utils/hook.go`), which is a coarser set than the internal
`HookEventType`; `X-GitHub-Event`, which is what each Hermes route matches its
`events` against, carries a lossy *wire* name from `HookEventType.Event()`:
| HookEventType | wire (mars route) | api (gitea hook) |
| --- | --- | --- |
| `issue_comment` | `issue_comment` | `issue_comment` |
| `pull_request_comment` | `issue_comment` | `pull_request_comment` |
| `pull_request_review_comment` | `pull_request_comment` | `pull_request_review` |
| `pull_request_review_rejected` | `pull_request_rejected` | `pull_request_review` |
| `pull_request_review_approved` | `pull_request_approved` | `pull_request_review` |
Watch the api column: `updateHookEvents` **silently ignores strings it does not
recognise**, so a plausible-looking name that is a valid `HookEventType` but
not a valid api event leaves the hook registered with no events at all — no
error, no deliveries. Check a new hook's event list in the UI after adding it.
So `services/dev/gitea.nix` and `hosts/mars/hermes-agent.nix` deliberately name
the same event differently, and neither is a typo. `X-GitHub-Event-Type`
carries the subscription name, but Hermes does not read it.
Each route's prompt and filter script live in `hosts/mars/`. The filters are
bind-mounted read-only from the nix store so the agent cannot edit her own
loop guard out; run
`python3 hosts/mars/gitea-pr-comment-filter-test.py` and
`python3 hosts/mars/gitea-pr-review-filter-test.py` after editing either.
`hermes-agent-webhook-routes` writes the routes into
`~/.hermes/webhook_subscriptions.json` directly, host-side, rather than
calling `hermes webhook subscribe`. That CLI has no `--toolsets` flag, and
without a toolset override a webhook run gets Hermes's constrained default
(`web_search`, `web_extract`, `vision_analyze`, `clarify`) — no shell, no file
access, so neither prompt can actually be carried out. Upstream's documented
answer is to add the `toolsets` key to that file by hand, which does not
survive a re-provision, so the whole route definition lives in nix instead.
The grant (`terminal`, `file`, `web`) is therefore deliberate and restored on
every start — but note it is not *enforced*: that file sits inside
`HERMES_WRITE_SAFE_ROOT`, so luna can widen her own toolset until the unit
next runs. The real backstop is gitea's branch protection on `master`.
Routes the unit does not name are left untouched, so retiring one is a manual
`sudo podman exec hermes-agent hermes webhook remove <name>` on mars — and
likewise its hook in the repo's Settings → Webhooks.
Before deploying either host, add the same random
`gitea_hermes_webhook_secret` value to both `secrets/mars.yaml` and
`secrets/jupiter.yaml` using `scripts/edit_secrets`, with no trailing newline
— a newline would change the key the HMAC is computed with, and the two ends
would disagree. The value is intentionally not included in the repository.
## Test in VirtualBox (no hardware needed) ## Test in VirtualBox (no hardware needed)
@@ -368,6 +430,93 @@ another way in.
(via the `/mnt/jupiter` samba mount) before the first switch if you want (via the `/mnt/jupiter` samba mount) before the first switch if you want
it preserved instead of starting clean. it preserved instead of starting clean.
### Obsidian vaults (jupiter CouchDB + mars bridge)
CouchDB itself is fully declarative (`services/dev/obsidian-livesync.nix`), but
three things are runtime state it cannot own.
**1. Each vault's database is created by the plugin.** Point Self-hosted
LiveSync at `https://notes.mgaction.town` (URI field) with the database name in
its own field — *not* as a path on the URI. Turn on End-to-End Encryption and
Obfuscate Properties **before the first sync**; both are remote-format
decisions and changing them later means converting or rebuilding the database.
The passphrase lives in the HomeLab Proton Pass vault, never in sops — it is
what keeps a publicly reachable database from being a readable one.
Database names must start with a lowercase letter (`a-z0-9_$()+-` after that).
An illegal name is rejected by neptun's matcher rather than CouchDB, and shows
up in Obsidian as a connection failure with **no error message at all**.
**2. luna's vault credentials on mars.** `hosts/mars/secrets.nix` needs two
values before mars will activate: `couchdb_luna_password` and
`obsidian_luna_passphrase`.
```
sops --set '["couchdb_luna_password"] "<password>"' secrets/mars.yaml
sops --set '["obsidian_luna_passphrase"] "<passphrase>"' secrets/mars.yaml
```
Keep both alphanumeric. sops substitutes into already-rendered JSON, so a `"`
or `\` in either produces an invalid `config.json`; the bridge logs
`Could not parse configuration!` and then runs on with **zero peers** instead
of exiting, which looks exactly like a bridge that is simply idle.
As set up today these are the `obsidian` admin password and the same
passphrase as the personal vault, which means mars — the box running an
autonomous agent — can decrypt and read every vault database. Optional
hardening, either half independently:
```
# password comes straight out of sops; never echo it
LUNA_PW=$(sops --decrypt --extract '["couchdb_luna_password"]' secrets/mars.yaml)
ADMIN=obsidian # prompts for the admin password
curl -u "$ADMIN" -X PUT http://jupiter.orbit.sol:5984/_users/org.couchdb.user:luna \
-H 'Content-Type: application/json' \
-d "{\"name\":\"luna\",\"type\":\"user\",\"roles\":[],\"password\":\"$LUNA_PW\"}"
curl -u "$ADMIN" -X PUT http://jupiter.orbit.sol:5984/luna_wiki/_security \
-H 'Content-Type: application/json' \
-d '{"admins":{"names":[],"roles":[]},"members":{"names":["luna"],"roles":[]}}'
unset LUNA_PW
```
then set `username` in `hosts/mars/livesync-bridge.nix` to `luna` and put that
account's password in `couchdb_luna_password`. Run it against jupiter over the
tailnet — `/_users` is blocked on the public vhost on purpose. A vault-specific
passphrase is the other half, changed in the plugin and mirrored into sops.
**3. The database name must match.** `database` in
`hosts/mars/livesync-bridge.nix` has to be exactly the name entered in the
plugin. A mismatch does not error — with an admin credential PouchDB simply
creates the misnamed database and replicates an empty vault into it.
Order matters: set the vault up from Obsidian first so the database exists and
carries the plugin's own tweaks, then deploy mars. Afterwards:
```
systemctl status livesync-bridge # on mars
cat /var/lib/livesync-bridge/health.json # per-peer ok/backendUp/detail
ls /var/lib/livesync-bridge/vault # her notes, as real markdown
```
The vault is mounted into the agent container at `/opt/data/vault`, inside
`HERMES_WRITE_SAFE_ROOT`, so luna can write as well as read.
A note luna writes reaches CouchDB as soon as the bridge sees it, but whether
it then reaches your devices depends on that vault's **Sync Mode** in the
plugin. Only "LiveSync (real-time)" pulls continuously; the periodic/on-save
presets need their timer or a manual **Replicate**. A file that appears only
after clicking Replicate is the client waiting, not the bridge failing — the
database already had it. Check the bridge's own side in the journal:
```
journalctl -u livesync-bridge | grep -- '--> luna-remote'
```
⚠️ **Verify her writes actually land before trusting this.** Upstream has three
open issues on the storage→CouchDB direction (#50, #23, #46) and all fail
silently — the log reports the upload and the database never updates. Create a
note as luna, confirm it appears on a phone, and re-check after any input bump.
### mercury (Raspberry Pi 3B+) ### mercury (Raspberry Pi 3B+)
- `./deploy flash mercury /dev/sdX` writes the dedicated age key to the root - `./deploy flash mercury /dev/sdX` writes the dedicated age key to the root
+10 -10
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, config, ... }:
# Shared base for all hosts: user, SSH hardening, nix settings, packages. # Shared base for all hosts: user, SSH hardening, nix settings, packages.
{ {
@@ -51,13 +51,12 @@
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
environment.systemPackages = with pkgs; [ git btop tmux curl wget zsh-powerlevel10k lsd ]; environment.systemPackages = with pkgs; [ git btop tmux curl wget zsh-powerlevel10k lsd jq ];
# ---- home-manager (user-level config for darman, all hosts) ---- # ---- home-manager (user-level config for darman, all hosts) ----
# Requires home-manager.nixosModules.home-manager in the host's own # Only sets values for options declared by home-manager.nixosModules.home-manager;
# `modules` list (flake.nix) — this only sets values for options that # it doesn't import that module, so every nixosSystem using common.nix must
# module declares, it doesn't import it, so every nixosSystem using # also list it in flake.nix's `modules`.
# common.nix needs that line too (mirrors terra's original setup).
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
# Protects activation if a plain (non-symlink) ~/.zshrc etc. already # Protects activation if a plain (non-symlink) ~/.zshrc etc. already
@@ -91,16 +90,17 @@
boot.loader.systemd-boot.configurationLimit = 5; boot.loader.systemd-boot.configurationLimit = 5;
boot.loader.generic-extlinux-compatible.configurationLimit = 5; boot.loader.generic-extlinux-compatible.configurationLimit = 5;
# Stock journald defaults to ~10% of the filesystem (up to 4G) before it # Stock journald grows unbounded up to ~10% of the filesystem (4G cap, no
# rotates — no scheduled vacuum, just a ceiling it grows into. On jupiter's # scheduled vacuum) — on jupiter's 29G eMMC that's ~2.9G it could silently
# 29G eMMC that's ~2.9G it could silently accumulate. Cap it well below that # fill. Cap it well below that everywhere.
# everywhere instead of only noticing when a disk fills up again.
services.journald.extraConfig = '' services.journald.extraConfig = ''
SystemMaxUse=200M SystemMaxUse=200M
''; '';
# ---- Locale / firewall base ---- # ---- Locale / firewall base ----
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
# Flatpak needs /etc/timezone, falls back to UTC if not set.
environment.etc."timezone".text = config.time.timeZone;
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "de"; console.keyMap = "de";
+113 -12
View File
@@ -4,37 +4,138 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## What this is ## What this is
A [Quickshell](https://quickshell.org/) configuration — a QML-based Wayland desktop shell (bar, launcher, tray, decorations) for a Hyprland/wlroots setup. `~/.config/quickshell` is a symlink to this repo, so Quickshell loads `shell.qml` here as the "default" config. A [Quickshell](https://quickshell.org/) configuration — a QML-based Wayland desktop shell (bar, launcher, tray, decorations) for a Hyprland/wlroots setup. `shell.qml` is the entry point.
## Running / testing changes ## Running / testing changes
**`~/.config/quickshell` is NOT a symlink to this repo.** `home/desktop/default.nix`
ships the tree with `xdg.configFile."quickshell"`, which COPIES it into the nix
store, so the config directory is a read-only symlink into `/nix/store/...`.
Editing a file here therefore changes nothing about the running shell: it is
watching the frozen store copy, and every edit would otherwise cost a
`nixos-rebuild`. Two consequences worth knowing before debugging anything:
- **A new file must be `git add`ed before it can be deployed at all.** Flakes
read the git tree, and untracked files are silently dropped — with no warning
and no eval error. An untracked module that `shell.qml` imports produces a
deployed config that fails to load, which does not surface until the next
restart because the running shell keeps serving the store path it resolved at
launch.
- To check what a deploy actually shipped, compare the evaluated source with
what is live:
`nix eval --raw '.#nixosConfigurations.terra.config.home-manager.users.darman.xdg.configFile."quickshell".source'`
then `ls` that path against `ls -l ~/.config/quickshell`.
```sh ```sh
qs # runs ~/.config/quickshell/shell.qml (this repo, since it's the symlinked default config) nix develop # then: qs-dev — swap the running shell for the WORKING TREE, no rebuild
qs -p . # run this directory explicitly regardless of symlink qs # runs the packaged (store) config
qs -n # exit immediately if another instance is already running (use to avoid duplicate shells while iterating) qs -p . # run this directory explicitly
qs -n # exit immediately if another instance is already running
qs kill # kill the default-config instance ('qs kill -p <path>' for a working-tree one)
``` ```
Quickshell hot-reloads QML on file save when already running, so for most edits just save and check the running instance rather than restarting `qs`. There is no separate build/lint/test tooling in this repo — verification is visual/behavioral via the running shell. `qmlls` (QML language server) is configured via `.qmlls.ini` for editor diagnostics. `qs-dev` is the edit-save-see loop: it starts a working-tree instance, waits
until it is confirmed up, and only then kills the packaged one, so a QML error
leaves you on your normal bar instead of no bar. It is a SWAP rather than a
second instance because quickshell keys instance identity on the config path —
two instances would both map layer-shell bars onto every output. See the
`nix develop` block in `flake.nix`.
Pointed at the working tree, quickshell hot-reloads on file save. It watches
file CONTENT: `touch` alone never reloads (mtime is not a change), while any
real edit does, including inode-replacing ones (`sed -i`, `perl -i`). A save
that is not picked up leaves the shell rendering the previous config with no
error — `qs log` shows a `Reloading configuration...` line for every save it
saw, so that is the check.
A single component can also be run in isolation, which is the way to exercise
something that owns a service or a surface without bringing up the whole rail:
point `qs -p` at a scratch directory whose `shell.qml` instantiates only that
component, with the repo's directories symlinked in for the `qs.` imports.
There is no build/lint/test tooling wired up in this repo, but two things are
worth reaching for. `qmllint` (from qtdeclarative) catches syntax and binding
errors without a compositor — expect noise from the synthesized `qs.*` modules
and the `Theme` singleton, which it cannot resolve:
```sh
qmllint -I <qtdeclarative>/lib/qt-6/qml -I <quickshell>/lib/qt-6/qml -I . <file>.qml
```
And `tools/quickshell-preview/render.sh` renders an `Item`-rooted component to
a PNG offscreen (see `tests/`). Keep production `PanelWindow` wrappers thin and
put the visuals in an `Item` so they can go through that path. `qmlls` is
configured via `.qmlls.ini` for editor diagnostics.
## Architecture ## Architecture
`shell.qml` is the entry point: a `Scope` that instantiates the top-level pieces — `Bar`, `BarBottom`, `BarTop`, and a hidden `Launcher` — as siblings. Each top-level widget manages its own `PanelWindow`(s); there's no central layout manager. `shell.qml` is a `Scope` instantiating the top-level pieces as siblings:
`HyprChromeShell` (the status rail, plus the surfaces it owns — launcher, polkit,
askpass, notifications), the ten remaining launcher variants,
`VolumeOsd` and `Vitals`. Each manages its own
`PanelWindow`(s); there is no central layout manager.
The one exception, and the pattern to follow for anything new that needs it, is
`HyprChromeShell`: it owns the state its surfaces have to AGREE on rather than
letting each decide — which monitor they live on, the rail's density, whether a
polkit prompt is open, and the layer pair. A second reader is what makes a
property shell state; the file's own header comment enumerates them and says
why each qualifies. Layer levels in particular are derived TOGETHER, because
two surfaces on one layer stack by creation order while one layer apart is a
guarantee.
**Import convention**: QML modules are imported by their path under the repo root using the `qs.` namespace, e.g. `import qs.widgets.launcher`, `import qs.widgets.decoration`. Sibling files in the same directory are imported with a relative string import instead (e.g. `Bar.qml` does `import "modules"`). **Import convention**: QML modules are imported by their path under the repo root using the `qs.` namespace, e.g. `import qs.widgets.launcher`, `import qs.widgets.decoration`. Sibling files in the same directory are imported with a relative string import instead (e.g. `Bar.qml` does `import "modules"`).
**Multi-monitor**: Bar/BarTop/BarBottom each wrap their `PanelWindow` in `Variants { model: Quickshell.screens }`, so one window instance is created per connected screen. `pragma ComponentBehavior: Bound` + `required property var modelData` is the standard pattern for these per-screen delegates. **Multi-monitor**: a surface that must exist on every screen wraps its
`PanelWindow` in `Variants { model: Quickshell.screens }`, one instance per
connected screen; `pragma ComponentBehavior: Bound` + `required property var
modelData` is the standard pattern for those delegates. A surface that belongs
to ONE screen instead takes it as a property from the shell. Note
`Quickshell.screens` is a QML list, not a JS array — no `.find()` or `.filter()`
on it, hence the index loops in `HyprChromeShell`.
**Directory layout**: **Directory layout**:
- `widgets/bar/` — `Bar.qml` is the main sidebar (right-anchored, full height) hosting the module stack (date, clock, tray, decorative dividers); `BarTop.qml`/`BarBottom.qml` are thin accent-colored strips anchored to the top/bottom edges. - `HyprChrome/` — the current shell. `Widgets/HyprChromeShell.qml` is the owner
- `widgets/bar/modules/` — individual bar widgets (`Clock`, `Date`, `Tray`/`TrayItem`, `Volume`) built on the shared `BarWidget` base component. described above; `Widgets/ChromeBackdrop.qml` is the scrim (dim + drafting
- `widgets/launcher/` — app launcher panel (`Launcher` → `LauncherPanel` → `SearchBar`/`TextField`), currently a WIP skeleton (search box has no backing logic yet, `Launcher.qml` is instantiated with `visible: false`). grid) shared by the rail and the polkit prompt; `Widgets/Bar/` holds the rail
and its panels, with `Bar/Panels/BarPanel.qml` the chamfered chrome they all
extend; `Widgets/Polkit/` is the authentication agent and its dialog;
`Widgets/Launcher/` is the primary application launcher (`SUPER_L`);
`Widgets/Notifications/` is the notification daemon and its popup stack on the
rail's monitor (`NotificationCard` is the headless-renderable card);
`Widgets/Greeter/` is the greetd login screen, run standalone via `greeter.qml`
(see `services/desktop/quickshell-greeter.nix`), NOT part of `shell.qml`;
`Widgets/Lock/` is the session lock, which reuses the greeter's
`LoginContent` over PAM and runs as its own instance via `lock.qml`;
`Theme/Theme.qml` is this tree's palette singleton. `DebugWindow.qml` stages a
single widget on the secondary monitor for eyeballing it in isolation.
The prompt and the launcher are MODALS: each raises the shared scrim, lands
on the focused monitor, and takes the keyboard off the rail. That is why the
shell instantiates them rather than `shell.qml` — see `modalOpen` there, which
is the one place a new modal has to be named.
- `widgets/bar/` — `DenseBar` and `StatusBarPanel`, the rail's predecessor. Not
instantiated by `shell.qml` any more; `StatusBarPanel` is still used by the
remaining launcher variants.
- `widgets/launcher/` — shared `AppModel` search/execution plus the ten launcher
variants still under evaluation, on `SUPER CTRL 1–11`. Variant 8 has moved to
`HyprChrome/Widgets/Launcher/`; `AppModel.qml` is duplicated there so the
HyprChrome tree stands alone, and this copy goes when the variants do.
- `widgets/decoration/` — reusable QtQuick `Shape`-based visual accents (angled panel edges, slashes) used to give bar panels their non-rectangular look. `Dummy.qml` is a placeholder/test rectangle. - `widgets/decoration/` — reusable QtQuick `Shape`-based visual accents (angled panel edges, slashes) used to give bar panels their non-rectangular look. `Dummy.qml` is a placeholder/test rectangle.
- `widgets/input/` — thin wrappers around `QtQuick.Controls` inputs (currently just `TextField`). - `widgets/input/` — thin wrappers around `QtQuick.Controls` inputs (currently just `TextField`).
- `widgets/layout/` — `HorizontalStack`/`VerticalStack`: `RowLayout`/`ColumnLayout` wrappers that expose `default property alias content` for terser call sites, with a trailing filler `Item` that soaks up remaining space. - `widgets/layout/` — `HorizontalStack`/`VerticalStack`: `RowLayout`/`ColumnLayout` wrappers that expose `default property alias content` for terser call sites, with a trailing filler `Item` that soaks up remaining space.
- `assets/` — SVG icons referenced via `file://${Quickshell.shellDir}/assets/...`. - `assets/` — SVG icons referenced via `file://${Quickshell.shellDir}/assets/...`.
**Styling**: No shared theme/tokens file yet — colors (`#FFD063` accent, `#0F1012`/`#292C30` backgrounds, `#EEEEEE` text) and metrics are hardcoded per-component. When touching visuals, grep for the existing hex color across `widgets/` to keep new elements consistent rather than introducing new values. **Styling**: All colors and font families come from a `Theme` singleton — there
are no color or font literals left anywhere under `widgets/`. There are TWO,
carrying the same palette for the two trees: `widgets/theme/Theme.qml`
(`import qs.widgets.theme`) and `HyprChrome/Theme/Theme.qml`
(`import qs.HyprChrome.Theme`). Match the one your file's tree already uses; a
token added to one does not exist in the other. Add a token rather than
hardcoding a value; alpha variants of the two main colors go through
`Theme.textAlpha(a)` / `Theme.accentAlpha(a)` instead of a hand-written
`Qt.rgba(...)`. Metrics (sizes, spacing) are still per-component.
**Component base pattern**: `BarWidget.qml` (`widgets/bar/modules/BarWidget.qml`) is a `WrapperMouseArea` + `WrapperRectangle` combo providing hover-triggered border highlight (`Behavior on border.color` animation) and `Layout.fillWidth`. Bar modules extend it via `default property alias content` rather than duplicating the hover/border chrome. **Component base pattern**: `BarWidget.qml` (`widgets/bar/modules/BarWidget.qml`) is a `WrapperMouseArea` + `WrapperRectangle` combo providing hover-triggered border highlight (`Behavior on border.color` animation) and `Layout.fillWidth`. Bar modules extend it via `default property alias content` rather than duplicating the hover/border chrome.
**Fonts**: Clock/Date use the `Digital-7 Mono` font family — expected to be installed system-wide (see sibling `~/.dots/fonts/digital_7`), not bundled in this repo. **Fonts**: Two families, both via `Theme`. `Theme.displayFont` / `Theme.readoutFont` (an alias of it) are `DepartureMono Nerd Font`, installed by `services/desktop/desktop-apps.nix`; `Theme.microFont` is `DejaVu Sans Mono`. The shell no longer uses `Digital-7 Mono`, which was never packaged and depended on a manual `~/.dots/fonts/digital_7` install.
@@ -0,0 +1,107 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import QtQuick
import qs.HyprChrome.Theme
// Debug stage: a bare, chrome-less staging area in the middle of ONE monitor
// (the secondary by default), used to look at a widget in isolation before it
// has a home in the bar or a launcher.
//
// DebugWindow {
// VitalBar { width: 220; value: 0.4 }
// }
//
// Children are reparented into the centred slot, which sizes itself to them —
// so they must carry their own size (implicit or explicit). Do NOT anchor a
// child to the slot (`anchors.fill: parent`): the slot measures its children,
// so that is a binding loop.
//
// Nothing is drawn around them — no panel, no background, no dim: whatever is
// staged is exactly what appears. Only the staged widgets take pointer input
// (`mask`), so the rest of the monitor stays clickable, and the window never
// takes keyboard focus. Toggle: SUPER CTRL D.
Scope {
id: root
// Monitor to stage on. Falls back to the LAST connected screen when the
// name matches nothing, so a single-monitor session still gets a stage.
// Set per host in home/desktop/options.nix (secondaryOutput).
property string screenName: Quickshell.env("QS_SECONDARY_OUTPUT") ?? ""
property bool active: true
default property alias content: slot.data
// Quickshell.screens is a QML list, not a JS array — no .find() on it.
readonly property var targetScreen: {
const screens = Quickshell.screens;
if (screens.length === 0)
return null;
for (let i = 0; i < screens.length; i++) {
if (screens[i].name === root.screenName)
return screens[i];
}
return screens[screens.length - 1];
}
function toggle() {
root.active = !root.active;
}
GlobalShortcut {
name: "debug"
description: "Toggle the debug widget stage"
onPressed: root.toggle()
}
PanelWindow {
id: win
screen: root.targetScreen
visible: root.active && root.targetScreen !== null
WlrLayershell.layer: WlrLayer.Overlay
// A HUD, not a modal: never steal the keyboard from the focused window.
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
// Ignore the dense bar's exclusive zone so "centred" means the centre of
// the monitor, not the centre of what is left below the bar.
exclusionMode: ExclusionMode.Ignore
color: "transparent"
anchors {
top: true
left: true
right: true
bottom: true
}
// Everything outside the staged widgets is click-through.
mask: Region {
item: slot
}
Item {
id: slot
anchors.centerIn: parent
width: Math.max(childrenRect.width, placeholder.visible ? placeholder.implicitWidth : 0)
height: Math.max(childrenRect.height, placeholder.visible ? placeholder.implicitHeight : 0)
}
// Sits beside the slot, not inside it, so it never counts itself. Without
// it an unsized child looks identical to a broken window.
Text {
id: placeholder
visible: slot.children.length === 0
anchors.centerIn: parent
text: "NO WIDGETS STAGED"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 1.2
}
}
}
@@ -0,0 +1,61 @@
pragma Singleton
import Quickshell
import QtQuick
// Single source of truth for the shell's palette and font families.
//
// The shell previously ran two unrelated palettes: an amber one (#FFD063) used
// by the launchers, sidebar, systray, vitals and notifications, and an orange
// one (#e8722a) that only the dense bar had, tokenized as per-file properties.
// This unifies on the ORANGE values under the AMBER naming scheme.
//
// `surface` deliberately takes the dense bar's void (#0a0a0a) rather than the
// old panel background (#0F1012), which also absorbs the near-identical
// #0A0A0C scrim.
Singleton {
// ---- core ----
readonly property color accent: "#e8722a" // was #FFD063 (amber) / #e8722a (bar)
readonly property color text: "#dedede" // was #EEEEEE / #dedede
readonly property color muted: "#858585" // was #7A7B7D / #858585
readonly property color surface: "#0a0a0a" // was #0F1012 + #0A0A0C + #0a0a0a
readonly property color hot: "#ff6b4a" // alert/hot; no bar equivalent, kept
// ---- supporting darks ----
// A three-step ramp above `surface`. `raised` also absorbs #22262C, which
// differed from #292C30 by an imperceptible amount across two call sites.
readonly property color selection: "#1a1c1f" // selected row fill
readonly property color raised: "#292c30" // raised surface / border
readonly property color disabled: "#3a3d42" // unknown / disabled stroke
// ---- accents ----
// The pale "flash" the top/bottom bars show while a launcher is open. Was a
// hand-picked #FFF3C0 against amber; derived here so it tracks `accent`.
// 55% toward white reproduces the original amber relationship closely
// (#FFD063 -> #FFE9B8 vs the hand-picked #FFF3C0).
readonly property color accentSoft: Qt.tint(accent, Qt.rgba(1, 1, 1, 0.55))
readonly property color highlight: "#ffffff"
// ---- fonts ----
// Two faces. `readoutFont` is an alias rather than a second literal so the
// two roles cannot silently drift apart; point it at a different family if
// the readouts should ever diverge from the headings again.
//
// Installed by services/desktop/desktop-apps.nix (nerd-fonts.departure-mono).
// The former readout face, Digital-7 Mono, was never packaged — it relied on
// a manual ~/.dots/fonts/digital_7 install, so dropping it also removes an
// undeclared external dependency.
readonly property string displayFont: "DepartureMono Nerd Font" // headings, large values
readonly property string readoutFont: displayFont // seven-segment readouts: launchers, sidebar, systray, vitals
readonly property string microFont: "DejaVu Sans Mono" // dense bar micro labels
// ---- derived alpha variants ----
// The dense bar hand-encoded these as Qt.rgba(0.87,0.87,0.87,a) = text and
// Qt.rgba(0.91,0.45,0.16,a) = accent. Expressed as functions so the
// relationship survives a palette change.
function textAlpha(a) { return Qt.rgba(text.r, text.g, text.b, a); }
function accentAlpha(a) { return Qt.rgba(accent.r, accent.g, accent.b, a); }
// Hairline rule / panel outline: text at 28%.
readonly property color hair: textAlpha(0.28)
}
@@ -0,0 +1,205 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Polkit
// GUI password prompt for `sudo -A`, reusing the polkit dialog.
//
// sudo does NOT speak polkit — it is setuid + PAM reading your tty, and no
// sudoers option bridges the two. What it does support is an ASKPASS helper: a
// program it runs to obtain the password, which prints it on stdout. So this is
// not the polkit agent serving sudo; it is a second, separate path that happens
// to render the same dialog.
//
// Flow, driven by the helper in home.nix (`qs-askpass`):
//
// sudo -A
// -> qs-askpass makes a 0600 fifo under XDG_RUNTIME_DIR
// -> qs ipc call askpass prompt "<prompt>" "<fifo>" (returns at once)
// -> this dialog opens, user types
// -> a one-line writer is started here, secret written to its STDIN
// -> qs-askpass reads the fifo and prints the secret on stdout
// -> sudo reads it
//
// The secret travels on a pipe the whole way. It is never an argument and never
// an environment variable, so it does not appear in /proc for any process — the
// fifo PATH is in argv, which is not secret. It does cross more process
// boundaries than the polkit path, where the password stays inside the PAM
// conversation; that is the inherent cost of askpass, not of this design.
//
// Cancelling answers with an empty line, so the helper reads nothing, exits
// non-zero, and sudo aborts rather than burning a retry on a blank password.
Scope {
id: root
// Which output to appear on; the shell puts it on the focused monitor.
property var screen: null
// The fifo the helper is blocked reading. Non-empty means a request is in
// flight, which is exactly what "a prompt is open" means here.
property string fifoPath: ""
property string promptText: ""
property bool failed: false
readonly property bool active: root.fifoPath !== ""
// Held only between submit and the writer process actually starting: a
// Process cannot be written to before it is running.
property string pendingSecret: ""
IpcHandler {
target: "askpass"
// Called by qs-askpass. Returns immediately — the helper blocks on the
// fifo, not on this call, because an IpcHandler function runs on the
// QML thread and blocking here would freeze the whole shell.
function prompt(message: string, fifo: string): string {
if (root.active)
return "busy";
root.promptText = message === "" ? "Password:" : message;
root.fifoPath = fifo;
root.failed = false;
vault.invalidate();
vault.refresh();
return "ok";
}
// So a helper that times out can take the dialog down with it rather
// than leaving it on screen with nothing listening.
function cancel(): string {
root.dismiss();
return "ok";
}
}
// Cancelling answers with an EMPTY line rather than by closing silently:
// the helper then reads zero bytes and exits non-zero, so sudo aborts
// instead of spending a retry on a blank password.
function dismiss() {
root.respond("");
}
function submit(secret) {
root.respond(secret);
}
// The writer reads ONE LINE and exits; it does not wait for EOF.
//
// The obvious version — `cat > fifo`, write the secret, then close stdin by
// setting stdinEnabled false — does not terminate. Measured: the secret
// arrives intact but `cat` never sees EOF, so the fifo is never closed and
// the helper blocks until its timeout. sudo would hang after you typed.
//
// A single `read` needs no EOF at all: the trailing newline ends it, the
// shell writes what it got and exits, and THAT close is what gives the
// helper its EOF. `IFS=` keeps leading and trailing whitespace, `-r` keeps
// backslashes, and the secret still travels on stdin rather than in argv.
function respond(secret) {
if (!root.active)
return;
vault.invalidate();
root.pendingSecret = secret + "\n";
writer.command = ["sh", "-c", "IFS= read -r line; printf %s \"$line\" > \"$1\"", "sh", root.fifoPath];
writer.running = true;
root.fifoPath = "";
}
ProtonPass {
id: vault
onFetched: secret => {
content.response = secret;
content.focusInput();
}
}
// Opening a fifo for writing BLOCKS until a reader attaches, which is why
// this is a subprocess rather than a FileView: the helper's `cat` is that
// reader, and blocking the QML thread on it would freeze the shell.
Process {
id: writer
stdinEnabled: true
// Written on `started`, not at respond() time: a Process has no stdin
// to write to until it is actually running.
onStarted: {
writer.write(root.pendingSecret);
root.pendingSecret = "";
}
}
PanelWindow {
id: win
screen: root.screen
visible: root.active
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
exclusionMode: ExclusionMode.Ignore
color: Theme.textAlpha(0)
anchors {
top: true
left: true
right: true
bottom: true
}
// No click-off dismissal, for the same reason the polkit dialog has
// none: something is blocked waiting on the answer, and losing it to a
// stray click would leave sudo hanging with no visible cause.
PolkitPromptContent {
id: content
anchors.horizontalCenter: parent.horizontalCenter
y: Math.max(32, Math.round(parent.height / 3 - content.dialogHeight / 2))
width: 520
// Deliberately the polkit dialog's own content component: this is a
// password prompt with the same shape, and keeping one means a
// restyle of PolkitPanel covers both. `identities` stays empty —
// sudo offers no choice of who authenticates — which hides the
// picker and the "AS" line on its own.
message: "Authentication is required to run a command as another user"
actionId: "sudo"
iconName: ""
showIcon: false
identities: []
responseRequired: true
inputPrompt: root.promptText
responseVisible: false
failed: root.failed
credentialsEnabled: true
credentials: vault.entries
credentialsStatus: vault.listStatus
fetchStatus: vault.fetchStatus
onCredentialRequested: entry => vault.fetch(entry)
onPickerOpened: {
if (vault.entries.length === 0)
vault.refresh();
}
onSubmitted: value => root.submit(value)
onCancelled: root.dismiss()
}
onVisibleChanged: {
if (win.visible) {
content.clearResponse();
content.focusInput();
}
}
}
}
@@ -0,0 +1,162 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
import qs.HyprChrome.Widgets.Bar.Vitals
// Claude subscription limits on the rail: the 5-hour session window and the
// weekly one, plus any per-model weekly caps the plan reports.
BarPanel {
id: claude
// Overridable so the headless render can stage it without the network.
property var fiveHour: usage.fiveHour
property var sevenDay: usage.sevenDay
property var extra: usage.extra
property string error: usage.error
property string shortError: usage.shortError
property bool ready: usage.ready
readonly property var usage: ClaudeState {}
panelId: "CLD"
title: "CLAUDE"
meta: claude.error !== "" ? (claude.ready ? "STALE" : "OFFLINE") : claude.ready ? "LIMITS" : "PRIMING"
// Ticks the reset countdowns without re-polling.
property date now: new Date()
Timer {
interval: 30000
running: true
repeat: true
onTriggered: claude.now = new Date()
}
implicitWidth: claude.expanded
? Math.max(claude.headerMinWidth, claude.padding * 2 + body.width)
: Math.max(claude.headerMinWidth, claude.briefLeft + brief.implicitWidth + claude.padding)
function fraction(w) {
return w ? Math.max(0, Math.min(1, w.utilization / 100)) : 0;
}
function pct(w) {
return w ? Math.round(w.utilization) + "%" : "--";
}
function until(w) {
if (!w || !w.resets_at)
return "";
const mins = Math.max(0, Math.round((new Date(w.resets_at) - claude.now) / 60000));
if (mins >= 1440)
return `${Math.floor(mins / 1440)}D ${Math.floor(mins % 1440 / 60)}H`;
if (mins >= 60)
return `${Math.floor(mins / 60)}H ${mins % 60}M`;
return `${mins}M`;
}
function tone(w) {
const f = claude.fraction(w);
return !claude.ready ? Theme.disabled : f >= 0.85 ? Theme.hot : Theme.text;
}
summary: Row {
id: brief
spacing: 10
Repeater {
model: [
{ label: "5H", window: claude.fiveHour },
{ label: "7D", window: claude.sevenDay }
]
Row {
required property var modelData
spacing: 4
anchors.verticalCenter: parent.verticalCenter
// Dashes say nothing; with no numbers yet the error label stands alone.
visible: claude.ready || claude.shortError === ""
Text {
anchors.verticalCenter: parent.verticalCenter
text: parent.modelData.label
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 10
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: claude.pct(parent.modelData.window)
color: claude.tone(parent.modelData.window)
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
}
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
visible: claude.shortError !== ""
text: claude.shortError
color: Theme.hot
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
}
}
Column {
id: body
width: 260
spacing: 5
Repeater {
model: [
{ label: "SESSION", window: claude.fiveHour },
{ label: "WEEKLY", window: claude.sevenDay }
].concat(claude.extra)
Column {
required property var modelData
width: body.width
spacing: 2
VitalRow {
width: parent.width
labelWidth: 64
label: parent.modelData.label
value: claude.fraction(parent.modelData.window)
readout: claude.pct(parent.modelData.window)
ready: claude.ready && !!parent.modelData.window
}
Text {
x: 64
visible: text !== ""
text: {
const t = claude.until(parent.modelData.window);
return t ? `RESETS IN ${t}` : "";
}
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
}
}
}
Text {
width: body.width
visible: claude.error !== ""
text: claude.error.toUpperCase()
color: Theme.hot
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
wrapMode: Text.WordWrap
}
}
}
@@ -0,0 +1,82 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell.Io
// Claude subscription limits, polled through `claude-usage` (pkgs/claude-usage.nix),
// which reuses Claude Code's OAuth login and prints the usage endpoint's JSON.
QtObject {
id: root
// Each window is { utilization: 0..100, resets_at: ISO string } or null.
property var fiveHour: null
property var sevenDay: null
// Per-model weekly windows the plan reports, as [{ label, window }].
property var extra: []
property string error: ""
property bool ready: false
// The endpoint is rate-limited and the numbers move slowly; a failure
// retries sooner so the panel recovers once Claude Code renews the token.
property int interval: root.error !== "" ? 60000 : 300000
// Collapsed-rail label for the current error.
readonly property string shortError: {
if (root.error === "")
return "";
return /refresh|401|not logged in|no refresh token/.test(root.error) ? "EXPIRED" : "ERR";
}
readonly property var proc: Process {
id: proc
command: ["claude-usage"]
stdout: StdioCollector {
onStreamFinished: root.ingest(this.text)
}
}
readonly property var poll: Timer {
interval: root.interval
running: true
repeat: true
triggeredOnStart: true
onTriggered: {
if (!proc.running)
proc.running = true;
}
}
function fail(message: string): void {
console.warn(`claude-usage: ${message}`);
root.error = message;
}
function ingest(text: string): void {
let msg;
try {
msg = JSON.parse(text);
} catch (e) {
root.fail("no output");
return;
}
if (msg.error) {
// Keep the last good numbers; a failed poll is not zero usage.
root.fail(msg.error);
return;
}
root.error = "";
root.fiveHour = msg.five_hour ?? null;
root.sevenDay = msg.seven_day ?? null;
const found = [];
for (const key of Object.keys(msg)) {
const m = key.match(/^seven_day_(\w+)$/);
const w = msg[key];
if (m && w && typeof w.utilization === "number")
found.push({ label: m[1].toUpperCase().replace(/_/g, " "), window: w });
}
root.extra = found;
root.ready = true;
}
}
@@ -0,0 +1,39 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
// Staging widget for the debug window: a BarPanel carrying filler copy in both
// of the panel's densities — the full block when expanded, one elided line when
// collapsed. Both read the same `text`, so the two modes cannot disagree.
//
// Give it a width; the height follows whichever body is showing.
BarPanel {
id: lorem
property string text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum."
title: "LOREM IPSUM"
// Collapsed: one line, cut off where the panel ends.
summary: Text {
width: parent.width
text: lorem.text
color: Theme.muted
font.family: Theme.displayFont
font.pixelSize: 12
maximumLineCount: 1
elide: Text.ElideRight
}
// Expanded: the whole thing, wrapped.
Text {
width: parent.width
text: lorem.text
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 12
wrapMode: Text.WordWrap
}
}
@@ -0,0 +1,69 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
// Staging slot for whatever is being worked on, sized to itself so it can be
// dropped anywhere in the rail without a width. It counts seconds since the
// shell loaded, which is the cheapest thing that proves the panel is live and
// not a still frame — a reload visibly restarts it.
//
// It also stands ALONE between two spacers, so it is the pair of caps and
// traces that a rail of butted panels never exercises: a right cap joining the
// next panel's left cap across a gap, twice over.
BarPanel {
id: test
panelId: "TST"
title: "TEST"
meta: "STAGE"
property int seconds: 0
// Sized to its content, like the tray: a staging panel has no business
// reserving a share of the rail.
implicitWidth: Math.max(test.headerMinWidth,
test.briefLeft + brief.implicitWidth + test.padding,
test.padding * 2 + body.implicitWidth)
Timer {
interval: 1000
running: true
repeat: true
onTriggered: test.seconds++
}
summary: Text {
id: brief
text: "T+" + test.seconds
color: Theme.accent
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
}
Column {
id: body
spacing: 2
Text {
text: "T+" + test.seconds
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 17
font.bold: true
font.letterSpacing: 1
}
Text {
text: "SECONDS SINCE LOAD"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.4
}
}
}
@@ -0,0 +1,266 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Io
import QtQuick
import QtQuick.Layouts
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
// Host identity in the hyprchrome panel chrome: the machine's name set large,
// with its timezone and the current date and time.
//
// Expanded: name on the left, clock stack on the right.
// Collapsed: name, time and zone abbreviation on the header line.
//
// The name and the zone come from one shell call at startup — neither changes
// while the shell runs, so there is nothing to poll. The clock is a plain
// Timer; `now` is the single source both densities read, so they always agree
// down to the second.
BarPanel {
id: panel
panelId: "HST"
title: "HOST"
meta: panel.zoneAbbrev
property string hostName: "LOCAL"
property string zoneName: "" // IANA, e.g. EUROPE/BERLIN
property string userName: "" // whoever is logged in, e.g. DARMAN
property string localIp: "" // interface holding the default route
property string tailnetIp: "" // tailscale0, when the tailnet is up
property date now: new Date()
// Qt resolves the abbreviation ("CEST") against the same zone the offset
// comes from, so the two can never disagree.
readonly property string zoneAbbrev: Qt.formatDateTime(panel.now, "t")
readonly property string utcOffset: {
const hours = -panel.now.getTimezoneOffset() / 60;
return "UTC" + (hours >= 0 ? "+" : "") + (Number.isInteger(hours) ? hours : hours.toFixed(1));
}
function two(value) {
return value < 10 ? "0" + value : String(value);
}
function timeText(value) {
return panel.two(value.getHours()) + ":" + panel.two(value.getMinutes()) + ":" + panel.two(value.getSeconds());
}
function dateText(value) {
const days = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
const months = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
return days[value.getDay()] + " // " + panel.two(value.getDate()) + " " + months[value.getMonth()] + " " + value.getFullYear();
}
Timer {
interval: 1000
running: true
repeat: true
triggeredOnStart: true
onTriggered: panel.now = new Date()
}
Process {
running: true
// /etc/localtime is a symlink into the zoneinfo tree; its tail is the
// IANA name, which no environment variable reliably carries.
command: ["sh", "-c", "cat /proc/sys/kernel/hostname; readlink -f /etc/localtime; id -un"]
stdout: StdioCollector {
onStreamFinished: {
const lines = this.text.trim().split("\n");
if (lines.length > 0 && lines[0].trim().length > 0)
panel.hostName = lines[0].trim().toUpperCase();
if (lines.length > 1) {
const zone = lines[1].match(/zoneinfo\/(.+)$/);
if (zone)
panel.zoneName = zone[1].toUpperCase();
}
if (lines.length > 2 && lines[2].trim().length > 0)
panel.userName = lines[2].trim().toUpperCase();
}
}
}
// Addresses, unlike the name and the zone, can change under a running
// shell — a lease renewal, `tailscale up`/`down` — so this one polls.
//
// The local address is taken from the interface carrying the default
// route, with tailscale0 excluded: as an exit node it holds the default
// route itself, and the panel would then show the tailnet address twice.
Process {
id: addresses
command: ["sh", "-c",
"dev=$(ip -4 route show default | grep -v tailscale0 | awk '{print $5; exit}');"
+ " ip -4 -o addr show dev \"$dev\" scope global 2>/dev/null | awk '{split($4,a,\"/\"); print a[1]; exit}';"
+ " ip -4 -o addr show dev tailscale0 scope global 2>/dev/null | awk '{split($4,a,\"/\"); print a[1]; exit}'"]
stdout: StdioCollector {
onStreamFinished: {
const lines = this.text.trim().split("\n");
panel.localIp = lines.length > 0 ? lines[0].trim() : "";
panel.tailnetIp = lines.length > 1 ? lines[1].trim() : "";
}
}
}
Timer {
interval: 30000
running: true
repeat: true
triggeredOnStart: true
onTriggered: {
if (!addresses.running)
addresses.running = true;
}
}
// Collapsed: who and when, nothing else.
summary: Row {
spacing: 10
Text {
id: hostLabel
text: panel.hostName
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
font.letterSpacing: 1.2
}
// The pieces are set at two sizes. A Row positions its children at the
// top and has no item alignment of its own (that is Grid), and a
// vertical anchor inside a positioner is ignored — so the smaller
// pieces take the tallest one's height and centre their text in it.
Text {
text: panel.timeText(panel.now)
color: Theme.accent
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
height: hostLabel.implicitHeight
verticalAlignment: Text.AlignVCenter
}
Text {
text: panel.dateText(panel.now)
color: Theme.text
font.family: Theme.microFont
font.pixelSize: 11
height: hostLabel.implicitHeight
verticalAlignment: Text.AlignVCenter
}
Text {
text: panel.zoneAbbrev
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 11
height: hostLabel.implicitHeight
verticalAlignment: Text.AlignVCenter
}
}
// Expanded: name left, clock stack right.
RowLayout {
width: parent.width
// No explicit height: a third line in the identity column has to grow
// the panel, and BarPanel measures the body to decide how tall it is.
spacing: 16
Column {
Layout.fillWidth: true
Layout.fillHeight: true
Text {
id: hostText
text: panel.hostName
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 25
font.bold: true
font.letterSpacing: 2
elide: Text.ElideRight
}
Text {
text: (panel.userName || "NODE") + " // " + (panel.zoneName || "LOCAL")
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.4
elide: Text.ElideRight
}
Text {
text: (panel.localIp || "--") + " // " + (panel.tailnetIp || "NO TAILNET")
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.4
elide: Text.ElideRight
}
}
// Rule between identity and clock, the same hairline the dense bar
// puts between its host name and node readout.
Rectangle {
// The layout owns x/y/width/height: the 8px inset that was
// `height: parent.height - 8` becomes margins, and a bare `width: 2`
// would be overridden.
Layout.preferredWidth: 2
Layout.fillHeight: true
Layout.topMargin: 4
Layout.bottomMargin: 4
color: Theme.hair
}
Column {
id: clock
// Both columns share the width evenly, as before. `width: 210` here was
// dead — a layout assigns width — and `Layout.alignment` is ignored
// while an item fills.
Layout.fillWidth: true
Layout.fillHeight: true
spacing: 2
Text {
width: parent.width
text: panel.timeText(panel.now)
horizontalAlignment: Text.AlignRight
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 18
font.bold: true
font.letterSpacing: 1
}
Text {
width: parent.width
text: panel.dateText(panel.now)
horizontalAlignment: Text.AlignRight
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 11
}
Text {
width: parent.width
text: panel.zoneAbbrev + " // " + panel.utcOffset
horizontalAlignment: Text.AlignRight
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 0.7
}
}
}
}
@@ -0,0 +1,275 @@
import QtQuick
import QtQuick.Shapes
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Luna
import qs.HyprChrome.Widgets.Bar.Claude
import qs.HyprChrome.Widgets.Bar.Host
import qs.HyprChrome.Widgets.Bar.Vitals
import qs.HyprChrome.Widgets.Bar.Workspaces
import qs.HyprChrome.Widgets.Bar.Tray
// The dense status rail itself: one layer surface holding the panel row.
//
// It owns nothing shared — the screen, the density and its layer all arrive
// from HyprChromeShell, which is also what keeps this surface and the backdrop
// one layer apart. What it does own is its own measurement: `contentHeight` is
// the settled height of the current density, which the shell hands to the
// backdrop and which sizes the exclusive zone.
PanelWindow {
id: window
// Density for every panel on the rail; driven by the shell.
property bool expanded: false
// Which layer to sit on. An int rather than a private decision: it is half
// of a pair with the backdrop's, so the shell derives both. See
// HyprChromeShell.
property int wlrLayer: WlrLayer.Overlay
// Whether the rail should hold the keyboard, so ESC can close it. Driven by
// the shell rather than derived from `expanded`, because the rail is not the
// only thing that wants the keyboard: while a polkit prompt is up the shell
// withholds this, so ESC reaches the DIALOG and dismisses that instead.
// Once the prompt is gone the rail gets the keyboard back and a second ESC
// closes the rail — one key, one thing at a time, innermost first.
property bool grabsKeyboard: false
// EXCLUSIVE rather than OnDemand: OnDemand only offers focus to a surface
// the user clicks, and the whole point here is to answer a keypress the
// user has not aimed at anything. Taking the keyboard is defensible because
// an expanded rail is already a modal-ish state — it dims the desktop
// behind itself with the same scrim the prompt uses.
WlrLayershell.keyboardFocus: window.grabsKeyboard
? WlrKeyboardFocus.Exclusive
: WlrKeyboardFocus.None
signal dismissed
// A layer surface only delivers keys to an item that has active focus, and
// nothing in the rail wants focus for its own sake — the panels are
// readouts. So one focus sink covers the whole surface. It re-takes focus
// whenever the grab is handed back, since losing the surface's focus drops
// the item's too.
Item {
id: keySink
anchors.fill: parent
focus: true
Keys.onEscapePressed: event => {
window.dismissed();
event.accepted = true;
}
Connections {
target: window
function onGrabsKeyboardChanged() {
if (window.grabsKeyboard)
keySink.forceActiveFocus();
}
}
}
// Own namespace so a layerrule can exempt the rail from Hyprland's layer
// animation without also catching the launchers, which share the default
// "quickshell" namespace and do want their fade.
WlrLayershell.namespace: "hyprchrome-bar"
WlrLayershell.layer: window.wlrLayer
property int margin: 12
// The surface never resizes: it is always tall enough for the expanded
// rail, and only the exclusive zone tracks the current state. Resizing a
// layer surface makes Hyprland animate the change, which showed up as the
// panels twitching a pixel or two the moment the collapse finished.
//
// The zone still follows the target height, so tiled windows reflow once
// per toggle, at the start, and slide while the panels animate.
readonly property real expandedContent: Math.max(hostPanel.expandedHeight, workspacesPanel.expandedHeight, vitalsPanel.expandedHeight, lunaPanel.expandedHeight, claudePanel.expandedHeight, trayPanel.expandedHeight) + window.margin * 2
readonly property real contentHeight: Math.max(hostPanel.targetHeight, workspacesPanel.targetHeight, vitalsPanel.targetHeight, lunaPanel.targetHeight, claudePanel.targetHeight, trayPanel.targetHeight) + window.margin * 2
implicitHeight: Math.round(window.expandedContent)
exclusionMode: ExclusionMode.Normal
exclusiveZone: Math.round(window.contentHeight)
// Only the panels take input. Without this the surface would keep eating
// clicks across its full height while the rail is collapsed.
mask: Region {
item: panelRow
}
anchors { top: true; left: true; right: true; }
color: "transparent"
RowLayout {
id: panelRow
x: window.margin
y: window.margin
width: window.width - window.margin * 2
spacing: 0
HostPanel {
id: hostPanel
expanded: window.expanded
// Workspaces butt against its right edge; the left end of the row is free.
rightChamfer: false
toggleOnClick: false
Layout.preferredWidth: 400
Layout.fillHeight: true
}
WorkspacesPanel {
id: workspacesPanel
expanded: window.expanded
// Mid-rail: a panel on either side, so neither corner is cut.
leftChamfer: false
rightChamfer: false
toggleOnClick: false
// No preferred width: the panel sizes itself to however many outputs
// the session has, the same way the tray sizes itself to its items.
Layout.fillHeight: true
}
VitalsPanel {
id: vitalsPanel
expanded: window.expanded
// Workspaces on the left, the spacer on the right — and a spacer is not
// a panel, so that edge keeps its cut.
leftChamfer: false
toggleOnClick: false
Layout.preferredWidth: 500
Layout.fillHeight: true
}
// Slack on both sides of the staging panel, so it floats between the left
// group and the tray rather than butting against either. Two spacers is
// also what puts a gap on both of its sides, which is what gives it a cap
// and a trace at each end.
Item { Layout.fillWidth: true }
LunaPanel {
id: lunaPanel
expanded: window.expanded
// Claude butts against its right edge.
rightChamfer: false
toggleOnClick: false
Layout.fillHeight: true
}
ClaudePanel {
id: claudePanel
expanded: window.expanded
leftChamfer: false
toggleOnClick: false
Layout.fillHeight: true
}
Item { Layout.fillWidth: true }
TrayPanel {
id: trayPanel
expanded: window.expanded
toggleOnClick: false
Layout.fillHeight: true
}
}
// Traces between the panels' caps. They live here rather than in BarPanel
// because the run they draw is the gap BETWEEN two panels, which is the one
// piece of this geometry no panel can see. Laid over the row, in the row's
// own coordinates, so a panel's x is directly usable.
Item {
id: traces
x: panelRow.x
y: panelRow.y
width: panelRow.width
height: panelRow.height
// Consecutive PANELS, with the spacers dropped — a spacer has no caps, so
// it is not something a trace can start or end at, and skipping it is
// exactly what makes the trace span it. `rightChamfer` is the tell: an
// Item put in the row for slack has no such property.
readonly property var pairs: {
const panels = [];
for (let i = 0; i < panelRow.children.length; i++) {
const child = panelRow.children[i];
if (child.rightChamfer !== undefined)
panels.push(child);
}
// A cap only exists on an open chamfer, so a pair that has both is
// exactly a pair with something to join.
const found = [];
for (let i = 0; i + 1 < panels.length; i++) {
if (panels[i].rightChamfer && panels[i + 1].leftChamfer)
found.push({ from: panels[i], to: panels[i + 1] });
}
return found;
}
Repeater {
model: traces.pairs
CapTrace {
anchors.fill: parent
}
}
}
// One run: out of a panel's top-right cap, along the top, one 45° step down
// at the midpoint of the gap, then along the bottom into the next panel's
// bottom-left cap. 45° means the step is as wide as it is tall, so the run
// IS the drop — clamped if the gap is too narrow to fit it, which is the
// only case where the angle gives.
component CapTrace: Item {
id: trace
required property var modelData
property int lineWidth: 3
readonly property real fromX: trace.modelData.from.x + trace.modelData.from.rightCapX
readonly property real fromY: trace.modelData.from.y + trace.modelData.from.rightCapY
readonly property real toX: trace.modelData.to.x + trace.modelData.to.leftCapX
readonly property real toY: trace.modelData.to.y + trace.modelData.to.leftCapY
readonly property real drop: trace.toY - trace.fromY
readonly property real gap: trace.toX - trace.fromX
readonly property real step: Math.max(0, Math.min(Math.abs(trace.drop), trace.gap))
readonly property real mid: (trace.fromX + trace.toX) / 2
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: "transparent"
strokeColor: Theme.accent
// Nothing to draw while the panels overlap, which they do for a frame
// or two while the row is still laying itself out.
strokeWidth: trace.gap > 0 ? trace.lineWidth : 0
startX: trace.fromX; startY: trace.fromY
PathLine { x: trace.mid - trace.step / 2; y: trace.fromY }
PathLine { x: trace.mid + trace.step / 2; y: trace.toY }
PathLine { x: trace.toX; y: trace.toY }
}
}
}
}
@@ -0,0 +1,199 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
// luna's voice loop on the rail (services/desktop/luna-voice.nix).
//
// Always present, unlike the daemon it watches: the panel is where you look
// to find out whether she is listening, so it has to be there when the answer
// is "no" — including when luna-voiced is not running at all. SUPER+V toggles
// LISTENING, not this.
//
// Collapsed it is the state and nothing else, because that is the one fact
// worth a glance; expanded it carries the last exchange, which is the thing
// you actually want during the seconds her reply takes to arrive.
BarPanel {
id: luna
// Overridable so the headless render can stage every state without a
// daemon; in the rail they track the socket below.
property string daemonState: state.state
property bool active: state.active
property bool connected: state.connected
property real rms: state.rms
property string userText: state.userText
property string lunaText: state.lunaText
// Instantiated here rather than in the shell: the panel is the only
// reader, and it is a second reader that would make this shell state.
readonly property var state: LunaState {}
panelId: "LUN"
title: "LUNA"
meta: luna.active ? "MIC ON" : "MIC OFF"
// Sized to content like the tray, and per DENSITY: collapsed it is one
// word, so reserving the expanded body's width would leave the rail
// carrying a mostly empty panel for the state it spends most of its time
// in. It floats between two spacers, so the width change costs no other
// panel anything.
implicitWidth: luna.expanded
? Math.max(luna.headerMinWidth, luna.padding * 2 + body.implicitWidth)
: Math.max(luna.headerMinWidth, luna.briefLeft + brief.implicitWidth + luna.padding)
readonly property color stateColor: {
if (!luna.connected)
return Theme.disabled;
switch (luna.daemonState) {
case "listening":
return Theme.accent;
case "thinking":
return Theme.muted;
case "speaking":
return Theme.accentSoft;
default:
return luna.active ? Theme.text : Theme.raised;
}
}
readonly property string stateLabel: {
if (!luna.connected)
return "OFFLINE";
// Her own state first: a muted mic no longer stops her answering.
switch (luna.daemonState) {
case "listening":
return "LISTENING";
case "thinking":
return "THINKING";
case "speaking":
return "SPEAKING";
default:
return luna.active ? "READY" : "MUTED";
}
}
summary: Row {
id: brief
spacing: 6
// Breathes only while the mic is open, so "she is listening to me
// right now" is legible without reading the word next to it.
Rectangle {
width: 7
height: 7
radius: 4
anchors.verticalCenter: parent.verticalCenter
color: luna.stateColor
SequentialAnimation on opacity {
running: luna.daemonState === "listening"
loops: Animation.Infinite
alwaysRunToEnd: true
NumberAnimation { to: 0.25; duration: 700; easing.type: Easing.InOutQuad }
NumberAnimation { to: 1.0; duration: 700; easing.type: Easing.InOutQuad }
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: luna.stateLabel
color: luna.stateColor
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
}
}
Column {
id: body
spacing: 6
// Level meter: live whenever voice mode is on, not only once a
// trigger has fired, so a mic too quiet to reach the threshold still
// shows movement instead of looking broken.
Row {
id: meter
width: 260
height: 18
spacing: 2
readonly property int count: 28
readonly property bool sweeping: luna.daemonState === "thinking"
property real phase: 0
NumberAnimation on phase {
running: meter.sweeping
loops: Animation.Infinite
from: 0
to: 1
duration: 1200
}
Repeater {
model: meter.count
Rectangle {
required property int index
width: (meter.width - (meter.count - 1) * meter.spacing) / meter.count
height: {
if (meter.sweeping) {
const pos = index / (meter.count - 1);
return 2 + 14 * Math.max(0, 1 - Math.abs(pos - meter.phase) * 6);
}
if (!luna.active && luna.daemonState !== "speaking")
return 2;
// sqrt opens up the quiet end, which on this mic is
// where all of the speech actually sits.
const level = Math.min(1, Math.sqrt(luna.rms) * 6.0);
const centre = 1 - Math.abs(index / (meter.count - 1) - 0.5) * 1.6;
return 2 + 16 * level * Math.max(0.15, centre);
}
anchors.bottom: parent.bottom
color: luna.stateColor
opacity: meter.sweeping ? 0.9 : 0.5 + 0.5 * (height / 18)
Behavior on height {
enabled: !meter.sweeping
NumberAnimation { duration: 70; easing.type: Easing.OutQuad }
}
}
}
}
Text {
width: 260
visible: luna.userText !== ""
text: `> ${luna.userText}`
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 10
wrapMode: Text.WordWrap
maximumLineCount: 2
elide: Text.ElideRight
}
Text {
width: 260
visible: luna.lunaText !== ""
text: luna.lunaText
color: Theme.text
font.family: Theme.microFont
font.pixelSize: 11
wrapMode: Text.WordWrap
maximumLineCount: 4
elide: Text.ElideRight
}
Text {
visible: luna.userText === "" && luna.lunaText === ""
text: luna.connected ? "SUPER+V TO TALK" : "DAEMON NOT RUNNING"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.4
}
}
}
@@ -0,0 +1,112 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
// Everything the Luna surfaces know, read off luna-voiced's unix socket
// (services/desktop/luna-voice.nix).
//
// Read-only on purpose: the key that toggles voice mode runs `luna-voice
// toggle` from Hyprland rather than writing here, so the toggle keeps working
// while the shell is reloading — and a QML error can never leave the mic on
// with nothing showing it.
//
// The daemon is a USER service that may start after the shell, restart under
// it, or not be installed at all, so a missing socket is a normal state and
// not an error: `reconnect` retries quietly and `connected` is what the
// widget shows.
QtObject {
id: root
// "idle" | "listening" | "thinking" | "speaking"
property string state: "idle"
// Whether the mic is open. She still answers and speaks while it is not.
property bool active: false
// Set by the first line, not by the process starting: the daemon replays
// its state on connect, so only a live connection produces one.
property bool connected: false
// Mic level while listening, her output level while speaking. Drives the
// only genuinely live part of the visuals.
property real rms: 0
property string userText: ""
property string lunaText: ""
property string error: ""
// `luna-voice watch`, not Quickshell's Socket: a Socket whose connect
// fails once (daemon mid-restart) keeps the dead QLocalSocket and ignores
// every later `connected = true`, so the widget stuck on OFFLINE.
readonly property var watch: Process {
id: watch
command: ["luna-voice", "watch"]
running: true
stdout: SplitParser {
splitMarker: "\n"
onRead: line => {
root.connected = true;
root.ingest(line);
}
}
onExited: {
// A daemon that went away is not a daemon that is idle: reset
// rather than leave the last frame of a conversation frozen
// on screen.
root.connected = false;
root.active = false;
root.state = "idle";
root.rms = 0;
}
}
// Retry forever, cheaply; each attempt is a fresh connection.
readonly property var reconnect: Timer {
interval: 2000
running: !watch.running
repeat: true
onTriggered: watch.running = true
}
function ingest(line: string): void {
let msg;
try {
msg = JSON.parse(line);
} catch (e) {
return; // a half-written line is not worth a console error
}
switch (msg.type) {
case "mode":
root.active = msg.active;
if (!msg.active) {
root.state = "idle";
root.rms = 0;
}
break;
case "state":
root.state = msg.value;
// Level is only meaningful during the phase that produces it.
if (msg.value !== "listening" && msg.value !== "speaking")
root.rms = 0;
break;
case "amplitude":
root.rms = msg.rms;
break;
case "caption":
if (msg.speaker === "user") {
// A new user caption starts a turn, so it is what clears her
// last reply — NOT speech_start, which arrives after her
// first caption, not before it.
root.userText = msg.text;
root.lunaText = "";
} else {
root.lunaText = msg.text;
}
break;
case "error":
root.error = msg.message;
break;
}
}
}
@@ -0,0 +1,469 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import qs.HyprChrome.Theme
// Chamfered panel chrome for the dense status rail: outline, corner accent
// lines, header strip (id chip / title / meta / tick marks) and a collapsing
// body.
//
// The body holds TWO renderings of the same data: the default children are the
// expanded detail view, `summary` the terse one shown while collapsed. Both
// stay instantiated and bound to the same sources — two renderings of one
// truth, not two truths — and the panel cross-fades between them while its
// height animates to whichever is showing.
//
// BarPanel {
// panelId: "02"
// summary: Text { text: "CPU 43%" }
// MetricRow { /* the full view */ }
// }
//
// Expanded, the detail view sits under the header rule. Collapsed, the summary
// moves up ONTO the header line, starting just right of the slug chip and
// centred in the strip, so the whole panel becomes a single line. The slug
// in both modes; title, meta and tick deco fade out with the detail body.
//
// Each slot keeps its own fixed geometry — only the panel's height animates,
// and the body is clipped — so neither rendering reflows while the other one
// is fading. Slot children are measured (`childrenRect`), so they must carry
// their own size and must NOT anchor to the slot.
//
// Colors and fonts both come from the Theme singleton.
Item {
id: panel
property string panelId: ""
property string title: ""
property string meta: ""
property bool expanded: true
property int chamfer: 13
property int offsetY: 2
property int accentLineThickness: 3
readonly property int headerHeight: 28
// Breathing room between the header rule and the detail view. The
// collapsed summary is unaffected — it sits on the header line itself.
property int headerGap: 8
// Left offset of the header row, and the inset the upper-left accent line
// is sized against.
readonly property int headerPadding: 8
// Upper-left accent line, sized to the slug chip it underlines. Lives on
// the panel rather than on the ShapePath: a PathLine does not see its
// ShapePath's own properties by bare name (they resolve through the
// component scope, not the parent object).
// Unclamped: what the header chrome WANTS to span. Everything that has to
// stay independent of the panel's final width reads this one — a width
// that clamps against panel.width cannot also decide it.
readonly property real headerContentWidth: slugChip.width + panel.headerPadding * 2
readonly property real accentLineWidth: Math.min(panel.width, panel.headerContentWidth)
// Narrowest the panel can be before the title runs into the meta text and
// tick deco. A panel that sizes itself to its content (the tray) has to
// take this as a floor; none of it depends on panel.width, so it can.
readonly property real headerMinWidth: panel.headerContentWidth + panelTitle.width
+ headerRow.spacing + headerEnd.width + 12 + panel.headerPadding
property int padding: 12
// Floor for the animated height, so a collapsed strip with a short (or
// empty) summary still reads as a panel rather than a hairline.
property int minimumHeight: 38
// Self-toggling is a convenience for staging a panel on its own. A host
// that drives `expanded` for a whole group turns it off: assigning to a
// bound property from a click would destroy that binding for good.
property bool toggleOnClick: true
default property alias content: detail.data
property alias summary: brief.data
// Where the summary sits when collapsed: just past the slug chip, and
// centred in the strip the panel collapses to, which is sized to the
// summary itself (or the height floor, whichever is taller).
readonly property real briefLeft: panel.headerContentWidth + 6
readonly property real collapsedHeight: Math.max(panel.minimumHeight, brief.height + panel.headerPadding * 2)
readonly property real briefTop: Math.round((panel.collapsedHeight - brief.height) / 2)
// Bottom of the visible body, and the gap kept below it. The states bind
// these to whichever rendering is showing and the transitions animate them,
// so they are plain properties rather than ternaries on implicitHeight —
// an animation cannot drive a binding.
property real bodyBottom: detail.y + detail.height
property real bodyEndPadding: panel.padding
// Rounded: bodyBottom and bodyEndPadding are animated reals, so the sum
// spends the tail of every transition on a fraction. A layout rounds that
// UP, then drops a pixel the moment the animation lands on its exact
// value — a 1px hop after the motion has visibly finished.
implicitHeight: Math.round(Math.max(panel.minimumHeight, panel.bodyBottom + panel.bodyEndPadding))
// Where the panel settles in each state, skipping the values the transition
// passes through: a host sizes its surface and its exclusive zone from these
// rather than from the animated height, so the desktop is relaid out once per
// toggle instead of once per animation frame.
// Height of the expanded body regardless of the current state — what a
// host needs to size a surface that must not resize when panels collapse.
readonly property real expandedHeight: Math.round(Math.max(panel.minimumHeight,
detail.y + detail.height + panel.padding))
readonly property real targetHeight: panel.expanded
? panel.expandedHeight
: Math.round(Math.max(panel.minimumHeight, panel.collapsedHeight))
// The two chamfer cuts (top-right at y=chamfer, bottom-left at
// height-chamfer) cross once the panel is shorter than twice the chamfer,
// which turns the outline inside out for the last frames of a collapse.
readonly property real activeChamfer: Math.max(2, Math.min(panel.chamfer, panel.height / 2 - 1))
// The silhouette has exactly two cut corners: top-right and bottom-left.
// Turn one off where another panel butts against that side, so a row laid
// out with no spacing reads as one continuous strip instead of a line of
// separate tiles. A cut corner costs its side nothing when disabled — the
// edge simply runs square into the neighbour.
property bool rightChamfer: true // top-right cut
property bool leftChamfer: true // bottom-left cut
readonly property real rightCut: panel.rightChamfer ? panel.activeChamfer : 0
readonly property real leftCut: panel.leftChamfer ? panel.activeChamfer : 0
// The seam where two panels meet is drawn a step heavier and in accent, so
// a chamfer-less join reads as a deliberate connector rather than as two
// outlines that happen to touch.
property int outlineWidth: 1
readonly property int connectorWidth: panel.outlineWidth + 2
// A cut corner has nothing butting against it, so it gets capped: the very
// corner the chamfer removed, put back OUTSIDE the panel as a detached
// accent triangle. Its hypotenuse faces the cut and its right angle points
// away, so the cap and the notch read as two halves of one corner.
//
// Nothing guards these — a chamfer that is off measures zero, which
// collapses its triangle to no area at all, so one piece of geometry covers
// both cases.
//
// capGap is the perpendicular distance from the chamfer, which is why the
// per-axis shift is it over root 2 rather than the gap itself: the cap
// moves along the cut's normal, not along an axis.
property real capGap: 4
readonly property real capOffset: panel.capGap / Math.SQRT2
// Where a trace attaches: the MIDDLE of the cap's outward-facing edge — the
// vertical one, since a trace arrives horizontally — rather than the tip,
// so the line meets the triangle's face instead of clipping its corner.
// That edge runs from the cut's end to the corner, so its midpoint is the
// half-way point between them, carried out by the same offset as the cap.
//
// The RAIL draws those traces, between one panel's right cap and the next
// panel's left cap, because the run between two panels is the one piece of
// this that no panel can see. All a panel owes it is where its own caps
// ended up.
readonly property real rightCapX: panel.width + panel.capOffset
readonly property real rightCapY: (panel.offsetY + panel.activeChamfer) / 2 - panel.capOffset
readonly property real leftCapX: -panel.capOffset
readonly property real leftCapY: panel.height - panel.activeChamfer / 2 + panel.capOffset
Shape {
id: panelShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
// Main panel shape
ShapePath {
fillColor: Theme.surface
strokeColor: Theme.hair
strokeWidth: panel.outlineWidth
startX: 0; startY: panel.offsetY
PathLine { x: panelShape.width - panel.rightCut; y: panel.offsetY }
PathLine { x: panelShape.width; y: panel.rightChamfer ? panel.activeChamfer : panel.offsetY }
PathLine { x: panelShape.width; y: panelShape.height }
PathLine { x: panel.leftCut; y: panelShape.height }
PathLine { x: 0; y: panelShape.height - panel.leftCut }
PathLine { x: 0; y: panel.offsetY }
}
// Cap on the top-right chamfer: the corner the cut removed, sitting
// just outside it. The two ends of its hypotenuse are the same points
// the outline turns on, shifted clear along the cut's normal; the third
// is the corner itself, which the outline never reaches.
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panelShape.width - panel.rightCut + panel.capOffset; startY: panel.offsetY - panel.capOffset
PathLine {
x: panelShape.width + panel.capOffset
y: (panel.rightChamfer ? panel.activeChamfer : panel.offsetY) - panel.capOffset
}
PathLine { x: panelShape.width + panel.capOffset; y: panel.offsetY - panel.capOffset }
PathLine { x: panelShape.width - panel.rightCut + panel.capOffset; y: panel.offsetY - panel.capOffset }
}
// Cap on the bottom-left chamfer, the same triangle mirrored, clearing
// the panel in the other direction.
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panel.leftCut - panel.capOffset; startY: panelShape.height + panel.capOffset
PathLine { x: -panel.capOffset; y: panelShape.height - panel.leftCut + panel.capOffset }
PathLine { x: -panel.capOffset; y: panelShape.height + panel.capOffset }
PathLine { x: panel.leftCut - panel.capOffset; y: panelShape.height + panel.capOffset }
}
// Upper left accent line
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: 0
PathLine { x: panel.accentLineWidth; y: 0 }
PathLine { x: panel.accentLineWidth; y: panel.accentLineThickness }
PathLine { x: 0; y: panel.accentLineThickness }
PathLine { x: 0; y: 0 }
}
// Lower right accent line
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panelShape.width; startY: panelShape.height
PathLine { x: panelShape.width - panel.accentLineWidth; y: panelShape.height }
PathLine { x: panelShape.width - panel.accentLineWidth; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height }
}
}
// Header
Row {
id: headerRow
x: panel.headerPadding
// Centred in the header band rather than pinned, so the chip keeps
// clear of the rule when the slug font changes size.
y: Math.round((panel.headerHeight - height) / 2)
// Puts the title where the accent line ends: chip + headerPadding on
// both sides of it.
spacing: panel.headerPadding + 6
// Header slug — the one piece that survives a collapse, so the strip
// still says which panel it is.
Rectangle {
id: slugChip
width: panelSlugText.implicitWidth + 6
height: panelSlugText.implicitHeight + 3
color: Theme.accent
Text {
id: panelSlugText
anchors.centerIn: parent
text: panel.panelId
color: Theme.surface
font.family: Theme.microFont
font.pixelSize: 11
font.bold: true
}
}
// Header title
Item {
id: panelTitle
width: panelTitleText.implicitWidth + 6
height: panelTitleText.implicitHeight + 3
Text {
id: panelTitleText
anchors.centerIn: parent
text: panel.title
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 11
font.bold: true
font.letterSpacing: 1.1
elide: Text.ElideRight
}
}
}
// Everything else in the header fades as one, so a collapse is a single
// coordinated move rather than four independently timed ones.
Item {
id: headerExtras
anchors.fill: parent
// Header separator
Rectangle {
x: 1; y: panel.headerHeight
width: parent.width - 2
height: 1
color: Theme.text
opacity: 0.12
}
// Header end deco
Row {
id: headerEnd
anchors.right: parent.right
anchors.rightMargin: 12
y: 12
spacing: 4
Text {
id: metaText
visible: panel.meta.length > 0
text: panel.meta
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.7
horizontalAlignment: Text.AlignRight
elide: Text.ElideRight
}
// Same height as the meta text, so the Row aligning both by their
// tops also aligns them by their bottoms — no wrapper needed.
Row {
spacing: 2
Repeater {
model: 5
Rectangle { required property int index; width: 4; height: metaText.implicitHeight; color: Theme.accent }
}
}
}
}
// Body. Spans the panel and clips, because mid-collapse the panel is
// already shorter than the detail view that is still fading out.
Item {
id: bodyClip
anchors.fill: parent
clip: true
Item {
id: detail
x: panel.padding
y: panel.headerHeight + panel.headerGap
width: Math.max(0, panel.width - panel.padding * 2)
height: childrenRect.height
visible: opacity > 0
}
Item {
id: brief
x: panel.briefLeft
y: panel.briefTop
width: Math.max(0, panel.width - panel.briefLeft - panel.padding)
height: childrenRect.height
opacity: 0
visible: opacity > 0
}
}
// Click anywhere on the panel to switch densities. Sits above the body, so
// interactive content in a slot would need its own handler on top of this.
MouseArea {
anchors.fill: parent
onClicked: {
if (panel.toggleOnClick)
panel.expanded = !panel.expanded;
}
}
states: [
State {
name: "expanded"
when: panel.expanded
PropertyChanges {
target: panel
bodyBottom: detail.y + detail.height
bodyEndPadding: panel.padding
}
PropertyChanges { target: detail; opacity: 1 }
PropertyChanges { target: brief; opacity: 0 }
PropertyChanges { target: panelTitle; opacity: 1 }
PropertyChanges { target: headerExtras; opacity: 1 }
},
State {
name: "collapsed"
when: !panel.expanded
// Symmetric about the slug's midline: the same gap the summary has
// above it is kept below, so the strip reads as one line.
PropertyChanges {
target: panel
bodyBottom: brief.y + brief.height
bodyEndPadding: panel.collapsedHeight - brief.y - brief.height
}
PropertyChanges { target: detail; opacity: 0 }
PropertyChanges { target: brief; opacity: 1 }
PropertyChanges { target: panelTitle; opacity: 0 }
PropertyChanges { target: headerExtras; opacity: 0 }
}
]
// Out fast, resize, in late. Fading both bodies on the same clock would
// show them at half opacity on top of each other in the middle frames.
transitions: [
Transition {
to: "collapsed"
ParallelAnimation {
NumberAnimation {
targets: [detail, panelTitle, headerExtras]
property: "opacity"
duration: 90
easing.type: Easing.OutCubic
}
NumberAnimation {
target: panel
properties: "bodyBottom,bodyEndPadding"
duration: 200
easing.type: Easing.OutCubic
}
SequentialAnimation {
PauseAnimation { duration: 110 }
NumberAnimation {
target: brief
property: "opacity"
duration: 120
easing.type: Easing.OutCubic
}
}
}
},
Transition {
to: "expanded"
ParallelAnimation {
NumberAnimation {
target: brief
property: "opacity"
duration: 90
easing.type: Easing.OutCubic
}
NumberAnimation {
target: panel
properties: "bodyBottom,bodyEndPadding"
duration: 200
easing.type: Easing.OutCubic
}
SequentialAnimation {
PauseAnimation { duration: 110 }
NumberAnimation {
targets: [detail, panelTitle, headerExtras]
property: "opacity"
duration: 120
easing.type: Easing.OutCubic
}
}
}
}
]
}
@@ -0,0 +1,72 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Services.SystemTray
import QtQuick
import QtQuick.Shapes
import qs.HyprChrome.Theme
// One tray item as a chamfered cell. Declares `modelData` required so it can be
// a Repeater delegate directly, without an Item wrapper in between.
//
// Left click activates, right click opens the item's own menu — anchored under
// the cell rather than at the window edge, since this rail sits along the top.
MouseArea {
id: cell
required property SystemTrayItem modelData
property int iconSize: 18
property int chamfer: 4
implicitWidth: cell.iconSize + 8
implicitHeight: cell.iconSize + 8
acceptedButtons: Qt.LeftButton | Qt.RightButton
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: event => {
if (event.button === Qt.LeftButton) {
cell.modelData.activate();
} else if (cell.modelData.hasMenu) {
const window = cell.QsWindow?.window;
if (window) {
const anchor = cell.mapToItem(null, 0, cell.height);
cell.modelData.display(window, anchor.x, anchor.y);
}
}
event.accepted = true;
}
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
strokeWidth: 1
strokeColor: cell.containsMouse ? Theme.accent : Theme.textAlpha(0.18)
fillColor: cell.containsMouse ? Theme.selection : Theme.textAlpha(0.06)
startX: cell.chamfer
startY: 0
PathLine { x: cell.width; y: 0 }
PathLine { x: cell.width; y: cell.height - cell.chamfer }
PathLine { x: cell.width - cell.chamfer; y: cell.height }
PathLine { x: 0; y: cell.height }
PathLine { x: 0; y: cell.chamfer }
PathLine { x: cell.chamfer; y: 0 }
Behavior on strokeColor { ColorAnimation { duration: 150 } }
}
}
Image {
anchors.centerIn: parent
source: cell.modelData.icon
width: cell.iconSize
height: cell.iconSize
fillMode: Image.PreserveAspectFit
smooth: true
}
}
@@ -0,0 +1,80 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Services.SystemTray
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
// System tray in the hyprchrome panel chrome, in both densities: the same
// items, drawn large enough to hit when expanded and shrunk onto the header
// line when collapsed.
//
// Unlike the other panels this one sizes itself horizontally — the item count
// is whatever the session happens to be running — so a layout can just give it
// `Layout.fillHeight` and let its implicit width stand.
BarPanel {
id: panel
panelId: "TRY"
title: "SYSTEM TRAY"
meta: panel.itemCount + (panel.itemCount === 1 ? " ITEM" : " ITEMS")
readonly property int itemCount: SystemTray.items.values.length
implicitWidth: Math.max(panel.headerMinWidth,
panel.briefLeft + brief.implicitWidth + panel.padding,
panel.padding * 2 + icons.implicitWidth)
// Collapsed: the same icons, small, on the header line.
summary: Row {
id: brief
spacing: 5
Repeater {
model: SystemTray.items
TrayIcon {
iconSize: 13
}
}
Text {
visible: panel.itemCount === 0
text: "NO ITEMS"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
height: 21
verticalAlignment: Text.AlignVCenter
}
}
// Expanded: full-size cells.
Row {
id: icons
spacing: 8
Repeater {
model: SystemTray.items
TrayIcon {
iconSize: 18
}
}
Text {
visible: panel.itemCount === 0
text: "NO ITEMS"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
height: 26
verticalAlignment: Text.AlignVCenter
}
}
}
@@ -0,0 +1,60 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Io
import QtQuick
// amdgpu utilisation, straight off sysfs.
//
// node_exporter's hwmon collector carries the card's temperatures, power and
// clocks — which is where VitalsData gets them — but not its busy percentage,
// so this is the one vital that cannot come from the same scrape.
//
// The card number is globbed rather than pinned: it is card1 on terra today,
// but it depends on probe order and moves when a GPU is added or removed.
Scope {
id: root
// Poll only while something is showing it, like VitalsData.
property bool active: false
property int interval: 2000
property real value: 0 // 0..1 busy
property bool ready: false
onActiveChanged: {
if (!root.active)
root.ready = false;
}
Process {
id: probe
command: ["sh", "-c", "cat /sys/class/drm/card*/device/gpu_busy_percent 2>/dev/null | head -n1"]
stdout: StdioCollector {
onStreamFinished: {
const busy = parseInt(this.text.trim(), 10);
if (isFinite(busy)) {
root.value = Math.max(0, Math.min(1, busy / 100));
root.ready = true;
} else {
// No amdgpu (or no permission) — leave the meter blank
// rather than pinning it at zero, which would read as idle.
root.ready = false;
}
}
}
}
Timer {
interval: root.interval
running: root.active
repeat: true
triggeredOnStart: true
onTriggered: {
if (!probe.running)
probe.running = true;
}
}
}
@@ -0,0 +1,40 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
// Segmented horizontal meter: a row of cells lit up to `value`.
//
// A copy of the dense bar's meter rather than a reuse of it — that one is an
// inline component inside DenseBarContent.qml and so is not visible from any
// other file (the same reason BarPanel inlines its own MicroText).
Row {
id: meter
property int segments: 16
property real value: 0 // 0..1
property bool ready: false
property real warn: 0.85 // fraction at which the lit cells go hot
readonly property real fraction: Math.max(0, Math.min(1, meter.value))
readonly property bool hot: meter.ready && meter.fraction >= meter.warn
readonly property color litColor: meter.hot ? Theme.hot : Theme.accent
spacing: 2
Repeater {
model: meter.segments
Rectangle {
required property int index
readonly property bool lit: meter.ready && index < Math.round(meter.fraction * meter.segments)
width: Math.max(2, (meter.width - (meter.segments - 1) * meter.spacing) / meter.segments)
height: meter.height
color: lit ? meter.litColor : Theme.textAlpha(0.06)
border.width: 1
border.color: lit ? meter.litColor : Theme.textAlpha(0.18)
}
}
}
@@ -0,0 +1,58 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
// One metric of the expanded vitals panel: label, meter, readout on a line.
//
// The label and readout columns are fixed so the meters of stacked rows line
// up on both edges regardless of how long any one readout gets.
Item {
id: row
property string label: ""
property real value: 0 // 0..1
property string readout: "--"
property bool ready: false
property real warn: 0.85
property int labelWidth: 52
property int readoutWidth: 46
readonly property bool hot: row.ready && row.value >= row.warn
implicitHeight: 11
Text {
anchors.verticalCenter: parent.verticalCenter
width: row.labelWidth
text: row.label
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 10
font.letterSpacing: 0.7
elide: Text.ElideRight
}
SegmentMeter {
x: row.labelWidth
anchors.verticalCenter: parent.verticalCenter
width: Math.max(0, row.width - row.labelWidth - row.readoutWidth)
height: 9
value: row.value
ready: row.ready
warn: row.warn
}
Text {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: row.readoutWidth
text: row.readout
color: row.hot ? Theme.hot : Theme.text
font.family: Theme.displayFont
font.pixelSize: 10
font.bold: true
horizontalAlignment: Text.AlignRight
}
}
@@ -0,0 +1,142 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
import qs.widgets.vitals
// Host vitals in the hyprchrome panel chrome, in both of BarPanel's densities.
//
// Expanded: CPU load and temperature, memory usage, GPU load and temperature,
// each as a segmented meter with its readout.
// Collapsed: the same five numbers as percentages behind Nerd Font glyphs.
//
// Both bodies read the same properties below, so the two densities cannot
// disagree — they are one set of numbers rendered twice.
//
// The scrape comes from the shared VitalsData (node_exporter over loopback);
// GPU busy is the one reading that scrape does not carry, so it comes off
// sysfs through GpuBusy.
BarPanel {
id: panel
panelId: "MON"
title: "RESOURCE MONITOR"
meta: vitals.failed ? "OFFLINE" : vitals.ready ? "REALTIME" : "PRIMING"
// Poll only while the panel exists on screen; both sources idle otherwise.
property bool polling: true
// Temperatures are metered against a 0–100 °C span so a bar means the same
// thing on every row.
readonly property real tempCeiling: 100
readonly property real memoryFraction: vitals.memTotal > 0 ? vitals.memUsed / vitals.memTotal : 0
readonly property bool cpuTempReady: isFinite(vitals.cpuTemp)
readonly property bool gpuTempReady: isFinite(vitals.gpuTemp)
function pct(value, ready) {
return ready ? Math.round(Math.max(0, Math.min(1, value)) * 100) + "%" : "--";
}
function tempFraction(celsius) {
return isFinite(celsius) ? Math.max(0, Math.min(1, celsius / panel.tempCeiling)) : 0;
}
VitalsData {
id: vitals
active: panel.polling
}
GpuBusy {
id: gpu
active: panel.polling
}
// Collapsed: glyph + percentage, in the same order as the rows below.
// Codepoints are Nerd Fonts v3 — oct-cpu, fa-thermometer-half,
// md-memory, md-expansion-card-variant — all present in DepartureMono.
summary: RowLayout {
spacing: 12
Item { Layout.fillWidth: true }
Readout { icon: "CPU:"; value: panel.pct(vitals.cpu, vitals.ratesReady) }
Readout { icon: "CPU Temp:"; value: vitals.fmtTemp(vitals.cpuTemp) }
Readout { icon: "Mem:"; value: panel.pct(panel.memoryFraction, vitals.ready) }
Readout { icon: "GPU:"; value: panel.pct(gpu.value, gpu.ready) }
Readout { icon: "GPU Temp:"; value: vitals.fmtTemp(vitals.gpuTemp) }
Item { Layout.fillWidth: true }
}
// Expanded: the same five, metered.
Column {
width: parent.width
spacing: 5
VitalRow {
width: parent.width
label: "CPU"
value: vitals.cpu
ready: vitals.ratesReady && !vitals.failed
readout: panel.pct(vitals.cpu, vitals.ratesReady)
}
VitalRow {
width: parent.width
label: "CPU TMP"
value: panel.tempFraction(vitals.cpuTemp)
ready: panel.cpuTempReady
readout: vitals.fmtTemp(vitals.cpuTemp)
warn: 0.85
}
VitalRow {
width: parent.width
label: "MEM"
value: panel.memoryFraction
ready: vitals.ready && !vitals.failed
readout: panel.pct(panel.memoryFraction, vitals.ready)
}
VitalRow {
width: parent.width
label: "GPU"
value: gpu.value
ready: gpu.ready
readout: panel.pct(gpu.value, gpu.ready)
}
VitalRow {
width: parent.width
label: "GPU TMP"
value: panel.tempFraction(vitals.gpuTemp)
ready: panel.gpuTempReady
readout: vitals.fmtTemp(vitals.gpuTemp)
warn: 0.85
}
}
component Readout: Row {
property string icon: ""
property string value: "--"
spacing: 4
Text {
text: parent.icon
color: Theme.accent
font.family: Theme.displayFont
font.pixelSize: 12
}
Text {
text: parent.value
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 12
font.bold: true
}
}
}
@@ -0,0 +1,237 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
// Which workspace each monitor is currently showing, in the hyprchrome panel
// chrome, in both of BarPanel's densities.
//
// One indicator in both: a box carrying the workspace's name, filled accent
// while its monitor is showing it and outlined otherwise. Collapsed, each
// output gets exactly one — the workspace it is on. Expanded, it gets the whole
// strip it cycles through, at a larger cell, with the shown one filled.
//
// Expanded, the strips line up in a column: the output name sits in a
// fixed-width cell, so the boxes start at the same x on every line regardless
// of how long a connector name is.
//
// Both densities read the same two models, so they cannot disagree. Hyprland's
// own distinction is kept: `active` is the workspace its monitor is showing
// (one per output), `focused` is the single one taking input — so the fill
// marks the shown workspace and the accent marker marks where the keyboard is.
//
// Display only: workspaces expose activate(), but BarPanel's density toggle
// covers the whole panel, so a chip could not receive the click anyway.
BarPanel {
id: panel
panelId: "WKS"
title: "WORKSPACES"
meta: panel.monitorCount + (panel.monitorCount === 1 ? " OUTPUT" : " OUTPUTS")
readonly property int monitorCount: Hyprland.monitors.values.length
// Sizes itself horizontally, like the tray: how many outputs a session has
// is not something the bar can hardcode.
implicitWidth: Math.max(panel.headerMinWidth,
panel.briefLeft + brief.implicitWidth + panel.padding,
panel.padding * 2 + outputs.implicitWidth)
// Height of one expanded output line; every cell on it centres against this.
readonly property int lineHeight: 26
// Width of the output-name cell, which is what makes the strips align.
// Fixed rather than measured: a connector name is "DP-2" or "HDMI-A-1", and
// the alternative is probing every name's rendered width to take a maximum,
// which costs a hidden Text per output to save nothing. Anything longer
// elides.
readonly property int nameWidth: 64
// What to call a workspace. Hyprland numbers them, but a named workspace
// carries its name instead and a scratchpad arrives as "special:<name>" —
// the prefix is noise once it is sitting next to a monitor's name.
function label(ws): string {
if (!ws)
return "--";
const name = ws.name ?? "";
if (name.startsWith("special:"))
return name.slice(8).toUpperCase();
return (name.length > 0 ? name : String(ws.id)).toUpperCase();
}
// The ordinary workspaces on one output, lowest id first. Specials share
// the same list under negative ids: they show up as the active workspace
// when one is open, but never as a slot in the strip, which is meant to be
// the fixed set the output cycles through.
function slots(monitor): var {
return Hyprland.workspaces.values
.filter(ws => ws.monitor === monitor && ws.id > 0)
.sort((a, b) => a.id - b.id);
}
// Collapsed: output name and the one box it is showing.
summary: Row {
id: brief
spacing: 14
Repeater {
model: Hyprland.monitors
Row {
id: briefOutput
required property HyprlandMonitor modelData
spacing: 8
height: 18
// A Row aligns its children by their tops only, so the label
// takes the box's height and centres its text in it.
Text {
text: briefOutput.modelData.name
color: briefOutput.modelData.focused ? Theme.accent : Theme.muted
font.family: Theme.microFont
font.pixelSize: 11
font.letterSpacing: 1.2
height: parent.height
verticalAlignment: Text.AlignVCenter
}
Chip {
anchors.verticalCenter: parent.verticalCenter
modelData: briefOutput.modelData.activeWorkspace
// Filled by construction: this box IS the output's active
// workspace, so it does not wait on the flag that says so.
shown: true
cell: 16
}
}
}
Text {
visible: panel.monitorCount === 0
text: "NO OUTPUTS"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
height: 18
verticalAlignment: Text.AlignVCenter
}
}
// Expanded: one line per output, strips aligned.
Column {
id: outputs
spacing: 4
Repeater {
model: Hyprland.monitors
Output {}
}
Text {
visible: panel.monitorCount === 0
text: "NO OUTPUTS"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
height: panel.lineHeight
verticalAlignment: Text.AlignVCenter
}
}
// One output: focus marker, name, then its workspace strip. Every cell is
// lineHeight tall and centres its own content, so the pieces sit on one
// line and the same cell widths repeat down the column.
component Output: Row {
id: output
required property HyprlandMonitor modelData
spacing: 10
// Marker rather than a colored name: the focused output has to be
// findable without reading anything.
Rectangle {
width: 3
height: panel.lineHeight
color: output.modelData.focused ? Theme.accent : Theme.hair
}
Item {
width: panel.nameWidth
height: panel.lineHeight
Text {
anchors.verticalCenter: parent.verticalCenter
width: parent.width
text: output.modelData.name
color: output.modelData.focused ? Theme.accent : Theme.muted
font.family: Theme.microFont
font.pixelSize: 10
font.letterSpacing: 1.4
elide: Text.ElideRight
}
}
Item {
width: strip.implicitWidth
height: panel.lineHeight
Row {
id: strip
anchors.verticalCenter: parent.verticalCenter
spacing: 4
Repeater {
model: panel.slots(output.modelData)
Chip {
cell: 22
}
}
}
}
}
// The indicator, at whatever size the density asks for: filled accent while
// its output is showing that workspace, outlined otherwise.
component Chip: Rectangle {
id: chip
required property HyprlandWorkspace modelData
// Box height; the width grows with the label and the type scales with
// the box, so one component covers both densities.
property int cell: 16
property bool shown: chip.modelData?.active ?? false
readonly property bool urgent: chip.modelData?.urgent ?? false
width: Math.max(chip.cell, chipText.implicitWidth + chip.cell / 2)
height: chip.cell
color: chip.shown ? Theme.accent : "transparent"
border.width: 1
border.color: chip.urgent ? Theme.hot : chip.shown ? Theme.accent : Theme.hair
Text {
id: chipText
anchors.centerIn: parent
text: panel.label(chip.modelData)
color: chip.shown ? Theme.surface : chip.urgent ? Theme.hot : Theme.muted
font.family: Theme.microFont
font.pixelSize: 11
font.bold: chip.shown
}
}
}
@@ -0,0 +1,263 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Wayland
import QtQuick
import qs.HyprChrome.Theme
// Scrim behind the bar: dims the desktop and lays the dense bar's drafting grid
// over it. It is always on screen — only how far DOWN it reaches changes.
// Expanded, it covers the whole output; collapsed, it shrinks to the band the
// rail itself occupies, so the bar keeps its backing without the desktop being
// dimmed. That collapsed band ends in a fade rather than a cut, so there is no
// hard line across the wallpaper; expanded there is nothing to fade against —
// the scrim runs to the bottom of the output.
//
// Its layer arrives from HyprChromeShell, which derives it together with the
// bar's so the two stay exactly one level apart — see that file for why the
// pair cannot be split. Collapsed that puts it on BACKGROUND, shared with the
// wallpaper (hyprpaper), where order IS creation order: if the wallpaper is
// restarted under a running shell it comes up on top and the collapsed band
// goes with it. A `layerrule = order` in the Hyprland config is the fix if that
// ever bites.
//
// It reserves nothing and takes no input: the mask is an empty Region, so
// clicks land on whatever is underneath rather than on the scrim.
PanelWindow {
id: backdrop
property bool active: true
// Which layer to sit on. An int rather than a private decision: it is half
// of a pair with the bar's, so the shell derives both.
property int wlrLayer: WlrLayer.Top
property real dim: 0.65
property int gridSpacing: 60
// Height of the collapsed rail, including its margins — the band the scrim
// stays behind while the bar is collapsed. Driven by the host, which is the
// only thing that knows what the panels currently measure.
property real barHeight: 0
// Share of the COLLAPSED band spent fading to nothing at the bottom, as a
// fraction rather than a pixel length so the tail scales with whatever the
// rail currently measures. Expanded there is no fade at all: the scrim runs
// to the bottom of the output, where the screen edge ends it.
property real fade: 0.5
readonly property real fadeAmount: Math.max(0, Math.min(0.95, backdrop.fade))
// The share actually in force. Animated rather than switched, so expanding
// shrinks the tail away as the scrim grows instead of dropping a hard edge
// onto the desktop the moment the state flips.
property real fadeSpan: backdrop.active ? 0 : backdrop.fadeAmount
// Position, in fractions of revealHeight, where the falloff starts. 1 while
// expanded, i.e. no falloff.
readonly property real fadeStart: 1 - backdrop.fadeSpan
// Collapsed, the SOLID part is the bar band and the tail hangs below it,
// hence the division: barHeight is what must survive the fade, not what the
// whole scrim measures. Sized off the static fadeAmount, not the animated
// fadeSpan — the height and the ramp have to animate independently or each
// would be chasing the other. Bound rather than readonly so the Behavior
// below can animate the state change.
property real revealHeight: backdrop.active
? backdrop.height
: Math.min(backdrop.height, backdrop.barHeight / (1 - backdrop.fadeAmount))
// Both matched to the bar's own collapse so the scrim and the panels
// resolve together rather than one trailing the other.
Behavior on revealHeight {
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
Behavior on fadeSpan {
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
// The dense bar drew this grid at 0.018 against its own near-black panel.
// Over a 55% scrim on top of lit windows that is invisible, so it is a
// knob rather than a constant.
property real gridOpacity: 0.10
// The accent with its saturation pulled back: warm enough to read as part
// of the palette, not so loud that a full-screen grid competes with the
// bar. Derived rather than a literal so it tracks a palette change.
// Registration crosses sit on every other intersection of the grid.
property color crossColor: Theme.muted
property real crossOpacity: 0.15
property int crossSize: 20
// Thickness in STEPS, not pixels: 1 -> 1px, 2 -> 3px, 3 -> 5px. Only odd
// widths can straddle a 1px rule symmetrically, so an even pixel count
// would push every mark half a pixel off the grid it registers against.
property int crossThickness: 2
readonly property int crossWeight: Math.max(1, backdrop.crossThickness) * 2 - 1
property color gridColor: Qt.hsla(Theme.accent.hslHue,
Theme.accent.hslSaturation * 0.45,
Theme.accent.hslLightness,
1)
// Fade targets keep the source RGB and drop only the alpha: interpolating
// toward a plain "transparent" would run the gradient through black.
readonly property color gridSolid: Qt.rgba(backdrop.gridColor.r, backdrop.gridColor.g,
backdrop.gridColor.b, backdrop.gridOpacity)
readonly property color gridClear: Qt.rgba(backdrop.gridColor.r, backdrop.gridColor.g,
backdrop.gridColor.b, 0)
readonly property color dimSolid: Qt.rgba(Theme.surface.r, Theme.surface.g,
Theme.surface.b, backdrop.dim)
readonly property color dimClear: Qt.rgba(Theme.surface.r, Theme.surface.g,
Theme.surface.b, 0)
// What the gradients END on. With no fade the ramp has zero length, so its
// start stop and its end stop sit on the SAME position — and Qt sorts stops
// with an unstable sort, leaving which of the two wins undefined. It picked
// the transparent one, which turned "no fade" into a ramp across the entire
// scrim. Ending on the solid color instead makes the degenerate case
// unambiguous: all three stops match and the fill is flat.
readonly property color gridEnd: backdrop.fadeSpan > 0 ? backdrop.gridClear : backdrop.gridSolid
readonly property color dimEnd: backdrop.fadeSpan > 0 ? backdrop.dimClear : backdrop.dimSolid
// Same ramp as the gradients above, for the marks that are placed at a
// single y and so cannot carry a gradient of their own. Reads revealHeight
// and fadeStart, so bindings that call it re-evaluate when either changes.
function fadeAt(y: real): real {
const start = backdrop.revealHeight * backdrop.fadeStart;
if (y <= start)
return 1;
if (y >= backdrop.revealHeight)
return 0;
return 1 - (y - start) / (backdrop.revealHeight - start);
}
visible: backdrop.revealHeight > 0
WlrLayershell.namespace: "hyprchrome-scrim"
WlrLayershell.layer: backdrop.wlrLayer
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
exclusionMode: ExclusionMode.Ignore
color: "transparent"
readonly property int crossColumns: Math.ceil(backdrop.width / (backdrop.gridSpacing * 2)) + 1
readonly property int crossRows: Math.ceil(backdrop.height / (backdrop.gridSpacing * 2)) + 1
anchors {
top: true
left: true
right: true
bottom: true
}
mask: Region {}
Item {
id: scrim
// Only as tall as the scrim currently reaches; everything inside is
// laid out against this, so shrinking it scopes the whole drawing
// rather than just clipping it.
width: backdrop.width
height: backdrop.revealHeight
clip: true
Rectangle {
anchors.fill: parent
gradient: Gradient {
GradientStop { position: 0; color: backdrop.dimSolid }
GradientStop { position: backdrop.fadeStart; color: backdrop.dimSolid }
GradientStop { position: 1; color: backdrop.dimEnd }
}
}
// Faint drafting grid; no gradient and deliberately subordinate to
// whatever is showing through it — except at the bottom, where it has to
// fade with the scrim it sits on.
Repeater {
model: Math.ceil(scrim.width / backdrop.gridSpacing)
Rectangle {
required property int index
x: index * backdrop.gridSpacing
width: 1
height: scrim.height
gradient: Gradient {
GradientStop { position: 0; color: backdrop.gridSolid }
GradientStop { position: backdrop.fadeStart; color: backdrop.gridSolid }
GradientStop { position: 1; color: backdrop.gridEnd }
}
}
}
Repeater {
// Modelled against the whole output, not the current reveal, so a
// collapse fades the rules out where they stand instead of
// restocking the Repeater on every animation frame.
model: Math.ceil(backdrop.height / backdrop.gridSpacing)
Rectangle {
required property int index
readonly property real line: index * backdrop.gridSpacing
y: line
width: scrim.width
height: 1
color: backdrop.gridColor
opacity: backdrop.gridOpacity * backdrop.fadeAt(line)
}
}
// Register marks on every other line, so they land on a 2x grid rather
// than on every crossing — sparse enough to read as drafting registration
// rather than as texture.
Repeater {
model: backdrop.crossColumns * backdrop.crossRows
Item {
required property int index
readonly property int column: index % backdrop.crossColumns
readonly property int row: Math.floor(index / backdrop.crossColumns)
// Marks on every other rule in both directions, so they line up
// in columns as well as rows. Both offsets are whole multiples of
// gridSpacing, so every mark lands on a real intersection.
//
// Math.floor, not /2: the item offset and the bars inside it must
// round the same way, or an even crossSize sits half a pixel off the
// rule it marks.
x: column * backdrop.gridSpacing * 2 - Math.floor(backdrop.crossSize / 2)
y: row * backdrop.gridSpacing * 2 - Math.floor(backdrop.crossSize / 2)
width: backdrop.crossSize
height: backdrop.crossSize
// Sampled at the intersection the mark registers against, not at
// its own top edge, so a cross fades as one piece.
opacity: backdrop.crossOpacity * backdrop.fadeAt(row * backdrop.gridSpacing * 2)
Rectangle {
// Placed with the same Math.floor the item's own offset uses.
// anchors.verticalCenter halves the height unfloored, so an even
// crossSize put the 1px bar half a pixel off the rule it marks.
y: Math.floor(backdrop.crossSize / 2) - Math.floor(backdrop.crossWeight / 2)
width: parent.width
height: backdrop.crossWeight
color: backdrop.crossColor
}
Rectangle {
x: Math.floor(backdrop.crossSize / 2) - Math.floor(backdrop.crossWeight / 2)
width: backdrop.crossWeight
height: parent.height
color: backdrop.crossColor
}
}
}
}
}
@@ -0,0 +1,200 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Greetd
import qs.HyprChrome.Widgets
// greetd greeter: backdrop on every output, login panel on the primary one.
// Configured through env set by services/desktop/quickshell-greeter.nix.
Scope {
id: root
readonly property string primaryName: Quickshell.env("QS_GREETER_OUTPUT") ?? ""
readonly property string defaultUser: Quickshell.env("QS_GREETER_USER") ?? ""
readonly property string sessionCommand: Quickshell.env("QS_GREETER_SESSION") || "start-hyprland"
readonly property string sessionName: Quickshell.env("QS_GREETER_SESSION_NAME") || "hyprland"
readonly property string hostName: Quickshell.env("QS_GREETER_HOST") || "localhost"
readonly property var primaryScreen: {
const screens = Quickshell.screens;
if (screens.length === 0)
return null;
for (let i = 0; i < screens.length; i++) {
if (screens[i].name === root.primaryName)
return screens[i];
}
return screens[0];
}
// Typed password, held until PAM's first secret prompt arrives.
property string pendingSecret: ""
// PAM asked a follow-up (OTP etc.) that the user must answer directly.
property bool awaitingResponse: false
property bool busy: false
property bool launching: false
function setMessage(text, isError) {
content.message = text;
content.messageIsError = isError;
}
function resetToPassword() {
root.pendingSecret = "";
root.awaitingResponse = false;
root.busy = false;
content.inputPrompt = "";
content.responseVisible = false;
content.clearSecret();
content.focusSecret();
}
function submit(user, secret) {
if (!Greetd.available) {
root.setMessage("greetd socket unavailable", true);
return;
}
content.failed = false;
if (root.awaitingResponse) {
root.awaitingResponse = false;
root.busy = true;
content.clearSecret();
Greetd.respond(secret);
return;
}
if (Greetd.state !== GreetdState.Inactive)
return;
root.setMessage("", false);
root.pendingSecret = secret;
root.busy = true;
Greetd.createSession(user);
}
Connections {
target: Greetd
function onAuthMessage(message, error, responseRequired, echoResponse) {
if (!responseRequired) {
root.setMessage(message, error);
return;
}
// First hidden prompt is the password already typed.
if (root.pendingSecret !== "" && !echoResponse) {
const secret = root.pendingSecret;
root.pendingSecret = "";
Greetd.respond(secret);
return;
}
root.busy = false;
root.awaitingResponse = true;
content.inputPrompt = message.replace(/:\s*$/, "");
content.responseVisible = echoResponse;
content.clearSecret();
content.focusSecret();
}
function onAuthFailure(message) {
root.resetToPassword();
content.failed = true;
root.setMessage(message || "authentication failed", true);
}
function onError(error) {
root.resetToPassword();
root.setMessage(error, true);
}
function onReadyToLaunch() {
root.setMessage("starting " + root.sessionName, false);
root.launching = true;
}
}
// Fade out first: greetd wants the greeter gone promptly after launch().
Timer {
running: root.launching
interval: 220
onTriggered: Greetd.launch([root.sessionCommand])
}
Variants {
model: Quickshell.screens
ChromeBackdrop {
required property var modelData
screen: modelData
active: true
dim: 1
wlrLayer: WlrLayer.Background
}
}
PanelWindow {
screen: root.primaryScreen
visible: root.primaryScreen !== null
WlrLayershell.namespace: "hyprchrome-greeter"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
exclusionMode: ExclusionMode.Ignore
color: "transparent"
anchors {
top: true
left: true
right: true
bottom: true
}
LoginContent {
id: content
width: 640
anchors.horizontalCenter: parent.horizontalCenter
y: Math.max(32, Math.round(parent.height * 0.42 - height / 2)) + (1 - opacity) * 12
opacity: root.launching ? 0 : 1
Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } }
hostName: root.hostName
sessionName: root.sessionName
user: root.defaultUser
busy: root.busy || root.launching
onSubmitted: (user, secret) => root.submit(user, secret)
// A different user invalidates a half-finished conversation.
onUserEdited: {
if (Greetd.state !== GreetdState.Inactive)
Greetd.cancelSession();
root.resetToPassword();
content.focusUser();
}
onPowerRequested: action => Quickshell.execDetached(["systemctl", action])
Component.onCompleted: {
if (root.defaultUser !== "")
content.focusSecret();
else
content.focusUser();
}
}
Timer {
running: true
repeat: true
interval: 1000
triggeredOnStart: true
onTriggered: content.now = new Date()
}
}
}
@@ -0,0 +1,311 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import qs.HyprChrome.Theme
// Headless visual core of the login greeter; Greeter.qml owns greetd.
Item {
id: root
property string hostName: ""
property string sessionName: ""
property string title: "SESSION // " + root.hostName.toUpperCase()
property string panelId: "LGN"
property string meta: "GREETD"
property string submitLabel: "LOG IN"
// Off for the lock screen: the session's user is the only one who unlocks.
property bool userEditable: true
property bool showPower: true
property date now: new Date()
// Label over the secret field. Empty means the plain password step; set
// when PAM asks for something else (OTP, PIN).
property string inputPrompt: ""
property bool responseVisible: false
property string message: ""
property bool messageIsError: false
property bool failed: false
property bool busy: false
property alias user: userInput.text
property alias response: secretInput.text
signal submitted(string user, string response)
signal userEdited
signal powerRequested(string action)
function focusSecret() { secretInput.forceActiveFocus(); }
function focusUser() { userInput.forceActiveFocus(); }
function clearSecret() { secretInput.text = ""; }
implicitWidth: 640
implicitHeight: panel.implicitHeight
function submit() {
if (root.busy)
return;
if (userInput.text.trim() === "") {
root.focusUser();
return;
}
root.submitted(userInput.text.trim(), secretInput.text);
}
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.9
elide: Text.ElideRight
}
component Field: Rectangle {
id: field
property bool active: false
property bool alert: false
property string glyph: ""
default property alias input: slot.data
Layout.fillWidth: true
implicitHeight: 36
color: Theme.selection
border.width: 1
border.color: field.alert ? Theme.hot : field.active ? Theme.accentAlpha(0.7) : Theme.hair
Behavior on border.color { ColorAnimation { duration: 120 } }
// Focus tick on the left edge.
Rectangle {
width: 2
height: parent.height
color: Theme.accent
visible: field.active
}
Text {
id: glyphText
x: 12
anchors.verticalCenter: parent.verticalCenter
text: field.glyph
color: field.active ? Theme.accent : Theme.disabled
font.family: Theme.displayFont
font.pixelSize: 14
font.bold: true
}
Item {
id: slot
anchors.left: glyphText.right
anchors.leftMargin: 10
anchors.right: parent.right
anchors.rightMargin: 12
anchors.top: parent.top
anchors.bottom: parent.bottom
}
}
component PowerChip: Rectangle {
id: chip
property string label: ""
property string action: ""
width: chipLabel.implicitWidth + 16
height: chipLabel.implicitHeight + 8
color: chipMouse.containsMouse ? Theme.accent : "transparent"
border.width: 1
border.color: chipMouse.containsMouse ? Theme.accent : Theme.disabled
Text {
id: chipLabel
anchors.centerIn: parent
text: chip.label
color: chipMouse.containsMouse ? Theme.surface : Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 0.8
}
MouseArea {
id: chipMouse
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.powerRequested(chip.action)
}
}
LoginPanel {
id: panel
width: root.width
panelId: root.panelId
title: root.title
meta: root.meta
busy: root.busy
ColumnLayout {
width: parent.width
spacing: 16
RowLayout {
Layout.fillWidth: true
spacing: 20
// ---- clock column ----
ColumnLayout {
Layout.preferredWidth: 190
Layout.alignment: Qt.AlignTop
spacing: 4
Text {
text: Qt.formatTime(root.now, "HH:mm")
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 54
font.letterSpacing: 2
}
MicroText {
text: Qt.formatDate(root.now, "ddd dd.MM.yyyy").toUpperCase()
color: Theme.accent
font.pixelSize: 10
}
// Seconds as a segment meter: one cell per five seconds.
Row {
Layout.topMargin: 10
spacing: 3
Repeater {
model: 12
Rectangle {
required property int index
width: 11
height: 5
color: index < Math.floor(root.now.getSeconds() / 5) + 1
? Theme.accent : Theme.raised
}
}
}
MicroText {
Layout.topMargin: 10
text: "SESSION " + root.sessionName.toUpperCase()
}
}
Rectangle {
Layout.fillHeight: true
implicitWidth: 1
color: Theme.textAlpha(0.12)
}
// ---- credentials ----
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop
spacing: 6
MicroText { text: "OPERATOR" }
Field {
glyph: "@"
active: userInput.activeFocus
TextInput {
id: userInput
anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter
enabled: root.userEditable && !root.busy && root.inputPrompt === ""
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 14
font.letterSpacing: 1
clip: true
onTextEdited: root.userEdited()
onAccepted: root.focusSecret()
KeyNavigation.tab: secretInput
}
}
MicroText {
Layout.topMargin: 6
text: root.inputPrompt !== "" ? root.inputPrompt.toUpperCase() : "PASSPHRASE"
color: root.inputPrompt !== "" ? Theme.accent : Theme.muted
}
Field {
glyph: ">_"
active: secretInput.activeFocus
alert: root.failed
TextInput {
id: secretInput
anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter
enabled: !root.busy
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 14
font.letterSpacing: 1
clip: true
echoMode: root.responseVisible ? TextInput.Normal : TextInput.Password
passwordCharacter: "▪"
passwordMaskDelay: 0
onAccepted: root.submit()
KeyNavigation.backtab: userInput
}
}
// Status line; keeps its height so the panel does not jump.
MicroText {
Layout.fillWidth: true
Layout.topMargin: 4
Layout.preferredHeight: 12
text: root.busy && root.message === "" ? "AUTHENTICATING…" : root.message.toUpperCase()
color: root.messageIsError ? Theme.hot : root.busy ? Theme.accent : Theme.muted
font.pixelSize: 9
}
}
}
// ---- footer ----
Rectangle {
Layout.fillWidth: true
implicitHeight: 1
color: Theme.textAlpha(0.12)
}
RowLayout {
Layout.fillWidth: true
spacing: 14
MicroText { text: "ENTER " + root.submitLabel }
MicroText { text: "TAB SWITCH FIELD"; visible: root.userEditable }
Item { Layout.fillWidth: true }
PowerChip { label: "REBOOT"; action: "reboot"; visible: root.showPower }
PowerChip { label: "POWER OFF"; action: "poweroff"; visible: root.showPower }
}
}
}
}
@@ -0,0 +1,231 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import qs.HyprChrome.Theme
// Panel chrome for the login greeter. Same vocabulary as PolkitPanel, mirrored:
// cuts on the OTHER diagonal (top-left, bottom-right), registration brackets
// instead of detached caps, and a segmented accent spine down the left edge.
Item {
id: panel
property string panelId: ""
property string title: ""
property string meta: ""
property int chamfer: 20
property int padding: 18
property int spineWidth: 3
property int spineSegments: 9
// Sweeps the bottom rule while greetd is working.
property bool busy: false
readonly property int headerHeight: 32
readonly property int headerPadding: 12
property real bracketGap: 6
property real bracketArm: 14
readonly property real activeChamfer: Math.max(2, Math.min(panel.chamfer, panel.height / 2 - 1))
default property alias content: body.data
implicitHeight: Math.round(body.y + body.height + panel.padding)
Shape {
id: panelShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.surface
strokeColor: Theme.hair
strokeWidth: 1
startX: panel.activeChamfer; startY: 0
PathLine { x: panelShape.width; y: 0 }
PathLine { x: panelShape.width; y: panelShape.height - panel.activeChamfer }
PathLine { x: panelShape.width - panel.activeChamfer; y: panelShape.height }
PathLine { x: 0; y: panelShape.height }
PathLine { x: 0; y: panel.activeChamfer }
PathLine { x: panel.activeChamfer; y: 0 }
}
// Accent along each cut, inset so it reads as an edge highlight.
ShapePath {
fillColor: "transparent"
strokeColor: Theme.accent
strokeWidth: 2
capStyle: ShapePath.FlatCap
startX: 0; startY: panel.activeChamfer
PathLine { x: panel.activeChamfer; y: 0 }
}
ShapePath {
fillColor: "transparent"
strokeColor: Theme.accent
strokeWidth: 2
capStyle: ShapePath.FlatCap
startX: panelShape.width; startY: panelShape.height - panel.activeChamfer
PathLine { x: panelShape.width - panel.activeChamfer; y: panelShape.height }
}
// Registration brackets on the two square corners, echoing the
// backdrop's crosses.
ShapePath {
fillColor: "transparent"
strokeColor: Theme.muted
strokeWidth: 1
startX: panelShape.width + panel.bracketGap - panel.bracketArm
startY: -panel.bracketGap
PathLine { x: panelShape.width + panel.bracketGap; y: -panel.bracketGap }
PathLine { x: panelShape.width + panel.bracketGap; y: -panel.bracketGap + panel.bracketArm }
}
ShapePath {
fillColor: "transparent"
strokeColor: Theme.muted
strokeWidth: 1
startX: -panel.bracketGap
startY: panelShape.height + panel.bracketGap - panel.bracketArm
PathLine { x: -panel.bracketGap; y: panelShape.height + panel.bracketGap }
PathLine { x: -panel.bracketGap + panel.bracketArm; y: panelShape.height + panel.bracketGap }
}
}
// Segmented spine, below the header.
Column {
x: 0
y: panel.headerHeight + 8
spacing: 3
readonly property real segment: (panel.height - panel.headerHeight - 8 - panel.activeChamfer - 8
- (panel.spineSegments - 1) * spacing) / panel.spineSegments
Repeater {
model: panel.spineSegments
Rectangle {
required property int index
width: panel.spineWidth
height: Math.max(1, parent.segment)
color: Theme.accent
// Fades downward.
opacity: 1 - index / panel.spineSegments * 0.85
}
}
}
// Header: title, meta, slug chip on the right.
Text {
x: panel.activeChamfer + panel.headerPadding
anchors.verticalCenter: header.verticalCenter
text: panel.title
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 12
font.bold: true
font.letterSpacing: 1.4
}
Row {
id: header
anchors.right: parent.right
anchors.rightMargin: panel.headerPadding
y: Math.round((panel.headerHeight - height) / 2)
spacing: 12
Text {
anchors.verticalCenter: slugChip.verticalCenter
visible: panel.meta.length > 0
text: panel.meta
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.7
}
Rectangle {
id: slugChip
width: slugText.implicitWidth + 10
height: slugText.implicitHeight + 4
color: "transparent"
border.width: 1
border.color: Theme.accent
Text {
id: slugText
anchors.centerIn: parent
text: panel.panelId
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 11
font.bold: true
}
}
}
// Header rule: dashed, not solid, to set it apart from the polkit dialog.
Row {
x: panel.activeChamfer
y: panel.headerHeight
spacing: 3
Repeater {
model: Math.max(0, Math.floor((panel.width - panel.activeChamfer - 1) / 9))
Rectangle {
width: 6
height: 1
color: Theme.textAlpha(0.18)
}
}
}
// Busy sweep along the bottom edge.
Item {
x: 0
y: panel.height - 2
width: panel.width - panel.activeChamfer
height: 2
clip: true
visible: panel.busy
Rectangle {
id: sweep
width: parent.width / 4
height: parent.height
color: Theme.accent
NumberAnimation on x {
running: panel.busy
loops: Animation.Infinite
from: -sweep.width
to: panel.width
duration: 900
easing.type: Easing.InOutQuad
}
}
}
Item {
id: body
x: panel.padding + panel.spineWidth
y: panel.headerHeight + panel.padding
width: Math.max(0, panel.width - panel.padding * 2 - panel.spineWidth)
height: childrenRect.height
}
}
@@ -0,0 +1,293 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import qs.HyprChrome.Widgets.Bar
import qs.HyprChrome.Widgets
import qs.HyprChrome.Widgets.Polkit
import qs.HyprChrome.Widgets.Launcher
import qs.HyprChrome.Widgets.Askpass
import qs.HyprChrome.Widgets.Notifications
// The hyprchrome shell: owns everything the rail's surfaces have to agree on,
// and instantiates them.
//
// State lives here rather than in any one surface because more than one of them
// reads it, and a second reader is what turns a local property into shared
// state. Four things qualify so far:
//
// * which monitor the shell lives on — every surface has to pick the same one
// * the density — the whole rail expands and collapses as one, so the toggle
// and the shortcut that drives it belong to the shell, not to the bar
// * whether a MODAL is open — the polkit prompt, the launcher, or the sudo
// askpass dialog. Each raises the same scrim the rail uses, freezes the
// density, lands on the focused monitor and takes the keyboard off the
// rail, so several surfaces read it. That is why they live here rather than
// as siblings of the remaining launcher variants in shell.qml
// * the layer PAIR — the backdrop must sit exactly one layer below the bar in
// both densities. Two surfaces on the same layer stack by creation order,
// which is not something to rely on; one layer apart is a guarantee. Split
// across two files those two assignments drifted apart and the scrim ended
// up over the bar, so they are derived together here and passed down.
//
// A future widget joins by taking `targetScreen` and `expanded` the same way.
Scope {
id: shell
// Monitor the rail lives on. Falls back to the FIRST connected screen when
// the name matches nothing, so the bar still appears on a single-monitor
// session or after a cable swap (DebugWindow falls back to the last one
// instead — it wants the secondary).
// Set per host in home/desktop/options.nix (primaryOutput).
property string screenName: Quickshell.env("QS_PRIMARY_OUTPUT") ?? ""
// Quickshell.screens is a QML list, not a JS array — no .find() on it.
readonly property var targetScreen: {
const screens = Quickshell.screens;
if (screens.length === 0)
return null;
for (let i = 0; i < screens.length; i++) {
if (screens[i].name === shell.screenName)
return screens[i];
}
return screens[0];
}
// Every output the rail does NOT live on. They get a scrim of their own
// while a prompt is up, because a modal that dims one monitor and leaves
// the others lit does not read as modal at all — and the rail's backdrop
// covers exactly one output.
readonly property var otherScreens: {
const out = [];
const screens = Quickshell.screens;
for (let i = 0; i < screens.length; i++) {
if (screens[i] !== shell.targetScreen)
out.push(screens[i]);
}
return out;
}
// Where a prompt appears: wherever the user is actually looking, which is
// not necessarily where the rail lives. Hyprland reports the focused
// monitor by name, and Quickshell.screens is keyed the same way, so the
// two are matched by name exactly as targetScreen is above.
//
// Falls back to the rail's own screen rather than to nothing: a prompt that
// fails to place itself would leave its caller blocked on a dialog nobody
// can see.
readonly property var focusedScreen: {
const focused = Hyprland.focusedMonitor;
if (!focused)
return shell.targetScreen;
const screens = Quickshell.screens;
for (let i = 0; i < screens.length; i++) {
if (screens[i].name === focused.name)
return screens[i];
}
return shell.targetScreen;
}
// Density is a property of the SHELL: every panel follows it, so the whole
// rail expands and collapses as one. Panels keep their own animation; only
// the decision is centralised here.
//
// A prompt does NOT change it: an authorization request leaves the rail at
// whatever density it was, and only freezes it there.
property bool expanded: false
function toggle() {
// Frozen while a prompt is up, and dropped rather than queued: SUPER A
// during a prompt does nothing at all, instead of arming a change that
// springs the rail open or shut the moment the dialog goes.
if (shell.modalOpen)
return;
shell.expanded = !shell.expanded;
}
// The surfaces that take over the screen: they dim EVERY output, land on the
// focused one, and take the keyboard off the rail. Grouped because
// everything below treats them alike, so a fourth one joins by being named
// here and nowhere else.
readonly property bool modalOpen: polkit.prompting || launcher.active || askpass.active
// Whether the scrim is up, from ANY cause. This is the fact the surfaces
// actually share — the rail's density is only one of the things that can
// raise it — so the backdrop and the layer pair below key off this rather
// than off `expanded`.
//
// One backdrop instance serves all of them. A modal opening over an already
// expanded rail therefore changes nothing about the scrim on that monitor:
// it is already up, already full height, and the modal simply appears above
// it. Over a COLLAPSED rail the same scrim expands from its bar-height band
// to the whole output, using the animation it already has, and the rail
// stays collapsed throughout.
readonly property bool scrimUp: shell.expanded || shell.modalOpen
// Scrim up, the rail is over everything; scrim down, it drops below ordinary
// windows. BOTTOM rather than BACKGROUND for the lowered bar: it is the
// lowest level that still leaves a layer underneath for the backdrop, and
// it keeps the rail off the wallpaper's own level.
//
// Both key off `scrimUp`, not `expanded`, so the pair stays exactly one
// level apart in every state — which is the whole point of deriving them
// together. A prompt over a collapsed rail raises BOTH: the scrim has to
// clear ordinary windows to dim them at all (BACKGROUND sits under them),
// and the bar has to stay one above the scrim or the shell would be dimming
// its own chrome. The rail is raised but still collapsed: its layer answers
// to the scrim, its height to `expanded`.
readonly property int barLayer: shell.scrimUp ? WlrLayer.Overlay : WlrLayer.Bottom
readonly property int backdropLayer: shell.scrimUp ? WlrLayer.Top : WlrLayer.Background
// SUPER A — see home/desktop/hyprland.nix.
GlobalShortcut {
name: "chrome"
description: "Expand or collapse the hyprchrome bar"
onPressed: shell.toggle()
}
// SUPER — the launcher over an expanded rail, opened and closed as one.
GlobalShortcut {
name: "command"
description: "Open the launcher with the hyprchrome bar expanded"
onPressed: shell.toggleCommand()
}
// Whether the rail was expanded BY toggleCommand, so closing the launcher
// only collapses a rail it opened.
property bool commandExpanded: false
function toggleCommand() {
if (polkit.prompting || askpass.active)
return;
if (launcher.active) {
launcher.close();
return;
}
shell.commandExpanded = !shell.expanded;
shell.expanded = true;
launcher.active = true;
}
// The launcher closes itself (ESC, launch, click-off), so collapse follows it.
Connections {
target: launcher
function onActiveChanged() {
if (!launcher.active && shell.commandExpanded) {
shell.commandExpanded = false;
shell.expanded = false;
}
}
}
// Backdrop first: it is a layer below the bar, so stacking does not depend
// on creation order, but keeping the declaration order the same as the
// visual order costs nothing.
ChromeBackdrop {
screen: shell.targetScreen
active: shell.scrimUp
wlrLayer: shell.backdropLayer
// Collapsed, the scrim only backs the rail, so it needs the band the
// rail occupies. contentHeight is the SETTLED height for the current
// state — it jumps once per toggle rather than tracking the panels
// frame by frame, so the backdrop animates the change itself instead of
// chasing a value that is already being animated.
barHeight: bar.contentHeight
}
// The same scrim on every other output, up only while a prompt is. These
// have no rail to back, so barHeight stays 0 and revealHeight falls to
// nothing between prompts — the surfaces take themselves off screen rather
// than lingering as a strip the way the rail's does.
//
// Deliberately NOT tied to `scrimUp`: expanding the rail dims the rail's
// monitor only, which is the existing behaviour and the right one — the
// rail is a thing on one screen. A prompt is the only event that concerns
// every screen at once.
//
// TOP unconditionally: there is no bar on these outputs to keep one level
// above the scrim, and BACKGROUND would put the dim under ordinary windows
// where it would dim nothing. Inactive they are invisible, so the level
// costs nothing between prompts.
Variants {
model: shell.otherScreens
ChromeBackdrop {
required property var modelData
screen: modelData
active: shell.modalOpen
wlrLayer: WlrLayer.Top
barHeight: 0
}
}
HyprChromeBar {
id: bar
screen: shell.targetScreen
// Set here, not from the window's own `screen`: reading that inside
// `visible` is circular — a hidden window has no screen to report.
visible: shell.targetScreen !== null
expanded: shell.expanded
wlrLayer: shell.barLayer
// ESC closes the rail — but only when it is the innermost thing open.
// While a prompt is up the rail gives up the keyboard so ESC dismisses
// the DIALOG; the prompt closing hands it back, and the next ESC closes
// the rail. Withheld rather than left to the compositor to arbitrate
// between two exclusive surfaces, which would decide by stacking and
// silently swap the order the day the layers change.
grabsKeyboard: shell.expanded && !shell.modalOpen
onDismissed: shell.expanded = false
}
// Popups on the rail's monitor, below its exclusive zone.
Notifications {
screen: shell.targetScreen
}
// Polkit authentication agent. It registers for this logind session on
// creation, so it replaces hyprpolkitagent rather than coexisting with it —
// only one agent may hold a session (see home/desktop/hyprland.nix).
//
// It lives here rather than beside the launchers in shell.qml because its
// state is shared: `prompting` raises the scrim and freezes the density,
// which makes it shell state by the same rule as the screen and the layer
// pair. It owns only its dialog; the scrim above is the rail's.
//
// Declared LAST on purpose. While a prompt is up the bar is on Overlay too,
// and there is no layer above Overlay to escape to, so the dialog stays on
// top by being the later surface. In practice it is later regardless — its
// window only exists while a request is open, so it is always created after
// the bar's — but the declaration order says so without relying on that.
PolkitPrompt {
id: polkit
screen: shell.focusedScreen
}
// Primary application launcher — SUPER_L (via `command` above). Migrated out of
// widgets/launcher/; the ten remaining variants are still evaluation copies
// and stay in shell.qml. Declared after the bar for the same reason the
// prompt is: while it is open the bar is on Overlay too, and there is no
// layer above Overlay to escape to.
AppLauncher {
id: launcher
screen: shell.focusedScreen
}
// GUI password prompt for `sudo -A`. Not the polkit agent — sudo cannot use
// one — but it renders the same dialog. See the file for the flow.
AskpassPrompt {
id: askpass
screen: shell.focusedScreen
}
}
@@ -0,0 +1,141 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import QtQuick
import qs.HyprChrome.Theme
// Primary application launcher — the one on SUPER_L (via HyprChromeShell).
//
// Migrated from widgets/launcher/ApplicationLauncher.qml. Two things changed in
// the move, both because HyprChromeShell now owns the state its surfaces share:
//
// * no scrim of its own. The shell raises the single ChromeBackdrop for any
// of its causes — expanded rail, polkit prompt, this — so opening the
// launcher over an already-expanded rail reuses the scrim that is there
// rather than laying a second dim on top of it.
// * `active` is read by the shell, which uses it to raise that scrim, to
// place this on the focused monitor, and to decide who gets the keyboard.
//
// The full-screen layer-shell adapter owns focus, DesktopEntries and execution;
// AppLauncherContent stays an Item so the whole visual state can be rendered
// headlessly (tests/AppLauncherHeadless.qml).
Scope {
id: root
property bool active: false
// Which output to appear on. Driven by the shell, which puts it on the
// focused monitor — a launcher belongs where the user is looking, which is
// not necessarily where the rail lives.
property var screen: null
function toggle() { root.active = !root.active; }
function close() { root.active = false; }
// Launcher alone, on SUPER CTRL 8. SUPER_L goes through the shell's
// `command` shortcut instead, which also expands the rail.
GlobalShortcut {
name: "launcher8"
description: "Toggle dense application command index"
onPressed: root.toggle()
}
PanelWindow {
id: win
screen: root.screen
visible: root.active
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
exclusionMode: ExclusionMode.Ignore
color: Theme.textAlpha(0)
anchors {
top: true
left: true
right: true
bottom: true
}
property int selectedIndex: 0
function clampSelection(index) {
if (model.apps.length === 0)
return 0;
return Math.max(0, Math.min(model.apps.length - 1, index));
}
function move(delta) {
const count = model.apps.length;
if (count === 0)
return;
selectedIndex = ((selectedIndex + delta) % count + count) % count;
}
function launch(index) {
if (model.launch(index))
root.active = false;
}
// Hyprland runs a Lua config, which rejects a bare `dispatch exit`.
readonly property var powerCommands: ({
logout: ["hyprctl", "dispatch", "hl.dsp.exit()"],
reboot: ["systemctl", "reboot"],
shutdown: ["systemctl", "poweroff"]
})
function power(action) {
root.active = false;
Quickshell.execDetached(win.powerCommands[action]);
}
onVisibleChanged: {
if (visible) {
content.clearSearch();
content.disarmPower();
selectedIndex = 0;
content.focusSearch();
}
}
AppModel {
id: model
search: content.query
}
// Click-off dismissal. The scrim itself belongs to the shell and takes
// no input (its mask is empty), so the catcher lives here: a
// transparent full-surface MouseArea UNDER the content, which is what
// keeps clicks on the launcher itself from closing it.
MouseArea {
anchors.fill: parent
onClicked: root.close()
}
AppLauncherContent {
id: content
anchors.centerIn: parent
width: 1080
height: 620
scale: Math.min(1, (parent.width - 64) / width, (parent.height - 64) / height)
transformOrigin: Item.Center
apps: model.apps
selectedIndex: win.selectedIndex
sortMode: model.sortMode
onSelectionRequested: index => win.selectedIndex = win.clampSelection(index)
onMoveRequested: delta => win.move(delta)
onLaunchRequested: index => win.launch(index)
onDismissRequested: root.close()
onSortToggleRequested: {
model.toggleSort();
win.selectedIndex = 0;
}
onPowerRequested: action => win.power(action)
}
}
}
@@ -0,0 +1,674 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Shapes
import qs.HyprChrome.Theme
// Headlessly renderable visual core for the primary application launcher.
// Runtime concerns (DesktopEntries, layer shell, focus, launching) stay in
// AppLauncher.qml; this component only renders state and emits intent.
Item {
id: root
property var apps: []
property int selectedIndex: 0
property bool showIcons: true
property alias query: searchInput.text
property string sortMode: "usage"
// Power action awaiting its confirming second click; "" when none.
property string armedPower: ""
readonly property var selectedApp: apps.length > 0 && selectedIndex >= 0 && selectedIndex < apps.length
? apps[selectedIndex] : null
signal selectionRequested(int index)
signal moveRequested(int delta)
signal launchRequested(int index)
signal dismissRequested
signal sortToggleRequested
signal powerRequested(string action)
function focusSearch() { searchInput.forceActiveFocus(); }
function clearSearch() { searchInput.text = ""; }
function disarmPower() { root.armedPower = ""; }
// First click arms, second (within the timeout) fires: a stray click must
// not end the session.
function pressPower(action) {
if (root.armedPower === action) {
root.armedPower = "";
root.powerRequested(action);
} else {
root.armedPower = action;
}
}
Timer {
running: root.armedPower !== ""
interval: 3000
onTriggered: root.disarmPower()
}
implicitWidth: 1080
implicitHeight: 620
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 7
font.letterSpacing: 0.9
elide: Text.ElideRight
}
component KeyHint: Row {
property string keyText: ""
property string actionText: ""
spacing: 6
Rectangle {
width: keyLabel.implicitWidth + 10
height: 18
color: Theme.accentAlpha(0.14)
border.width: 1
border.color: Theme.accent
Text {
id: keyLabel
anchors.centerIn: parent
text: parent.parent.keyText
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 7
font.bold: true
}
}
MicroText {
anchors.verticalCenter: parent.verticalCenter
text: parent.actionText
}
}
LauncherPanel {
anchors.fill: parent
panelId: "008"
title: "APPLICATION COMMAND INDEX"
meta: root.apps.length + " TARGETS"
chamfer: 18
// Query module.
LauncherPanel {
id: queryPanel
x: 18
y: 34
width: 670
height: 76
panelId: "QRY"
title: "SEARCH VECTOR"
meta: "FUZZY / PREFIX"
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.leftMargin: 16
anchors.rightMargin: 16
anchors.topMargin: 31
height: 34
spacing: 12
Text {
text: ">_"
color: Theme.accent
font.family: Theme.displayFont
font.pixelSize: 20
font.bold: true
}
TextInput {
id: searchInput
Layout.fillWidth: true
Layout.fillHeight: true
verticalAlignment: TextInput.AlignVCenter
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 18
font.letterSpacing: 1
clip: true
onTextChanged: root.selectionRequested(0)
Keys.onPressed: event => {
if (event.key === Qt.Key_S && (event.modifiers & Qt.ControlModifier)) {
root.sortToggleRequested();
event.accepted = true;
return;
}
switch (event.key) {
case Qt.Key_Down:
case Qt.Key_Tab:
root.moveRequested(1);
event.accepted = true;
break;
case Qt.Key_Up:
case Qt.Key_Backtab:
root.moveRequested(-1);
event.accepted = true;
break;
case Qt.Key_PageDown:
root.moveRequested(5);
event.accepted = true;
break;
case Qt.Key_PageUp:
root.moveRequested(-5);
event.accepted = true;
break;
case Qt.Key_Return:
case Qt.Key_Enter:
root.launchRequested(root.selectedIndex);
event.accepted = true;
break;
case Qt.Key_Escape:
root.dismissRequested();
event.accepted = true;
break;
}
}
Text {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
visible: searchInput.text.length === 0
text: "TYPE APPLICATION DESIGNATION"
color: Theme.muted
font: searchInput.font
}
}
MouseArea {
id: sortChip
Layout.preferredWidth: 84
Layout.preferredHeight: 22
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.sortToggleRequested()
Rectangle {
anchors.fill: parent
color: sortChip.containsMouse ? Theme.accentAlpha(0.28) : Theme.accentAlpha(0.12)
border.width: 1
border.color: sortChip.containsMouse ? Theme.accent : Theme.hair
}
Text {
anchors.centerIn: parent
text: root.sortMode === "usage" ? "SORT: USED" : "SORT: A–Z"
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 7
font.bold: true
font.letterSpacing: 0.8
}
}
}
}
// Search result table.
LauncherPanel {
id: resultPanel
x: 18
y: 118
width: 670
height: 424
panelId: "IDX"
title: "APPLICATION TABLE"
meta: (root.query.length > 0 ? "FILTER ACTIVE" : "LOCAL") + (root.sortMode === "usage" ? " / MOST USED" : " / A–Z")
ListView {
id: appList
x: 9
y: 29
width: parent.width - 18
height: parent.height - 38
clip: true
spacing: 3
model: root.apps
currentIndex: root.selectedIndex
boundsBehavior: Flickable.StopAtBounds
onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)
delegate: MouseArea {
id: row
required property int index
required property var modelData
width: ListView.view.width
height: 48
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
readonly property bool selected: index === root.selectedIndex
// Only the selected row is slanted; the rest are plain rectangles.
property real slant: selected ? 9 : 0
Behavior on slant { NumberAnimation { duration: 90; easing.type: Easing.OutCubic } }
onEntered: root.selectionRequested(index)
onClicked: root.launchRequested(index)
Shape {
id: rowShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: row.selected ? Theme.selection : Theme.textAlpha(0.025)
strokeColor: row.selected ? Theme.accent : Theme.textAlpha(0.10)
strokeWidth: 1
startX: row.slant; startY: 0
PathLine { x: rowShape.width; y: 0 }
PathLine { x: rowShape.width - row.slant; y: rowShape.height }
PathLine { x: 0; y: rowShape.height }
PathLine { x: row.slant; y: 0 }
}
ShapePath {
fillColor: row.selected ? Theme.accent : Theme.textAlpha(0.12)
strokeWidth: 0
startX: row.slant; startY: 0
PathLine { x: row.slant + 4; y: 0 }
PathLine { x: 4; y: rowShape.height }
PathLine { x: 0; y: rowShape.height }
PathLine { x: row.slant; y: 0 }
}
}
RowLayout {
anchors.fill: parent
anchors.leftMargin: 18
anchors.rightMargin: 18
spacing: 12
Text {
Layout.preferredWidth: 28
text: String(row.index + 1).padStart(2, "0")
color: row.selected ? Theme.accent : Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.bold: row.selected
}
Rectangle {
Layout.preferredWidth: 34
Layout.preferredHeight: 34
color: row.selected ? Theme.accentAlpha(0.14) : Theme.textAlpha(0.035)
border.width: 1
border.color: row.selected ? Theme.accent : Theme.hair
IconImage {
visible: root.showIcons
anchors.centerIn: parent
implicitSize: 24
source: root.showIcons
? Quickshell.iconPath(row.modelData.icon || "application-x-executable", "application-x-executable")
: ""
}
Text {
visible: !root.showIcons
anchors.centerIn: parent
text: String(row.modelData.name || "?").charAt(0).toUpperCase()
color: row.selected ? Theme.accent : Theme.text
font.family: Theme.displayFont
font.pixelSize: 14
font.bold: true
}
}
ColumnLayout {
Layout.fillWidth: true
spacing: 1
Text {
Layout.fillWidth: true
text: row.modelData.name || "UNKNOWN TARGET"
color: row.selected ? Theme.accent : Theme.text
font.family: Theme.displayFont
font.pixelSize: 11
font.bold: row.selected
font.letterSpacing: 0.5
elide: Text.ElideRight
}
MicroText {
Layout.fillWidth: true
text: row.modelData.genericName || row.modelData.comment || "DESKTOP APPLICATION"
}
}
MicroText {
Layout.preferredWidth: 100
horizontalAlignment: Text.AlignRight
text: row.index === root.selectedIndex ? "LOCKED" : "AVAILABLE"
color: row.selected ? Theme.accent : Theme.muted
}
Rectangle {
Layout.preferredWidth: 38
Layout.preferredHeight: 6
color: Theme.textAlpha(0.05)
border.width: 1
border.color: Theme.hair
Rectangle {
width: row.selected ? parent.width : Math.max(5, parent.width * (1 - row.index / Math.max(1, root.apps.length)))
height: parent.height
color: row.selected ? Theme.accent : Theme.textAlpha(0.20)
}
}
}
}
Text {
anchors.centerIn: parent
visible: root.apps.length === 0
text: "NO EXECUTABLE TARGETS MATCH QUERY"
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
}
}
}
// Selected application inspector.
LauncherPanel {
id: inspector
x: 700
y: 34
width: 362
height: 508
panelId: "SEL"
title: "TARGET INSPECTOR"
meta: root.selectedApp ? "LOCKED" : "NO TARGET"
Item {
id: reticle
anchors.horizontalCenter: parent.horizontalCenter
y: 39
width: 126
height: 126
Rectangle {
anchors.centerIn: parent
width: 112
height: 112
radius: 56
color: Theme.textAlpha(0.015)
border.width: 1
border.color: Theme.accentAlpha(0.52)
}
Rectangle {
anchors.centerIn: parent
width: 84
height: 84
radius: 42
color: Theme.textAlpha(0)
border.width: 1
border.color: Theme.hair
}
Rectangle { anchors.centerIn: parent; width: 126; height: 1; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 1; height: 126; color: Theme.hair }
Rectangle {
anchors.centerIn: parent
width: 60
height: 60
color: Theme.surface
border.width: 1
border.color: Theme.accent
IconImage {
visible: root.showIcons
anchors.centerIn: parent
implicitSize: 44
source: root.showIcons && root.selectedApp
? Quickshell.iconPath(root.selectedApp.icon || "application-x-executable", "application-x-executable")
: ""
}
Text {
visible: !root.showIcons
anchors.centerIn: parent
text: root.selectedApp ? String(root.selectedApp.name || "?").charAt(0).toUpperCase() : "?"
color: Theme.accent
font.family: Theme.displayFont
font.pixelSize: 28
font.bold: true
}
}
Repeater {
model: 4
Rectangle {
required property int index
width: 5; height: 5
x: index % 2 === 0 ? 8 : reticle.width - 13
y: index < 2 ? 8 : reticle.height - 13
color: Theme.accent
}
}
}
Text {
anchors.top: reticle.bottom
anchors.topMargin: 14
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 34
horizontalAlignment: Text.AlignHCenter
text: root.selectedApp ? root.selectedApp.name : "NO TARGET"
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 19
font.bold: true
font.letterSpacing: 1
elide: Text.ElideRight
}
MicroText {
id: genericLabel
anchors.top: reticle.bottom
anchors.topMargin: 42
x: 18
width: parent.width - 36
horizontalAlignment: Text.AlignHCenter
text: root.selectedApp ? (root.selectedApp.genericName || "DESKTOP APPLICATION") : "AWAITING SEARCH VECTOR"
color: Theme.accent
}
Rectangle {
x: 18
anchors.top: genericLabel.bottom
anchors.topMargin: 12
width: parent.width - 36
height: 1
color: Theme.hair
}
MicroText {
id: description
x: 22
anchors.top: genericLabel.bottom
anchors.topMargin: 27
width: parent.width - 44
height: 42
text: root.selectedApp ? (root.selectedApp.comment || "No application description supplied by desktop entry.") : "Enter a designation to acquire an executable target."
wrapMode: Text.Wrap
elide: Text.ElideRight
maximumLineCount: 3
horizontalAlignment: Text.AlignHCenter
}
GridLayout {
id: telemetryGrid
x: 18
anchors.top: description.bottom
anchors.topMargin: 15
width: parent.width - 36
columns: 2
rowSpacing: 7
columnSpacing: 7
Repeater {
model: [
{ label: "ENTRY", value: "DESKTOP" },
{ label: "MODE", value: "DETACHED" },
{ label: "AUTH", value: "LOCAL USER" },
{ label: "INDEX", value: String(Math.max(0, root.selectedIndex + 1)).padStart(3, "0") }
]
Rectangle {
required property var modelData
Layout.fillWidth: true
Layout.preferredHeight: 46
color: Theme.textAlpha(0.025)
border.width: 1
border.color: Theme.hair
MicroText { x: 8; y: 7; width: parent.width - 16; text: modelData.label }
Text {
x: 8; y: 22; width: parent.width - 16
text: modelData.value
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 9
font.bold: true
font.letterSpacing: 0.6
elide: Text.ElideRight
}
}
}
}
Item {
x: 18
anchors.bottom: executeTile.top
anchors.bottomMargin: 12
width: parent.width - 36
height: 18
Row {
spacing: 5
Repeater {
model: 24
Rectangle {
required property int index
width: 7; height: 3
y: index % 3 === 0 ? 0 : 4
color: index < 16 ? Theme.accent : Theme.hair
transform: Rotation { angle: -35 }
}
}
}
}
MouseArea {
id: executeTile
x: 18
anchors.bottom: parent.bottom
anchors.bottomMargin: 14
width: parent.width - 36
height: 42
enabled: root.selectedApp !== null
hoverEnabled: true
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: root.launchRequested(root.selectedIndex)
Rectangle {
anchors.fill: parent
color: executeTile.containsMouse ? Theme.accent : Theme.accentAlpha(0.16)
border.width: 1
border.color: Theme.accent
Text {
anchors.centerIn: parent
text: root.selectedApp ? "EXECUTE SELECTED TARGET" : "NO TARGET ACQUIRED"
color: executeTile.containsMouse ? Theme.surface : Theme.accent
font.family: Theme.displayFont
font.pixelSize: 10
font.bold: true
font.letterSpacing: 1.2
}
}
}
}
// Dense command footer.
LauncherPanel {
x: 18
y: 550
width: 1044
height: 52
showHeader: false
chamfer: 9
RowLayout {
anchors.fill: parent
anchors.leftMargin: 16
anchors.rightMargin: 16
spacing: 18
MicroText { text: "INPUT CHANNEL // KEYBOARD"; color: Theme.accent }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 22; color: Theme.hair }
KeyHint { keyText: "↑ ↓"; actionText: "SELECT" }
KeyHint { keyText: "ENTER"; actionText: "EXECUTE" }
KeyHint { keyText: "ESC"; actionText: "ABORT" }
KeyHint { keyText: "CTRL+S"; actionText: "SORT" }
Item { Layout.fillWidth: true }
MicroText { text: "QRY:" + (root.query.length > 0 ? "ACTIVE" : "IDLE") }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 22; color: Theme.hair }
Repeater {
model: [
{ action: "logout", label: "LOGOUT" },
{ action: "reboot", label: "REBOOT" },
{ action: "shutdown", label: "SHUTDOWN" }
]
MouseArea {
id: powerButton
required property var modelData
readonly property bool armed: root.armedPower === modelData.action
Layout.preferredWidth: 96
Layout.preferredHeight: 26
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.pressPower(modelData.action)
Rectangle {
anchors.fill: parent
color: powerButton.armed ? Theme.hot : powerButton.containsMouse ? Theme.accentAlpha(0.28) : Theme.accentAlpha(0.10)
border.width: 1
border.color: powerButton.armed ? Theme.hot : powerButton.containsMouse ? Theme.accent : Theme.hair
}
Text {
anchors.centerIn: parent
text: powerButton.armed ? "CONFIRM" : powerButton.modelData.label
color: powerButton.armed ? Theme.surface : Theme.accent
font.family: Theme.microFont
font.pixelSize: 8
font.bold: true
font.letterSpacing: 1
}
}
}
}
}
}
}
@@ -0,0 +1,85 @@
import Quickshell
import Quickshell.Io
import QtQuick
// Non-visual app-search model for the launcher.
// Set `search`; read `apps` (a ranked, filtered list of DesktopEntry).
QtObject {
id: root
property string search: ""
// "usage" (most launched first) | "name". Persisted with the counts.
readonly property string sortMode: store.sortMode
function toggleSort() {
store.sortMode = store.sortMode === "usage" ? "name" : "usage";
}
function uses(a) {
return store.counts[a.id] ?? 0;
}
// `keywords`/`categories` come through as string lists, so coerce every
// field to a string before matching (String([]) joins with commas).
function haystack(a) {
return (String(a.name || "") + " " + String(a.genericName || "") + " " + String(a.comment || "") + " " + String(a.keywords || "")).toLowerCase();
}
function byOrder(x, y) {
if (root.sortMode === "usage") {
const d = root.uses(y) - root.uses(x);
if (d !== 0)
return d;
}
return String(x.name).localeCompare(String(y.name));
}
readonly property var apps: {
const all = DesktopEntries.applications.values.filter(a => !a.noDisplay);
const q = root.search.trim().toLowerCase();
if (q.length === 0)
return all.slice().sort(root.byOrder);
const matches = all.filter(a => root.haystack(a).includes(q));
// Prefix matches on the visible name rank first, then the sort mode.
return matches.slice().sort((x, y) => {
const xs = String(x.name).toLowerCase().startsWith(q) ? 0 : 1;
const ys = String(y.name).toLowerCase().startsWith(q) ? 0 : 1;
if (xs !== ys)
return xs - ys;
return root.byOrder(x, y);
});
}
function launch(index) {
const list = root.apps;
if (index >= 0 && index < list.length) {
const app = list[index];
app.execute();
// Reassigned, not mutated: an in-place write notifies nothing.
const counts = Object.assign({}, store.counts);
counts[app.id] = (counts[app.id] ?? 0) + 1;
store.counts = counts;
return true;
}
return false;
}
readonly property var file: FileView {
path: Quickshell.statePath("launcher.json")
onAdapterUpdated: writeAdapter()
onLoadFailed: error => {
if (error === FileViewError.FileNotFound)
writeAdapter();
}
JsonAdapter {
id: store
property string sortMode: "usage"
property var counts: ({})
}
}
}
@@ -0,0 +1,136 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import qs.HyprChrome.Theme
// Chamfered panel chrome for the launcher: outline, corner accent lines, and
// the optional header strip (id chip / title / meta / tick marks). Content is
// supplied as children by the call site.
//
// A sibling of BarPanel rather than a use of it: BarPanel is almost entirely
// density machinery (summary slot, animated height, state pair, transitions)
// for a rail that expands and collapses, and the launcher has exactly one
// density. Same reasoning as PolkitPanel — see that file.
//
// Carried over from widgets/bar/StatusBarPanel.qml, which the legacy launcher
// variants still use. Restyle this one freely; it is read only by the launcher.
Item {
id: panel
property string panelId: ""
property string title: ""
property string meta: ""
property bool showHeader: true
property int chamfer: 13
property int offsetY: 2
property int accentLineThickness: 3
Shape {
id: panelShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.surface
strokeColor: Theme.hair
strokeWidth: 1
startX: 0; startY: panel.offsetY
PathLine { x: panelShape.width - panel.chamfer; y: panel.offsetY }
PathLine { x: panelShape.width; y: panel.chamfer }
PathLine { x: panelShape.width; y: panelShape.height }
PathLine { x: panel.chamfer; y: panelShape.height }
PathLine { x: 0; y: panelShape.height - panel.chamfer }
PathLine { x: 0; y: panel.offsetY }
}
// Upper left accent line
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: 0
PathLine { x: Math.min(49, panelShape.width / 3); y: 0 }
PathLine { x: Math.min(49, panelShape.width / 3); y: panel.accentLineThickness }
PathLine { x: 0; y: panel.accentLineThickness }
PathLine { x: 0; y: 0 }
}
// Lower right accent line
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panelShape.width; startY: panelShape.height
PathLine { x: panelShape.width - Math.min(49, panelShape.width / 3); y: panelShape.height }
PathLine { x: panelShape.width - Math.min(49, panelShape.width / 3); y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height }
}
}
Rectangle {
visible: panel.showHeader
x: 1; y: 22
width: parent.width - 2
height: 1
color: Theme.text
opacity: 0.12
}
Rectangle {
visible: panel.showHeader
x: 5; y: 7
width: panel.panelId.length > 2 ? 29 : 24
height: 11
color: Theme.accent
Text {
anchors.centerIn: parent
text: panel.panelId
color: Theme.surface
font.family: Theme.microFont
font.pixelSize: 8
font.bold: true
}
}
Text {
visible: panel.showHeader
x: 40; y: 7
width: parent.width - 105
text: panel.title
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 9
font.bold: true
font.letterSpacing: 1.1
elide: Text.ElideRight
}
// Inlined rather than reusing DenseBarContent's MicroText, which is an
// inline component and therefore not visible from another file.
Text {
visible: panel.showHeader && panel.meta.length > 0
anchors.right: parent.right
anchors.rightMargin: 12
y: 6
text: panel.meta
width: Math.min(80, parent.width / 4)
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 6
font.letterSpacing: 0.7
horizontalAlignment: Text.AlignRight
elide: Text.ElideRight
}
Row {
visible: panel.showHeader
anchors.right: parent.right
anchors.rightMargin: 10
y: 14
spacing: 2
Repeater {
model: 5
Rectangle { required property int index; width: 4; height: 2; color: Theme.accent }
}
}
}
@@ -0,0 +1,208 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import Quickshell.Services.Pam
import qs.HyprChrome.Widgets.Greeter
// ext-session-lock screen: the greeter's panel on every output, so whichever
// one Hyprland gives the keyboard has a field. Runs as its own instance
// (lock.qml) so a reload of the main shell cannot drop the lock; exits once
// unlocked.
Scope {
id: root
readonly property string userName: Quickshell.env("USER") ?? ""
readonly property string hostName: hostFile.text().trim() || "localhost"
// Typed password, held until PAM's first secret prompt arrives.
property string pendingSecret: ""
// PAM asked a follow-up (OTP etc.) that the user must answer directly.
property bool awaitingResponse: false
property bool busy: false
property bool unlocking: false
property string message: ""
property bool messageIsError: false
property bool failed: false
property string inputPrompt: ""
property bool responseVisible: false
property date now: new Date()
// Each surface keeps its own field; this resets all of them.
signal resetSecret
function setMessage(text, isError) {
root.message = text;
root.messageIsError = isError;
}
function resetToPassword() {
root.pendingSecret = "";
root.awaitingResponse = false;
root.busy = false;
root.inputPrompt = "";
root.responseVisible = false;
root.resetSecret();
}
function submit(secret) {
root.failed = false;
if (root.awaitingResponse) {
root.awaitingResponse = false;
root.busy = true;
root.resetSecret();
pam.respond(secret);
return;
}
if (pam.active)
return;
root.setMessage("", false);
root.pendingSecret = secret;
root.busy = true;
if (!pam.start()) {
root.resetToPassword();
root.setMessage("pam failed to start", true);
}
}
FileView {
id: hostFile
path: "/etc/hostname"
blockLoading: true
}
PamContext {
id: pam
// security.pam.services.hyprchrome-lock (services/desktop/desktop-hyprland.nix).
config: "hyprchrome-lock"
user: root.userName
onPamMessage: {
if (!pam.responseRequired) {
root.setMessage(pam.message, pam.messageIsError);
return;
}
// First hidden prompt is the password already typed.
if (root.pendingSecret !== "" && !pam.responseVisible) {
const secret = root.pendingSecret;
root.pendingSecret = "";
pam.respond(secret);
return;
}
root.busy = false;
root.awaitingResponse = true;
root.inputPrompt = pam.message.replace(/:\s*$/, "");
root.responseVisible = pam.responseVisible;
root.resetSecret();
}
onCompleted: result => {
if (result === PamResult.Success) {
root.setMessage("unlocked", false);
root.unlocking = true;
return;
}
root.resetToPassword();
root.failed = true;
root.setMessage(result === PamResult.MaxTries ? "too many attempts" : "authentication failed", true);
}
onError: error => {
root.resetToPassword();
root.setMessage(PamError.toString(error), true);
}
}
// Fade out, then release the outputs. The quit is deferred so the unlock
// request is flushed before the connection closes; exiting while still
// locked would leave Hyprland's "lock app died" screen up.
Timer {
running: root.unlocking
interval: 220
onTriggered: {
lock.locked = false;
quitTimer.start();
}
}
Timer {
id: quitTimer
interval: 100
onTriggered: Qt.quit()
}
Timer {
running: true
repeat: true
interval: 1000
triggeredOnStart: true
onTriggered: root.now = new Date()
}
WlSessionLock {
id: lock
locked: true
WlSessionLockSurface {
color: "transparent"
LockBackdrop {
anchors.fill: parent
}
LoginContent {
id: content
width: 640
anchors.horizontalCenter: parent.horizontalCenter
y: Math.max(32, Math.round(parent.height * 0.42 - height / 2)) + (1 - opacity) * 12
opacity: root.unlocking ? 0 : 1
Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } }
title: "LOCKED // " + root.hostName.toUpperCase()
panelId: "LCK"
meta: "PAM"
submitLabel: "UNLOCK"
userEditable: false
showPower: false
hostName: root.hostName
sessionName: "hyprland"
user: root.userName
now: root.now
busy: root.busy || root.unlocking
message: root.message
messageIsError: root.messageIsError
failed: root.failed
inputPrompt: root.inputPrompt
responseVisible: root.responseVisible
onSubmitted: (user, secret) => root.submit(secret)
Component.onCompleted: content.focusSecret()
Connections {
target: root
function onResetSecret() {
content.clearSecret();
content.focusSecret();
}
}
}
}
}
}
@@ -0,0 +1,86 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
// ChromeBackdrop's drafting grid at full dim, as a plain Item: a lock surface
// cannot host a PanelWindow, and nothing behind it is shown anyway.
Item {
id: root
property int gridSpacing: 60
property real gridOpacity: 0.10
property real crossOpacity: 0.15
property int crossSize: 20
property int crossWeight: 3
readonly property color gridColor: Qt.hsla(Theme.accent.hslHue,
Theme.accent.hslSaturation * 0.45,
Theme.accent.hslLightness,
1)
Rectangle {
anchors.fill: parent
color: Theme.surface
}
Repeater {
model: Math.ceil(root.width / root.gridSpacing)
Rectangle {
required property int index
x: index * root.gridSpacing
width: 1
height: root.height
color: root.gridColor
opacity: root.gridOpacity
}
}
Repeater {
model: Math.ceil(root.height / root.gridSpacing)
Rectangle {
required property int index
y: index * root.gridSpacing
width: root.width
height: 1
color: root.gridColor
opacity: root.gridOpacity
}
}
Repeater {
id: crosses
readonly property int columns: Math.ceil(root.width / (root.gridSpacing * 2)) + 1
readonly property int rows: Math.ceil(root.height / (root.gridSpacing * 2)) + 1
model: columns * rows
Item {
required property int index
x: (index % crosses.columns) * root.gridSpacing * 2 - Math.floor(root.crossSize / 2)
y: Math.floor(index / crosses.columns) * root.gridSpacing * 2 - Math.floor(root.crossSize / 2)
width: root.crossSize
height: root.crossSize
opacity: root.crossOpacity
Rectangle {
y: Math.floor(root.crossSize / 2) - Math.floor(root.crossWeight / 2)
width: parent.width
height: root.crossWeight
color: Theme.muted
}
Rectangle {
x: Math.floor(root.crossSize / 2) - Math.floor(root.crossWeight / 2)
width: root.crossWeight
height: parent.height
color: Theme.muted
}
}
}
}
@@ -0,0 +1,272 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import qs.HyprChrome.Theme
// Headlessly renderable visual core of one notification. Every field arrives as
// a plain property and every action leaves as a signal; Notifications.qml maps
// the server's Notification onto it.
//
// Owns its own expiry: the drain meter IS the timer, so hovering pauses both.
Item {
id: root
property string appName: ""
property string summary: ""
property string body: ""
// Icon name, path or URL; `image` (avatar, album art) wins over it.
property string appIcon: ""
property string image: ""
// 0 low, 1 normal, 2 critical — NotificationUrgency's values.
property int urgency: 1
property string time: ""
// Read structurally ({ identifier, text }). The "default" action is the
// card's own click, not a chip.
property var actions: []
// Milliseconds; 0 never expires.
property int timeout: 0
// Off for headless renders, which set `remaining` directly.
property bool countdown: true
property real remaining: 1
signal dismissed
signal expired
signal actionInvoked(string identifier)
readonly property bool critical: root.urgency === 2
readonly property color tint: root.critical ? Theme.hot : root.urgency === 0 ? Theme.muted : Theme.accent
readonly property var chipActions: {
const out = [];
for (let i = 0; i < root.actions.length; i++) {
if (root.actions[i].identifier !== "default")
out.push(root.actions[i]);
}
return out;
}
readonly property bool hasDefault: root.chipActions.length !== root.actions.length
readonly property string iconSource: {
const s = root.image !== "" ? root.image : root.appIcon;
if (s === "")
return "";
if (s.startsWith("/"))
return "file://" + s;
if (s.includes(":/"))
return s;
return Quickshell.iconPath(s, true);
}
implicitWidth: 360
implicitHeight: panel.implicitHeight
NumberAnimation on remaining {
id: drain
from: 1
to: 0
duration: Math.max(1, root.timeout)
running: root.countdown && root.timeout > 0
paused: running && hover.hovered
}
// Not drain's finished(): a value-source animation need not emit it.
onRemainingChanged: {
if (root.remaining <= 0 && root.countdown && root.timeout > 0)
root.expired();
}
HoverHandler {
id: hover
}
// Under the panel, so the close box and chips take their own clicks.
MouseArea {
anchors.fill: parent
cursorShape: root.hasDefault ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: {
if (root.hasDefault)
root.actionInvoked("default");
else
root.dismissed();
}
}
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.9
elide: Text.ElideRight
}
NotificationPanel {
id: panel
width: root.width
panelId: root.critical ? "CRT" : root.urgency === 0 ? "LOW" : "NTF"
title: (root.appName !== "" ? root.appName : "NOTIFICATION").toUpperCase()
meta: root.time
accentColor: root.tint
onCloseRequested: root.dismissed()
ColumnLayout {
width: parent.width
spacing: 8
RowLayout {
Layout.fillWidth: true
spacing: 10
// Framed, so a transparent icon still reads as a tile.
Rectangle {
Layout.alignment: Qt.AlignTop
visible: root.iconSource !== ""
implicitWidth: 40
implicitHeight: 40
color: Theme.selection
border.width: 1
border.color: Theme.hair
IconImage {
anchors.centerIn: parent
implicitSize: root.image !== "" ? 38 : 28
source: root.iconSource
}
}
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop
spacing: 3
Text {
Layout.fillWidth: true
visible: root.summary !== ""
text: root.summary
textFormat: Text.PlainText
wrapMode: Text.Wrap
maximumLineCount: 2
elide: Text.ElideRight
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
font.letterSpacing: 0.4
}
// Body markup is advertised, so StyledText, never RichText.
Text {
Layout.fillWidth: true
visible: root.body !== ""
text: root.body
textFormat: Text.StyledText
wrapMode: Text.Wrap
maximumLineCount: 5
elide: Text.ElideRight
color: Theme.textAlpha(0.72)
linkColor: root.tint
font.family: Theme.displayFont
font.pixelSize: 11
font.letterSpacing: 0.3
onLinkActivated: link => Qt.openUrlExternally(link)
}
}
}
Flow {
Layout.fillWidth: true
visible: root.chipActions.length > 0
spacing: 6
Repeater {
model: root.chipActions
Rectangle {
id: chip
required property var modelData
width: chipLabel.implicitWidth + 16
height: chipLabel.implicitHeight + 10
color: chipArea.containsMouse ? root.tint : "transparent"
border.width: 1
border.color: chipArea.containsMouse ? root.tint : Theme.disabled
Text {
id: chipLabel
anchors.centerIn: parent
text: chip.modelData.text.toUpperCase()
color: chipArea.containsMouse ? Theme.surface : Theme.text
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 0.8
}
MouseArea {
id: chipArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.actionInvoked(chip.modelData.identifier)
}
}
}
}
// Expiry drain; a sticky card states it instead.
RowLayout {
Layout.fillWidth: true
spacing: 8
Row {
id: meter
readonly property int segments: 24
Layout.fillWidth: true
Layout.preferredHeight: 4
visible: root.timeout > 0
spacing: 2
Repeater {
model: meter.segments
Rectangle {
required property int index
readonly property bool lit: index < Math.ceil(root.remaining * meter.segments)
width: Math.max(2, (meter.width - (meter.segments - 1) * meter.spacing) / meter.segments)
height: meter.height
color: lit ? root.tint : Theme.textAlpha(0.06)
border.width: 1
border.color: lit ? root.tint : Theme.textAlpha(0.18)
}
}
}
MicroText {
visible: root.timeout > 0
text: hover.hovered ? "HOLD" : Math.ceil(root.remaining * root.timeout / 1000) + "S"
color: hover.hovered ? root.tint : Theme.muted
}
MicroText {
Layout.fillWidth: true
visible: root.timeout <= 0
text: root.critical ? "CRITICAL · STICKY" : "STICKY"
color: root.critical ? Theme.hot : Theme.muted
}
}
}
}
}
@@ -0,0 +1,210 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import qs.HyprChrome.Theme
// Chamfered chrome for one notification card: PolkitPanel's silhouette, tighter
// metrics, a tintable accent (urgency) and a close box in the header.
//
// Not PolkitPanel itself: that file is the prompt's alone to restyle.
Item {
id: panel
property string panelId: ""
property string title: ""
property string meta: ""
property color accentColor: Theme.accent
property int chamfer: 12
property int padding: 12
property int outlineWidth: 1
property int accentLineThickness: 3
readonly property int headerHeight: 26
property int headerGap: 10
readonly property int headerPadding: 8
property real capGap: 4
readonly property real capOffset: panel.capGap / Math.SQRT2
readonly property real activeChamfer: Math.max(2, Math.min(panel.chamfer, panel.height / 2 - 1))
readonly property real accentLineWidth: Math.min(panel.width, slugChip.width + panel.headerPadding * 2)
default property alias content: body.data
signal closeRequested
implicitHeight: Math.round(body.y + body.height + panel.padding)
Shape {
id: panelShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.surface
strokeColor: Theme.hair
strokeWidth: panel.outlineWidth
startX: 0; startY: 0
PathLine { x: panelShape.width - panel.activeChamfer; y: 0 }
PathLine { x: panelShape.width; y: panel.activeChamfer }
PathLine { x: panelShape.width; y: panelShape.height }
PathLine { x: panel.activeChamfer; y: panelShape.height }
PathLine { x: 0; y: panelShape.height - panel.activeChamfer }
PathLine { x: 0; y: 0 }
}
ShapePath {
fillColor: panel.accentColor
strokeWidth: 0
startX: panelShape.width - panel.activeChamfer + panel.capOffset
startY: -panel.capOffset
PathLine { x: panelShape.width + panel.capOffset; y: panel.activeChamfer - panel.capOffset }
PathLine { x: panelShape.width + panel.capOffset; y: -panel.capOffset }
PathLine { x: panelShape.width - panel.activeChamfer + panel.capOffset; y: -panel.capOffset }
}
ShapePath {
fillColor: panel.accentColor
strokeWidth: 0
startX: panel.activeChamfer - panel.capOffset
startY: panelShape.height + panel.capOffset
PathLine { x: -panel.capOffset; y: panelShape.height - panel.activeChamfer + panel.capOffset }
PathLine { x: -panel.capOffset; y: panelShape.height + panel.capOffset }
PathLine { x: panel.activeChamfer - panel.capOffset; y: panelShape.height + panel.capOffset }
}
ShapePath {
fillColor: panel.accentColor
strokeWidth: 0
startX: 0; startY: 0
PathLine { x: panel.accentLineWidth; y: 0 }
PathLine { x: panel.accentLineWidth; y: panel.accentLineThickness }
PathLine { x: 0; y: panel.accentLineThickness }
PathLine { x: 0; y: 0 }
}
ShapePath {
fillColor: panel.accentColor
strokeWidth: 0
startX: panelShape.width; startY: panelShape.height
PathLine { x: panelShape.width - panel.accentLineWidth; y: panelShape.height }
PathLine { x: panelShape.width - panel.accentLineWidth; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height }
}
}
Row {
id: headerRow
x: panel.headerPadding
y: Math.round((panel.headerHeight - height) / 2)
width: headerEnd.x - x - 8
spacing: panel.headerPadding + 6
Rectangle {
id: slugChip
width: slugText.implicitWidth + 8
height: slugText.implicitHeight + 4
color: panel.accentColor
Text {
id: slugText
anchors.centerIn: parent
text: panel.panelId
color: Theme.surface
font.family: Theme.microFont
font.pixelSize: 10
font.bold: true
}
}
Text {
anchors.verticalCenter: slugChip.verticalCenter
width: Math.max(0, headerRow.width - slugChip.width - headerRow.spacing)
text: panel.title
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 11
font.bold: true
font.letterSpacing: 1.1
elide: Text.ElideRight
}
}
Row {
id: headerEnd
// Clear of the top-right chamfer.
anchors.right: parent.right
anchors.rightMargin: panel.activeChamfer + 2
y: Math.round((panel.headerHeight - height) / 2)
spacing: 8
Text {
anchors.verticalCenter: parent.verticalCenter
visible: panel.meta.length > 0
text: panel.meta
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.7
}
Rectangle {
id: closeBox
width: 16
height: 16
color: closeArea.containsMouse ? panel.accentColor : "transparent"
border.width: 1
border.color: closeArea.containsMouse ? panel.accentColor : Theme.disabled
Text {
anchors.centerIn: parent
text: "✕"
color: closeArea.containsMouse ? Theme.surface : Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.bold: true
}
MouseArea {
id: closeArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: panel.closeRequested()
}
}
}
Rectangle {
x: 1
y: panel.headerHeight
width: parent.width - 2
height: 1
color: Theme.text
opacity: 0.12
}
// Measured by childrenRect: children carry their own size, no anchoring.
Item {
id: body
x: panel.padding
y: panel.headerHeight + panel.headerGap
width: Math.max(0, panel.width - panel.padding * 2)
height: childrenRect.height
}
}
@@ -0,0 +1,131 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Services.Notifications
import Quickshell.Wayland
import QtQuick
// Notification daemon and its popup stack, migrated from widgets/notifications.
// Owns the server and the surface; NotificationCard is the visual core.
Scope {
id: root
// Driven by the shell: the rail's monitor.
property var screen: null
// Arrival time per notification id; the server keeps none.
property var arrived: ({})
// expireTimeout is in ms (verified); -1 means "server default".
function timeoutFor(n) {
if (n.expireTimeout > 0)
return n.expireTimeout;
if (n.expireTimeout === 0 || n.urgency === NotificationUrgency.Critical)
return 0;
return 5000;
}
NotificationServer {
id: server
keepOnReload: true
bodySupported: true
bodyMarkupSupported: true
bodyHyperlinksSupported: true
imageSupported: true
actionsSupported: true
onNotification: notification => {
const id = notification.id;
root.arrived[id] = Qt.formatTime(new Date(), "hh:mm");
notification.closed.connect(() => delete root.arrived[id]);
notification.tracked = true;
}
}
PanelWindow {
id: win
screen: root.screen
visible: server.trackedNotifications.values.length > 0
WlrLayershell.namespace: "hyprchrome-notifications"
WlrLayershell.layer: WlrLayer.Overlay
// Normal with no zone of its own: sits below the rail's exclusive zone.
exclusionMode: ExclusionMode.Normal
color: "transparent"
anchors {
top: true
right: true
}
margins.top: 12
margins.right: 16
// Slack on every side for the corner caps, which sit outside each card.
implicitWidth: 360 + 8
implicitHeight: Math.max(1, stack.implicitHeight + 8)
mask: Region {
item: stack
}
Column {
id: stack
x: 4
y: 4
width: 360
spacing: 14
Repeater {
model: server.trackedNotifications
NotificationCard {
id: card
required property Notification modelData
width: stack.width
appName: card.modelData.appName
summary: card.modelData.summary
body: card.modelData.body
appIcon: card.modelData.appIcon
image: card.modelData.image
urgency: card.modelData.urgency
time: root.arrived[card.modelData.id] ?? ""
actions: card.modelData.actions
timeout: root.timeoutFor(card.modelData)
onDismissed: card.modelData.dismiss()
onExpired: card.modelData.expire()
// invoke() closes a non-resident notification itself.
onActionInvoked: identifier => {
const actions = card.modelData.actions;
for (let i = 0; i < actions.length; i++) {
if (actions[i].identifier === identifier) {
actions[i].invoke();
return;
}
}
}
// Slides in from the right edge.
opacity: 0
transform: Translate { id: slide; x: 40 }
Component.onCompleted: enter.start()
ParallelAnimation {
id: enter
NumberAnimation { target: card; property: "opacity"; to: 1; duration: 160; easing.type: Easing.OutCubic }
NumberAnimation { target: slide; property: "x"; to: 0; duration: 200; easing.type: Easing.OutCubic }
}
}
}
}
}
}
@@ -0,0 +1,206 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import qs.HyprChrome.Theme
// Panel chrome for the authentication dialog.
//
// Deliberately NOT BarPanel. The rail's panel exists to carry two renderings of
// the same data and cross-fade between them as the rail changes density, and
// almost all of its size is that machinery: the summary slot, the animated
// height, the state pair, the transitions. A modal has exactly one density and
// never collapses, so inheriting all of that would mean carrying dead weight
// and, worse, tying the dialog's look to a component whose real job is the rail
// — every restyle here would have to be justified against the panels up there.
//
// What it does keep is the silhouette, because that is the shell's visual
// signature rather than the rail's: two cut corners (top-right, bottom-left)
// with detached accent caps outside them, an accent rule under the header slug,
// its mirror at the lower right, and a header strip of slug / title / meta.
//
// This is the file to edit to restyle the prompt. Nothing else reads it.
Item {
id: panel
property string panelId: ""
property string title: ""
property string meta: ""
// Header strip only: body and header rule hidden.
property bool collapsed: false
property int chamfer: 16
property int padding: 14
property int outlineWidth: 1
property int accentLineThickness: 3
readonly property int headerHeight: 30
// Gap between the header rule and the body.
property int headerGap: 10
readonly property int headerPadding: 10
// Detached corner caps: the corner each chamfer removed, put back outside
// the panel as an accent triangle whose hypotenuse faces the cut. capGap is
// the perpendicular distance from the cut, so the per-axis shift is it over
// root 2 — the cap moves along the cut's normal, not along an axis.
property real capGap: 4
readonly property real capOffset: panel.capGap / Math.SQRT2
// Never let the two cuts cross, which would turn the outline inside out on
// a panel shorter than twice the chamfer.
readonly property real activeChamfer: Math.max(2, Math.min(panel.chamfer, panel.height / 2 - 1))
// The accent rule under the slug is sized to the slug, not to the panel.
readonly property real accentLineWidth: Math.min(panel.width, slugChip.width + panel.headerPadding * 2)
default property alias content: body.data
implicitHeight: panel.collapsed ? panel.headerHeight : Math.round(body.y + body.height + panel.padding)
Shape {
id: panelShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
// Outline: square except for the two cut corners.
ShapePath {
fillColor: Theme.surface
strokeColor: Theme.hair
strokeWidth: panel.outlineWidth
startX: 0; startY: 0
PathLine { x: panelShape.width - panel.activeChamfer; y: 0 }
PathLine { x: panelShape.width; y: panel.activeChamfer }
PathLine { x: panelShape.width; y: panelShape.height }
PathLine { x: panel.activeChamfer; y: panelShape.height }
PathLine { x: 0; y: panelShape.height - panel.activeChamfer }
PathLine { x: 0; y: 0 }
}
// Cap on the top-right cut.
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panelShape.width - panel.activeChamfer + panel.capOffset
startY: -panel.capOffset
PathLine { x: panelShape.width + panel.capOffset; y: panel.activeChamfer - panel.capOffset }
PathLine { x: panelShape.width + panel.capOffset; y: -panel.capOffset }
PathLine { x: panelShape.width - panel.activeChamfer + panel.capOffset; y: -panel.capOffset }
}
// Cap on the bottom-left cut, the same triangle mirrored.
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panel.activeChamfer - panel.capOffset
startY: panelShape.height + panel.capOffset
PathLine { x: -panel.capOffset; y: panelShape.height - panel.activeChamfer + panel.capOffset }
PathLine { x: -panel.capOffset; y: panelShape.height + panel.capOffset }
PathLine { x: panel.activeChamfer - panel.capOffset; y: panelShape.height + panel.capOffset }
}
// Accent rule under the slug.
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: 0
PathLine { x: panel.accentLineWidth; y: 0 }
PathLine { x: panel.accentLineWidth; y: panel.accentLineThickness }
PathLine { x: 0; y: panel.accentLineThickness }
PathLine { x: 0; y: 0 }
}
// Its mirror at the lower right.
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panelShape.width; startY: panelShape.height
PathLine { x: panelShape.width - panel.accentLineWidth; y: panelShape.height }
PathLine { x: panelShape.width - panel.accentLineWidth; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height }
}
}
// Header: slug chip, title, and the meta text pinned right.
Row {
id: headerRow
x: panel.headerPadding
y: Math.round((panel.headerHeight - height) / 2)
spacing: panel.headerPadding + 6
Rectangle {
id: slugChip
width: slugText.implicitWidth + 8
height: slugText.implicitHeight + 4
color: Theme.accent
Text {
id: slugText
anchors.centerIn: parent
text: panel.panelId
color: Theme.surface
font.family: Theme.microFont
font.pixelSize: 11
font.bold: true
}
}
Text {
anchors.verticalCenter: slugChip.verticalCenter
text: panel.title
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 12
font.bold: true
font.letterSpacing: 1.1
elide: Text.ElideRight
}
}
Text {
anchors.right: parent.right
anchors.rightMargin: panel.headerPadding + 2
y: Math.round((panel.headerHeight - implicitHeight) / 2)
visible: panel.meta.length > 0
text: panel.meta
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.7
horizontalAlignment: Text.AlignRight
elide: Text.ElideRight
}
// Header rule.
Rectangle {
visible: !panel.collapsed
x: 1
y: panel.headerHeight
width: parent.width - 2
height: 1
color: Theme.text
opacity: 0.12
}
// Body. Measured by childrenRect, so a child must carry its own size and
// must NOT anchor to this slot.
Item {
id: body
visible: !panel.collapsed
x: panel.padding
y: panel.headerHeight + panel.headerGap
width: Math.max(0, panel.width - panel.padding * 2)
height: childrenRect.height
}
}
@@ -0,0 +1,281 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Polkit
import qs.HyprChrome.Theme
// Polkit authentication agent for the hyprchrome shell.
//
// Instantiating PolkitAgent IS the registration — it registers a listener for
// this logind session in componentComplete(), so there is nothing to start and
// nothing to call. Two consequences:
//
// * Only ONE agent may hold a session. hyprpolkitagent must not be running
// (home/desktop/hyprland.nix autostart), or registration fails and this
// dialog silently never appears. `isRegistered` is the check.
// * `path` is write-once — the binary refuses a later assignment with
// "cannot change path after it has been set." Set it here or not at all.
//
// Concurrent requests SUPERSEDE each other — they do not queue. Verified
// against a live trace of two simultaneous `pkexec` calls: both logged
// "activating authentication request" back to back, each with its own cookie
// and its own "setting up session", with no wait for the first to finish.
// `agent.flow` simply becomes the newest request.
//
// The consequence is that the earlier request is ORPHANED: its PAM session is
// live and polkit is still waiting on it, but nothing in QML can reach it any
// more, so its caller hangs until it gives up and polkit cancels — which
// surfaces as quickshell's "the cancelled request was not found in the queue".
// This dialog therefore shows the newest request and loses the older one. See
// the flow-change handler below; fixing it properly means holding superseded
// flows in QML and re-presenting them, which is only worth doing if concurrent
// authorization prompts turn out to happen in practice.
//
// Everything below re-latches per flow instead of caching it.
//
// The visual core lives in PolkitPromptContent so it can be rendered headlessly
// and staged in DebugWindow; this file owns the agent, the surface and focus.
Scope {
id: root
// Which output the dialog appears on. Driven by the shell, which puts it on
// the focused monitor rather than on the rail's — a password prompt belongs
// where the user is looking. Left unset it falls back to whatever screen
// quickshell picks, which is right for a single-monitor session.
property var screen: null
// Where the flow's identity list is currently pointed. Held here rather
// than read back off the flow because the content addresses identities by
// index and AuthFlow addresses them by object.
readonly property var flow: agent.flow
// Whether this shell actually holds the session's agent. Exposed because
// failure is invisible from the outside: an unregistered agent simply never
// shows a dialog, which looks exactly like "no one asked for authorization".
readonly property alias registered: agent.isRegistered
// Whether a request is being presented. Both surfaces read it, so it is
// decided once here rather than each deriving it — the scrim and the dialog
// must come and go on the same frame.
//
// isCompleted is checked as well as null: the flow reports its terminal
// state before the agent drops it, and neither surface should linger for
// those frames over a request that has already been decided.
readonly property bool prompting: root.flow !== null && !root.flow.isCompleted
// Reset per REQUEST, not per window show.
//
// A second request supersedes the first by swapping `flow` while the dialog
// is already up, so the window never hides in between. Keying the reset off
// the surface's visibility therefore skips that swap entirely and the new
// request inherits whatever was typed for the old one — a password entered
// for one action left sitting in the box for a different action. The flow
// object changing is the event that actually means "new request".
// Do NOT cancel the superseded flow here. It is tempting — a superseded
// request is unreachable but still live, so its caller hangs until killed,
// and cancelling would at least fail it fast. Tried, and it makes things
// strictly worse: cancelling a flow that is no longer the agent's active
// one tears down state the CURRENT request still needs, and quickshell then
// logs
//
// QObject::connect(AuthFlow, PolkitAgentImpl): invalid nullptr parameter
//
// leaving the live request with a broken agent and no dialog at all. So the
// superseded request is dismissed and the one the user can actually see
// never appears. Leaving it orphaned costs one hung caller; cancelling it
// costs the prompt as well.
onFlowChanged: {
vault.invalidate();
if (root.flow) {
content.clearResponse();
content.focusInput();
// Prefetched so Tab is instant; the list stays from the last
// request while this refreshes.
vault.refresh();
}
}
ProtonPass {
id: vault
onFetched: secret => {
content.response = secret;
content.focusInput();
}
}
function identityIndex(flow) {
if (!flow || !flow.selectedIdentity)
return 0;
for (let i = 0; i < flow.identities.length; i++) {
if (flow.identities[i] === flow.selectedIdentity)
return i;
}
return 0;
}
PolkitAgent {
id: agent
// Default is /org/quickshell/PolkitAgent; named explicitly because it
// cannot be changed after startup and a second shell would collide.
path: "/org/quickshell/PolkitAgent"
onIsRegisteredChanged: {
if (agent.isRegistered)
console.info("polkit: agent registered at", agent.path);
else
console.warn("polkit: agent lost its registration — this session now has no polkit agent");
}
}
// Registration is ASYNCHRONOUS. It is started in the agent's
// componentComplete but only lands a DBus round trip later — measured at
// under 250ms here, still false at Component.onCompleted. So neither an
// immediate check nor the change handler above can report a total failure:
// an agent that never registers stays false from construction onward and
// changes nothing, which is silence rather than an error. Hence a deadline.
//
// Hot reload is fine: quickshell hands the listener to the new generation
// ("taking over listener from previous generation") and isRegistered goes
// true again, verified on a live reload.
//
// Do NOT turn this into a rebuild-and-retry loop. Tried, with the agent in
// a Loader so a fresh one could be constructed. It cannot work: the subject
// polkit means is the SESSION, this process already holds a listener for
// it, and so every rebuilt agent fails identically with
//
// ...PolicyKit1.Error.Failed:
// An authentication agent already exists for the given subject
//
// Nothing QML can do releases that listener. The one time registration did
// fail across a reload, the cause was upstream state already corrupted by
// cancelling a superseded flow (see the flow handler above) — not the
// reload itself, and not something a retry would have recovered.
Timer {
interval: 2000
running: true
onTriggered: {
if (!agent.isRegistered)
console.warn("polkit: agent still unregistered after 2s — another agent (hyprpolkitagent, polkit-gnome, cosmic-osd) is probably holding this session");
}
}
// No scrim of its own. The shell owns the single ChromeBackdrop and raises
// it for either cause — an expanded rail or an open prompt — so a prompt
// arriving over an already-expanded rail reuses the scrim that is already
// there instead of stacking a second one on top of it. `prompting` above is
// what the shell reads to decide. See HyprChromeShell.
PanelWindow {
id: win
screen: root.screen
visible: root.prompting
WlrLayershell.layer: WlrLayer.Overlay
// A real modal — unlike the rest of the rail, this one must take the
// keyboard, or the password goes to whatever window was focused.
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
exclusionMode: ExclusionMode.Ignore
color: Theme.textAlpha(0)
anchors {
top: true
left: true
right: true
bottom: true
}
// No scrim here — ChromeBackdrop above draws it. This surface stays
// transparent but unmasked, so it still swallows clicks across the
// whole output: a polkit request is answered or explicitly cancelled,
// and losing one to a stray click on the wallpaper would leave the
// caller waiting with no visible reason.
PolkitPromptContent {
id: content
// A third of the way down rather than centred: a password prompt
// reads better above the middle, and on a tall output dead-centre
// puts it below the natural resting line of the eye.
//
// The panel's own CENTRE lands on the third, so the dialog grows
// symmetrically about that line as the message wraps or a pam_info
// line appears. Floored at the same margin the width leaves, so a
// tall prompt on a short output cannot be pushed off the top.
anchors.horizontalCenter: parent.horizontalCenter
y: Math.max(32, Math.round(parent.height / 3 - content.dialogHeight / 2))
width: 520
message: root.flow ? root.flow.message : ""
actionId: root.flow ? root.flow.actionId : ""
iconName: root.flow ? root.flow.iconName : ""
identities: root.flow ? root.flow.identities : []
selectedIdentity: root.identityIndex(root.flow)
responseRequired: root.flow ? root.flow.isResponseRequired : false
inputPrompt: root.flow ? root.flow.inputPrompt : ""
responseVisible: root.flow ? root.flow.responseVisible : false
supplementaryMessage: root.flow ? root.flow.supplementaryMessage : ""
supplementaryIsError: root.flow ? root.flow.supplementaryIsError : false
failed: root.flow ? root.flow.failed : false
credentialsEnabled: true
credentials: vault.entries
credentialsStatus: vault.listStatus
fetchStatus: vault.fetchStatus
onCredentialRequested: entry => vault.fetch(entry)
onPickerOpened: {
if (vault.entries.length === 0)
vault.refresh();
}
onSubmitted: value => {
if (root.flow)
root.flow.submit(value);
}
onCancelled: {
if (root.flow)
root.flow.cancelAuthenticationRequest();
}
// AuthFlow refuses a null identity, so the index is bounds-checked
// here rather than trusting the view.
onIdentityRequested: index => {
if (root.flow && index >= 0 && index < root.flow.identities.length)
root.flow.selectedIdentity = root.flow.identities[index];
}
}
// Wipe the box on a rejected attempt. `failed` flags the attempt, not
// the request — polkit lets PAM retry, and the flow stays live with a
// fresh prompt, so the field has to be cleared without closing.
Connections {
target: root.flow
enabled: root.flow !== null
function onFailedChanged() {
if (root.flow.failed) {
vault.invalidate();
content.clearResponse();
}
}
// Re-focus when the conversation asks for something. This is load
// bearing, not defensive: a flow arrives with isResponseRequired
// FALSE and an empty inputPrompt — PAM has not asked yet — so the
// window becomes visible while the field is still disabled, and the
// focusInput() below it cannot land. The prompt shows up a moment
// later, and that is the edge that must take the keyboard. The same
// handler covers a second factor and a post-failure retry.
function onIsResponseRequiredChanged() {
if (root.flow.isResponseRequired)
content.focusInput();
}
}
}
}
@@ -0,0 +1,778 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import qs.HyprChrome.Theme
// Headlessly renderable visual core of the polkit authentication prompt.
//
// Nothing here imports Quickshell.Services.Polkit: every field an AuthFlow
// exposes arrives as a plain property and every action leaves as a signal, so
// the whole dialog can be rendered offscreen (tools/quickshell-preview) and
// staged in DebugWindow without a real authorization request. PolkitPrompt.qml
// owns the agent and does the mapping.
//
// `identities` is read structurally — each entry only needs `displayName` — so
// the adapter can hand over the flow's QList<Identity*> unchanged while the
// headless test passes plain JS objects.
Item {
id: root
// ---- flow state, mirrored ----
property string message: ""
property string actionId: ""
property string iconName: ""
property bool showIcon: true
// Who may authenticate. One entry is the common case and renders as a
// plain line; the picker only appears when polkit actually offers a
// choice (a user in several admin groups, or root plus wheel).
property var identities: []
property int selectedIdentity: 0
// PAM conversation. `responseVisible` is polkit's echo flag — it is NOT
// always false: a smartcard PIN prompt or a security-question stack asks
// for echoed input, and masking those makes the prompt unusable.
property bool responseRequired: false
property string inputPrompt: ""
property bool responseVisible: false
// pam_info / pam_error text, and whether the last attempt was rejected.
property string supplementaryMessage: ""
property bool supplementaryIsError: false
property bool failed: false
property alias response: responseInput.text
// Masking override from the eye toggle; reset with the field, so a
// revealed password never carries over to the next request.
property bool revealed: false
// Proton Pass logins, in their own panel under the dialog, collapsed until
// Tab. Entries need only `title` and `vault`; the adapter fetches the
// password for the one picked, so no secret is ever in this list. Off by
// default, as in the headless render.
property bool credentialsEnabled: false
property var credentials: []
// Picker-only: loading / listing failure. fetchStatus shows regardless —
// it is what explains an empty field after a pick.
property string credentialsStatus: ""
property string fetchStatus: ""
property bool pickerOpen: false
property int pickerIndex: 0
// Vault the list is narrowed to; "" is all of them. Kept across requests,
// so a vault picked once stays picked.
property string vaultFilter: ""
property bool overflowMenuOpen: false
// Height of the dialog alone. The adapters position on this rather than
// implicitHeight, so expanding the vault panel grows downward instead of
// shifting the dialog up under the cursor.
readonly property real dialogHeight: panel.implicitHeight
readonly property var vaultNames: {
const names = [];
for (const c of root.credentials)
if (!names.includes(c.vault))
names.push(c.vault);
return names.sort((a, b) => a.toLowerCase() < b.toLowerCase() ? -1 : a.toLowerCase() > b.toLowerCase() ? 1 : 0);
}
readonly property var vaultOptions: [""].concat(root.vaultNames)
// A remembered vault that no longer exists falls back to all.
readonly property string activeVault: root.vaultNames.includes(root.vaultFilter) ? root.vaultFilter : ""
// Title A–Z within the chosen vault (or across all of them).
readonly property var shownCredentials: {
const q = filterInput.text.toLowerCase();
return root.credentials
.filter(c => (root.activeVault === "" || c.vault === root.activeVault)
&& (q === "" || c.title.toLowerCase().includes(q)))
.sort((a, b) => {
const ta = a.title.toLowerCase(), tb = b.title.toLowerCase();
return ta < tb ? -1 : ta > tb ? 1 : 0;
});
}
function vaultLabel(name) {
return name === "" ? "ALL" : name.toUpperCase();
}
function vaultCount(name) {
return name === "" ? root.credentials.length : root.credentials.filter(c => c.vault === name).length;
}
function tabText(name) {
return root.vaultLabel(name) + " " + root.vaultCount(name);
}
// Tabs are sized from FontMetrics rather than their own implicitWidth, so
// how many fit is known before any are laid out — the overflow split
// would otherwise depend on the very tabs it decides to create.
function tabWidth(text) {
return Math.ceil(tabMetrics.advanceWidth(text) + text.length * tabMetrics.font.letterSpacing) + 16;
}
// How many leading vault options get a tab of their own; the rest go in
// the overflow menu, which is always the last tab.
//
// The overflow tab names the selected vault when it holds it, so it is
// sized for "MORE" first and, if the selection lands in the overflow,
// re-split for that label. Shrinking can only push the selection further
// into the overflow, so the second pass is final.
readonly property int fittingTabs: {
const avail = tabStrip.width;
const widths = root.vaultOptions.map(v => root.tabWidth(root.tabText(v)));
if (widths.reduce((a, b) => a + b, 0) <= avail)
return widths.length;
const split = reserve => {
let used = reserve, k = 0;
while (k < widths.length && used + widths[k] <= avail)
used += widths[k++];
return Math.max(1, k);
};
const k = split(root.tabWidth("MORE ▾"));
return root.vaultOptions.indexOf(root.activeVault) >= k
? split(root.tabWidth(root.tabText(root.activeVault) + " ▾")) : k;
}
readonly property var overflowVaults: root.vaultOptions.slice(root.fittingTabs)
signal submitted(string value)
signal cancelled
signal identityRequested(int index)
signal credentialRequested(var entry)
signal pickerOpened
function focusInput() { responseInput.forceActiveFocus(); }
function clearResponse() {
responseInput.text = "";
root.revealed = false;
root.closePicker();
}
function openPicker() {
if (!root.credentialsEnabled)
return;
filterInput.text = "";
root.pickerIndex = 0;
root.overflowMenuOpen = false;
root.pickerOpen = true;
filterInput.forceActiveFocus();
root.pickerOpened();
}
function closePicker() {
if (!root.pickerOpen)
return;
root.overflowMenuOpen = false;
root.pickerOpen = false;
root.focusInput();
}
function selectVault(index) {
root.vaultFilter = root.vaultOptions[index] || "";
root.overflowMenuOpen = false;
root.pickerIndex = 0;
pickerList.positionViewAtBeginning();
filterInput.forceActiveFocus();
}
function cycleVault(delta) {
const n = root.vaultOptions.length;
root.selectVault((Math.max(0, root.vaultOptions.indexOf(root.activeVault)) + delta + n) % n);
}
function pick(index) {
const entry = root.shownCredentials[index];
if (!entry)
return;
root.closePicker();
root.credentialRequested(entry);
}
function movePicker(delta) {
const n = root.shownCredentials.length;
if (n > 0)
root.pickerIndex = (root.pickerIndex + delta + n) % n;
}
onPickerIndexChanged: pickerList.positionViewAtIndex(root.pickerIndex, ListView.Contain)
implicitWidth: 520
implicitHeight: stack.implicitHeight
// Escape reaches here by propagating up the focus chain from the TextInput,
// which does not consume it — so cancelling works whether or not the input
// currently has focus.
Keys.onEscapePressed: event => {
root.cancelled();
event.accepted = true;
}
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.9
elide: Text.ElideRight
}
// A vault tab. Sized by the caller from tabWidth(), not by its label: the
// overflow split is computed before any tab exists.
component VaultTab: Item {
id: tab
property string label: ""
property bool current: false
signal clicked
MicroText {
anchors.centerIn: parent
text: tab.label
color: tab.current ? Theme.accent
: tabArea.containsMouse ? Theme.text : Theme.muted
}
Rectangle {
visible: tab.current
anchors.bottom: parent.bottom
width: parent.width
height: 2
color: Theme.accent
}
MouseArea {
id: tabArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: tab.clicked()
}
}
Column {
id: stack
width: root.width
// Clears the detached corner caps between the two panels.
spacing: 14
PolkitPanel {
id: panel
width: root.width
panelId: "PKT"
title: "AUTHORIZATION REQUIRED"
// The action id is the one piece that says WHAT is being authorized
// independently of the (localizable, often vague) message.
meta: root.actionId
// The body slot decides the width and the layout's implicitHeight
// becomes its height, so a wrapped message or an extra pam_info line
// grows the panel instead of being clipped.
ColumnLayout {
width: parent.width
spacing: 10
// ---- what is being asked ----
RowLayout {
Layout.fillWidth: true
spacing: 10
IconImage {
visible: root.showIcon && root.iconName !== ""
implicitSize: 32
source: root.showIcon && root.iconName !== ""
? Quickshell.iconPath(root.iconName, "dialog-password")
: ""
}
Text {
Layout.fillWidth: true
wrapMode: Text.Wrap
text: root.message
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 13
font.letterSpacing: 0.6
}
}
// ---- identity ----
// Single identity: stated, not offered. Several: chips, because a
// combo box would be the only QtQuick.Controls widget in the rail.
MicroText {
Layout.fillWidth: true
visible: root.identities.length === 1
text: "AS " + (root.identities.length === 1
? root.identities[0].displayName : "")
}
Flow {
Layout.fillWidth: true
visible: root.identities.length > 1
spacing: 6
Repeater {
model: root.identities
Rectangle {
id: chip
required property int index
required property var modelData
readonly property bool current: chip.index === root.selectedIdentity
width: chipLabel.implicitWidth + 14
height: chipLabel.implicitHeight + 8
color: chip.current ? Theme.accent : "transparent"
border.width: 1
border.color: chip.current ? Theme.accent : Theme.disabled
Text {
id: chipLabel
anchors.centerIn: parent
text: chip.modelData.displayName
color: chip.current ? Theme.surface : Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 0.8
}
MouseArea {
anchors.fill: parent
onClicked: root.identityRequested(chip.index)
}
}
}
}
// ---- the conversation ----
Rectangle {
Layout.fillWidth: true
implicitHeight: 34
color: Theme.selection
border.width: 1
border.color: root.failed ? Theme.hot : Theme.hair
RowLayout {
anchors.fill: parent
anchors.leftMargin: 10
anchors.rightMargin: 10
spacing: 10
Text {
text: ">_"
color: root.responseRequired ? Theme.accent : Theme.disabled
font.family: Theme.displayFont
font.pixelSize: 15
font.bold: true
}
TextInput {
id: responseInput
Layout.fillWidth: true
Layout.fillHeight: true
verticalAlignment: TextInput.AlignVCenter
enabled: root.responseRequired
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 14
font.letterSpacing: 1
clip: true
echoMode: root.responseVisible || root.revealed
? TextInput.Normal : TextInput.Password
passwordCharacter: "▪"
// Qt reveals the last typed character for a moment by
// default. On a screen-visible layer-shell overlay
// that is a shoulder-surfing hole, so: never.
passwordMaskDelay: 0
onAccepted: {
if (root.responseRequired)
root.submitted(responseInput.text);
}
Keys.onTabPressed: event => {
root.openPicker();
event.accepted = true;
}
// Placeholder: TextInput has none of its own, and the
// PAM prompt ("Password:", "PIN:") is the only label
// this field gets.
Text {
anchors.verticalCenter: parent.verticalCenter
visible: responseInput.text.length === 0
text: root.inputPrompt
color: Theme.disabled
font: responseInput.font
}
}
// Eye toggle. Hidden when PAM already asked for echoed
// input — there is nothing left to reveal.
Text {
visible: !root.responseVisible
text: root.revealed ? "" : ""
color: root.revealed ? Theme.accent : (eyeArea.containsMouse ? Theme.text : Theme.muted)
font.family: Theme.displayFont
font.pixelSize: 14
MouseArea {
id: eyeArea
anchors.fill: parent
anchors.margins: -6
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
root.revealed = !root.revealed;
root.focusInput();
}
}
}
}
}
MicroText {
Layout.fillWidth: true
visible: root.credentialsEnabled && root.fetchStatus !== ""
text: root.fetchStatus
}
// ---- pam_info / pam_error ----
Text {
Layout.fillWidth: true
visible: root.supplementaryMessage !== ""
wrapMode: Text.Wrap
text: root.supplementaryMessage
color: root.supplementaryIsError ? Theme.hot : Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 0.7
}
// ---- key hints ----
RowLayout {
Layout.fillWidth: true
spacing: 14
MicroText { text: "ENTER AUTHENTICATE" }
MicroText { text: "ESC CANCEL" }
Item { Layout.fillWidth: true }
MicroText {
text: root.responseVisible ? "ECHO ON" : root.revealed ? "SHOWN" : ""
color: Theme.hot
}
}
}
}
// ---- Proton Pass ----
// Its own panel so the dialog keeps its shape; collapsed it is the header
// strip alone. The MouseArea sits over that strip only — PolkitPanel's
// default property is the body slot, so it cannot live inside the panel.
Item {
visible: root.credentialsEnabled
width: root.width
height: vaultPanel.implicitHeight
PolkitPanel {
id: vaultPanel
width: parent.width
panelId: "PSS"
title: "PROTON PASS"
collapsed: !root.pickerOpen
meta: root.pickerOpen
? root.shownCredentials.length + " / " + root.credentials.length
: "TAB OPEN"
ColumnLayout {
width: parent.width
spacing: 6
// ---- vault tabs ----
// One row; tabs that do not fit move into the overflow
// tab's menu. z above the filter and list, which the open
// menu draws over.
Item {
id: tabStrip
z: 2
Layout.fillWidth: true
implicitHeight: 22
FontMetrics {
id: tabMetrics
font.family: Theme.microFont
font.pixelSize: 8
font.letterSpacing: 0.9
}
// The rule the tabs sit on, across the full width.
Rectangle {
anchors.bottom: parent.bottom
width: parent.width
height: 1
color: Theme.hair
}
Row {
Repeater {
model: root.vaultOptions.slice(0, root.fittingTabs)
VaultTab {
id: vaultTab
required property int index
required property string modelData
width: root.tabWidth(vaultTab.label)
height: tabStrip.height
label: root.tabText(vaultTab.modelData)
current: vaultTab.modelData === root.activeVault
onClicked: root.selectVault(vaultTab.index)
}
}
VaultTab {
id: overflowTab
readonly property bool holdsActive: root.overflowVaults.includes(root.activeVault)
visible: root.overflowVaults.length > 0
width: root.tabWidth(overflowTab.label)
height: tabStrip.height
// Names the selected vault when it is one of
// the hidden ones, so the selection stays visible.
label: (overflowTab.holdsActive ? root.tabText(root.activeVault) : "MORE") + " ▾"
current: overflowTab.holdsActive || root.overflowMenuOpen
onClicked: root.overflowMenuOpen = !root.overflowMenuOpen
Rectangle {
visible: root.overflowMenuOpen
// Right-aligned to the tab, clamped to the strip.
x: Math.max(-overflowTab.x, overflowTab.width - width)
y: overflowTab.height + 2
width: Math.max(180, overflowTab.width)
height: overflowColumn.implicitHeight + 2
color: Theme.surface
border.width: 1
border.color: Theme.accent
Column {
id: overflowColumn
x: 1
y: 1
width: parent.width - 2
Repeater {
model: root.overflowVaults
Rectangle {
id: option
required property int index
required property string modelData
readonly property bool current: option.modelData === root.activeVault
width: overflowColumn.width
height: 22
color: optionArea.containsMouse ? Theme.selection : "transparent"
Rectangle {
visible: option.current
width: 2
height: parent.height
color: Theme.accent
}
MicroText {
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
text: root.vaultLabel(option.modelData)
color: option.current ? Theme.accent
: optionArea.containsMouse ? Theme.text : Theme.muted
}
MicroText {
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
text: root.vaultCount(option.modelData)
}
MouseArea {
id: optionArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.selectVault(root.fittingTabs + option.index)
}
}
}
}
}
}
}
}
RowLayout {
Layout.fillWidth: true
spacing: 8
TextInput {
id: filterInput
Layout.fillWidth: true
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 12
clip: true
onTextChanged: root.pickerIndex = 0
onAccepted: root.pick(root.pickerIndex)
// Consumed so Esc backs out of the panel instead
// of cancelling the whole request.
Keys.onEscapePressed: event => {
if (root.overflowMenuOpen)
root.overflowMenuOpen = false;
else
root.closePicker();
event.accepted = true;
}
Keys.onTabPressed: event => {
root.cycleVault(1);
event.accepted = true;
}
Keys.onBacktabPressed: event => {
root.cycleVault(-1);
event.accepted = true;
}
Keys.onUpPressed: event => {
root.movePicker(-1);
event.accepted = true;
}
Keys.onDownPressed: event => {
root.movePicker(1);
event.accepted = true;
}
Text {
anchors.verticalCenter: parent.verticalCenter
visible: filterInput.text.length === 0
text: "filter logins"
color: Theme.disabled
font: filterInput.font
}
}
}
MicroText {
Layout.fillWidth: true
visible: text !== ""
text: root.credentialsStatus !== "" ? root.credentialsStatus
: root.shownCredentials.length === 0 ? "NO MATCH" : ""
}
ListView {
id: pickerList
readonly property int rowHeight: 24
Layout.fillWidth: true
implicitHeight: Math.min(count, 10) * rowHeight
visible: count > 0
clip: true
boundsBehavior: Flickable.StopAtBounds
model: root.shownCredentials
delegate: Rectangle {
id: row
required property int index
required property var modelData
readonly property bool current: row.index === root.pickerIndex
width: pickerList.width
height: pickerList.rowHeight
color: row.current ? Theme.selection : "transparent"
Rectangle {
visible: row.current
width: 2
height: parent.height
color: Theme.accent
}
RowLayout {
anchors.fill: parent
anchors.leftMargin: 10
anchors.rightMargin: 6
spacing: 10
Text {
Layout.fillWidth: true
text: row.modelData.title
elide: Text.ElideRight
color: row.current ? Theme.text : Theme.muted
font.family: Theme.displayFont
font.pixelSize: 12
}
// Only useful when the list spans vaults.
MicroText {
visible: root.activeVault === ""
text: row.modelData.vault.toUpperCase()
}
}
MouseArea {
anchors.fill: parent
onClicked: root.pick(row.index)
}
}
}
RowLayout {
Layout.fillWidth: true
spacing: 14
MicroText { text: "↑↓ SELECT" }
MicroText { text: "ENTER FILL" }
MicroText { text: "TAB VAULT" }
MicroText { text: "ESC BACK" }
}
}
}
MouseArea {
width: parent.width
height: vaultPanel.headerHeight
cursorShape: Qt.PointingHandCursor
onClicked: root.pickerOpen ? root.closePicker() : root.openPicker()
}
}
}
}
@@ -0,0 +1,176 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
// Proton Pass logins for the polkit and askpass prompts, via pass-cli.
//
// Listing never touches a secret: `item list` without --show-secrets returns
// ids and titles only. A password is fetched on its own, for one item, after
// the user picks it — and read through a SplitParser rather than a
// StdioCollector, which would keep it in its `text` property afterwards.
//
// `item list` refuses to run without a vault, so "all vaults" is one call per
// vault. Each takes ~0.8s, hence run in parallel by a single shell script.
QtObject {
id: root
// {shareId, id, title, vault}, unsorted — the dialog orders and groups them.
property var entries: []
// Why the list is empty or incomplete; "" when it is fine.
property string error: ""
property string fetchError: ""
readonly property bool loading: vaults.running || items.running
readonly property bool fetching: fetcher.running
// Shown inside the picker.
readonly property string listStatus: root.loading
? (root.entries.length === 0 ? "LOADING VAULTS…" : "REFRESHING…")
: root.error
// Shown under the field, picker open or not.
readonly property string fetchStatus: root.fetching ? "FETCHING PASSWORD…" : root.fetchError
// Bumped per request; a fetch that lands after it changed is dropped, so a
// slow fetch cannot fill a password into the NEXT request's field.
property int generation: 0
property int fetchGeneration: -1
property bool fetchGotLine: false
property var vaultNames: ({})
signal fetched(string secret)
function refresh() {
if (root.loading)
return;
root.error = "";
vaults.running = true;
}
function invalidate() {
root.generation++;
root.fetchError = "";
}
function fetch(entry) {
if (!entry || root.fetching)
return;
root.fetchError = "";
root.fetchGeneration = root.generation;
root.fetchGotLine = false;
fetcher.command = ["pass-cli", "item", "view", "--share-id", entry.shareId,
"--item-id", entry.id, "--field", "password", "--output", "human"];
fetcher.running = true;
}
function describe(output) {
const text = output.replace(/\x1b\[[0-9;]*m/g, "");
if (/not found/.test(text))
return "PASS-CLI NOT INSTALLED";
if (/authenticated client|no session/.test(text))
return "PASS-CLI LOGGED OUT — RUN pass-cli login";
const lines = text.trim().split("\n");
return lines[lines.length - 1].toUpperCase();
}
// Prints the vault JSON or `ERR <output>`: one stream, so success and
// failure need no ordering between exit code and stdout.
readonly property var vaults: Process {
id: vaults
command: ["sh", "-c",
"out=$(pass-cli vault list --output json 2>&1) && printf '%s' \"$out\" || printf 'ERR %s' \"$out\""]
stdout: StdioCollector {
onStreamFinished: {
const body = this.text;
if (body.startsWith("ERR ")) {
root.error = root.describe(body.slice(4));
return;
}
let list;
try {
list = JSON.parse(body).vaults || [];
} catch (e) {
root.error = "UNREADABLE VAULT LIST";
return;
}
const names = {};
for (const v of list)
names[v.share_id] = v.name;
root.vaultNames = names;
if (list.length === 0) {
root.entries = [];
root.error = "NO VAULTS";
return;
}
items.command = ["sh", "-c", items.script, "sh"].concat(list.map(v => v.share_id));
items.running = true;
}
}
}
// One `item list` per vault in parallel, each to its own file, then
// printed back in order under an `@@<share_id>` line — concurrent writers
// on one pipe would interleave.
//
// No --filter-type: it takes ONE type, and the `darman@<config>` machine
// logins scripts/deploy reads are `custom` items, not `login`.
readonly property var items: Process {
id: items
readonly property string script: "d=$(mktemp -d \"${XDG_RUNTIME_DIR:-/tmp}/qs-pass.XXXXXX\") || exit 1;"
+ " trap 'rm -rf \"$d\"' EXIT; i=0;"
+ " for s; do i=$((i+1)); pass-cli item list --share-id \"$s\""
+ " --filter-state active --output json > \"$d/$i\" 2>/dev/null & done; wait; i=0;"
+ " for s; do i=$((i+1)); printf '\\n@@%s\\n' \"$s\"; cat \"$d/$i\"; done"
stdout: StdioCollector {
onStreamFinished: {
const found = [];
let failed = 0;
for (const chunk of this.text.split(/^@@/m)) {
const nl = chunk.indexOf("\n");
const share = nl < 0 ? "" : chunk.slice(0, nl).trim();
if (share === "")
continue;
try {
for (const it of JSON.parse(chunk.slice(nl + 1)).items || [])
if (it.item_type === "login" || it.item_type === "custom")
found.push({ shareId: share, id: it.id, title: it.title, vault: root.vaultNames[share] || "" });
} catch (e) {
failed++;
}
}
root.entries = found;
root.error = failed === 0 ? (found.length === 0 ? "NO LOGINS IN ANY VAULT" : "")
: failed + " VAULT" + (failed === 1 ? "" : "S") + " FAILED TO LIST";
}
}
}
readonly property var fetcher: Process {
id: fetcher
stdout: SplitParser {
splitMarker: "\n"
onRead: line => {
if (root.fetchGotLine)
return;
root.fetchGotLine = true;
if (root.fetchGeneration !== root.generation)
return;
root.fetchError = line === "" ? "THAT ITEM HAS NO PASSWORD" : "";
if (line !== "")
root.fetched(line);
}
}
onExited: (exitCode, exitStatus) => {
if (!root.fetchGotLine && root.fetchGeneration === root.generation)
root.fetchError = exitCode === 0 ? "THAT ITEM HAS NO PASSWORD" : "COULD NOT READ THAT ITEM";
}
}
}
+8
View File
@@ -0,0 +1,8 @@
import Quickshell
import qs.HyprChrome.Widgets.Greeter
// greetd greeter entry point: `qs -p greeter.qml`, as the greeter user. See
// services/desktop/quickshell-greeter.nix.
Scope {
Greeter {}
}
+9
View File
@@ -0,0 +1,9 @@
import Quickshell
import qs.HyprChrome.Widgets.Lock
// Session lock entry point: `qs -n -p lock.qml`, from the SUPER+L bind and
// hypridle (home/desktop/hyprland.nix). Separate from shell.qml so a shell
// reload or crash cannot take the lock down with it.
Scope {
Lock {}
}
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
hyprctl dispatch 'hl.dsp.global ("quickshell:launcher7")' hyprctl dispatch 'hl.dsp.global ("quickshell:command")'
+52 -8
View File
@@ -1,21 +1,29 @@
//@ pragma UseQApplication //@ pragma UseQApplication
import QtQuick
import Quickshell import Quickshell
import Quickshell.Widgets
import qs.widgets.bar import qs.widgets.bar
import qs.widgets.launcher import qs.widgets.launcher
import qs.widgets.notifications
import qs.widgets.osd import qs.widgets.osd
import qs.widgets.sidebar
import qs.widgets.systray import qs.widgets.systray
import qs.widgets.theme
import qs.widgets.vitals import qs.widgets.vitals
import qs.HyprChrome
import qs.HyprChrome.Widgets
import qs.HyprChrome.Widgets.Bar.Debug
import qs.HyprChrome.Widgets.Bar.Host
import qs.HyprChrome.Widgets.Bar.Vitals
Scope { Scope {
// Left sidebar in the Slant (V6) style — toggle with SUPER CTRL S. // Dense multi-monitor status rail; visual core is headlessly renderable.
SideBar {} HyprChromeShell {}
BarBottom {}
// App launcher variants — toggled via Hyprland global shortcuts // App launcher variants still under evaluation, on SUPER CTRL 1–11.
// (SUPER CTRL 1/2/3). Try each and keep the one you like. // Variant 8 — the primary launcher on SUPER_L — has moved into
// HyprChrome/Widgets/Launcher and is instantiated by HyprChromeShell,
// because the shell owns the scrim, the focused monitor and the keyboard
// arbitration it now shares with the polkit prompt.
LauncherStack {} // 1 — left vertical list LauncherStack {} // 1 — left vertical list
LauncherGrid {} // 2 — centered icon grid LauncherGrid {} // 2 — centered icon grid
LauncherSpotlight {} // 3 — top-center command bar LauncherSpotlight {} // 3 — top-center command bar
@@ -23,10 +31,46 @@ Scope {
LauncherDock {} // 5 — deck rising from the bottom bar LauncherDock {} // 5 — deck rising from the bottom bar
LauncherSlant {} // 6 — angular / sheared panel LauncherSlant {} // 6 — angular / sheared panel
LauncherCorner {} // 7 — Slant (V6) copy + floating power panel (shutdown/reboot) LauncherCorner {} // 7 — Slant (V6) copy + floating power panel (shutdown/reboot)
BladeLauncher {} // 9 — asymmetric blade matrix
OrbitLauncher {} // 10 — radial targeting arena
CyberDock {} // 11 — cyberpunk bottom cartridge dock
Notifications {}
VolumeOsd {} VolumeOsd {}
// Host vitals HUD — toggle with SUPER CTRL V. // Host vitals HUD — toggle with SUPER CTRL V.
Vitals {} Vitals {}
// Widget staging area, centered on the secondary monitor,
// toggled with SUPER CTRL D. Swap the children below for whatever widget
// is being worked on; they must carry their own size (see DebugWindow).
// DebugWindow {
// id: debugStage
// // VitalsPanel has no implicit width — the slot measures its children, so
// // each staged panel states its own. Height follows the mode it is in.
// // Click a panel to collapse or expand it.
// Column {
// spacing: 12
// padding: 12
// HostPanel {
// width: 560
// }
// HostPanel {
// width: 560
// expanded: false
// }
// VitalsPanel {
// width: 560
// }
// VitalsPanel {
// width: 560
// expanded: false
// }
// }
// }
} }
@@ -0,0 +1,62 @@
import QtQuick
import qs.HyprChrome.Widgets.Launcher
AppLauncherContent {
width: 1080
height: 620
query: "term"
selectedIndex: 1
showIcons: false
apps: [
{
name: "Alacritty",
genericName: "Terminal Emulator",
comment: "GPU accelerated command interface",
icon: "utilities-terminal",
categories: ["System", "TerminalEmulator"]
},
{
name: "Ghostty",
genericName: "Terminal",
comment: "Fast native terminal for local operations",
icon: "com.mitchellh.ghostty",
categories: ["System", "TerminalEmulator"]
},
{
name: "Kitty",
genericName: "Terminal Emulator",
comment: "GPU based terminal with multiplexing",
icon: "kitty",
categories: ["System", "TerminalEmulator"]
},
{
name: "Vivaldi",
genericName: "Web Browser",
comment: "Access network and web applications",
icon: "vivaldi",
categories: ["Network", "WebBrowser"]
},
{
name: "Cosmic Files",
genericName: "File Manager",
comment: "Browse and manage local storage",
icon: "com.system76.CosmicFiles",
categories: ["System", "FileManager"]
},
{
name: "Obsidian",
genericName: "Knowledge Base",
comment: "Local-first markdown workspace",
icon: "obsidian",
categories: ["Office"]
},
{
name: "Steam",
genericName: "Game Platform",
comment: "Launch and manage games",
icon: "steam",
categories: ["Game"]
}
]
}
@@ -0,0 +1,20 @@
import QtQuick
import qs.widgets.launcher
BladeLauncherContent {
width: 1120
height: 640
query: "dev"
selectedIndex: 2
showIcons: false
apps: [
{ name: "Visual Studio Code", genericName: "Code Editor", comment: "Edit and debug software projects", icon: "visual-studio-code", categories: ["Development"] },
{ name: "GitKraken", genericName: "Git Client", comment: "Inspect branches and repository history", icon: "gitkraken", categories: ["Development"] },
{ name: "OpenCode", genericName: "AI Development", comment: "Agentic terminal coding environment", icon: "utilities-terminal", categories: ["Development", "Utility"] },
{ name: "Alacritty", genericName: "Terminal Emulator", comment: "GPU accelerated command interface", icon: "utilities-terminal", categories: ["System"] },
{ name: "Vivaldi", genericName: "Web Browser", comment: "Access network and web applications", icon: "vivaldi", categories: ["Network"] },
{ name: "Obsidian", genericName: "Knowledge Base", comment: "Local-first markdown workspace", icon: "obsidian", categories: ["Office"] },
{ name: "Blender", genericName: "3D Creation", comment: "Model, animate and render 3D scenes", icon: "blender", categories: ["Graphics"] },
{ name: "Steam", genericName: "Game Platform", comment: "Launch and manage games", icon: "steam", categories: ["Game"] }
]
}
@@ -0,0 +1,70 @@
import QtQuick
import qs.HyprChrome.Widgets.Bar.Claude
// The rail's claude panel collapsed and expanded, healthy and failing.
//
// ./tools/quickshell-preview/render.sh \
// tests/ClaudePanelHeadless.qml \
// .artifacts/quickshell-preview/claude-panel.png 640 420
Rectangle {
width: 640
height: 420
color: "#0f1012"
readonly property var soon: new Date(Date.now() + 2 * 3600000 + 17 * 60000).toISOString()
readonly property var later: new Date(Date.now() + 4 * 86400000 + 5 * 3600000).toISOString()
Row {
x: 16
y: 16
spacing: 24
Column {
spacing: 12
ClaudePanel {
expanded: false
ready: true
fiveHour: ({ utilization: 42, resets_at: soon })
sevenDay: ({ utilization: 91, resets_at: later })
}
ClaudePanel {
expanded: false
ready: true
error: "usage HTTP 429"
shortError: "ERR"
fiveHour: ({ utilization: 42, resets_at: soon })
sevenDay: ({ utilization: 91, resets_at: later })
}
ClaudePanel {
expanded: false
ready: false
error: "token refresh HTTP 400"
shortError: "EXPIRED"
}
}
Column {
spacing: 12
ClaudePanel {
expanded: true
ready: true
fiveHour: ({ utilization: 42, resets_at: soon })
sevenDay: ({ utilization: 91, resets_at: later })
extra: [{ label: "SONNET", window: { utilization: 12, resets_at: later } }]
}
ClaudePanel {
expanded: true
ready: true
error: "usage HTTP 429"
shortError: "ERR"
fiveHour: ({ utilization: 8, resets_at: soon })
sevenDay: ({ utilization: 30, resets_at: later })
}
}
}
}
@@ -0,0 +1,21 @@
import QtQuick
import qs.widgets.launcher
CyberDockContent {
width: 1440
height: 272
query: ""
selectedIndex: 3
showIcons: false
apps: [
{ name: "Alacritty", genericName: "Terminal", comment: "GPU accelerated command interface", icon: "utilities-terminal" },
{ name: "Vivaldi", genericName: "Browser", comment: "Access web applications", icon: "vivaldi" },
{ name: "Obsidian", genericName: "Knowledge", comment: "Local-first markdown workspace", icon: "obsidian" },
{ name: "Cosmic Files", genericName: "Files", comment: "Browse local storage", icon: "com.system76.CosmicFiles" },
{ name: "Jellyfin", genericName: "Media", comment: "Stream the homelab library", icon: "jellyfin-media-player" },
{ name: "Spotify", genericName: "Music", comment: "Browse and play music", icon: "spotify" },
{ name: "Steam", genericName: "Games", comment: "Launch and manage games", icon: "steam" },
{ name: "Blender", genericName: "3D", comment: "Model and render scenes", icon: "blender" },
{ name: "Visual Studio Code", genericName: "Editor", comment: "Edit and debug projects", icon: "visual-studio-code" }
]
}
@@ -0,0 +1,27 @@
import QtQuick
import qs.widgets.bar
DenseBarContent {
width: 1920
height: 164
now: new Date(2026, 7, 27, 21, 47, 0)
hostName: "TERRA"
telemetryReady: true
ratesReady: true
cpuFraction: 0.62
cpuThreads: 16
memoryFraction: 0.78
memoryUsedText: "24.9G"
temperatureCelsius: 54
networkInterface: "enp7s0"
networkRxText: "842.6M/S"
networkTxText: "116.2M/S"
storageFraction: 0.69
storageFreeText: "1.82T FREE"
workspaceIds: [1, 2, 3, 4]
activeWorkspaceId: 1
trayCount: 3
audioFraction: 0.50
audioMuted: false
}
+155
View File
@@ -0,0 +1,155 @@
import QtQuick
import QtQuick.Shapes
Item {
id: root
implicitWidth: 720
implicitHeight: 120
readonly property color voidColor: "#0a0a0a"
readonly property color inkColor: "#dedede"
readonly property color mutedColor: "#858585"
readonly property color accentColor: "#e8722a"
Rectangle {
anchors.fill: parent
color: root.voidColor
}
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: root.voidColor
strokeColor: Qt.rgba(0.87, 0.87, 0.87, 0.28)
strokeWidth: 1
startX: 1
startY: 1
PathLine { x: root.width - 14; y: 1 }
PathLine { x: root.width - 1; y: 14 }
PathLine { x: root.width - 1; y: root.height - 9 }
PathLine { x: root.width - 9; y: root.height - 1 }
PathLine { x: 17; y: root.height - 1 }
PathLine { x: 1; y: root.height - 17 }
PathLine { x: 1; y: 1 }
}
ShapePath {
fillColor: root.accentColor
strokeWidth: 0
startX: 1
startY: 1
PathLine { x: 92; y: 1 }
PathLine { x: 92; y: 3 }
PathLine { x: 1; y: 3 }
PathLine { x: 1; y: 1 }
}
}
Rectangle {
x: 14
y: 12
width: 29
height: 14
color: root.accentColor
Text {
anchors.centerIn: parent
text: "001"
color: root.voidColor
font.pixelSize: 8
font.bold: true
}
}
Text {
x: 52
y: 13
text: "HEADLESS RENDER ARRAY"
color: root.inkColor
font.family: "monospace"
font.pixelSize: 9
font.bold: true
font.letterSpacing: 1.4
}
Rectangle {
x: 14
y: 34
width: root.width - 28
height: 1
color: root.inkColor
opacity: 0.18
}
Text {
x: 16
y: 48
text: "ORBITAL"
color: root.inkColor
font.family: "sans-serif-condensed"
font.pixelSize: 28
font.bold: true
font.letterSpacing: 2
}
Text {
x: 18
y: 80
text: "QML // GRABTOIMAGE // SOFTWARE RHI"
color: root.accentColor
font.family: "monospace"
font.pixelSize: 7
font.letterSpacing: 1.4
}
Row {
x: 250
y: 56
spacing: 4
Repeater {
model: 16
Rectangle {
required property int index
width: 20
height: 12
color: index < 11 ? root.accentColor : Qt.rgba(0.87, 0.87, 0.87, 0.06)
border.width: 1
border.color: index < 11 ? root.accentColor : Qt.rgba(0.87, 0.87, 0.87, 0.2)
}
}
}
Text {
x: 250
y: 78
text: "RENDER PIPELINE"
color: root.mutedColor
font.family: "monospace"
font.pixelSize: 7
font.letterSpacing: 1.1
}
Text {
x: 585
y: 77
text: "68.75%"
color: root.inkColor
font.family: "monospace"
font.pixelSize: 15
font.bold: true
}
Rectangle {
x: 14
y: root.height - 9
width: root.width - 28
height: 3
color: root.accentColor
opacity: 0.6
}
}
@@ -0,0 +1,27 @@
import QtQuick
import qs.HyprChrome.Widgets.Greeter
// Offscreen render of the lock panel (Lock.qml) after a rejected password.
//
// ./tools/quickshell-preview/render.sh \
// tests/LockPanelHeadless.qml \
// .artifacts/quickshell-preview/lock-panel.png 700 340
LoginContent {
width: 640
title: "LOCKED // TERRA"
panelId: "LCK"
meta: "PAM"
submitLabel: "UNLOCK"
userEditable: false
showPower: false
sessionName: "hyprland"
now: new Date(2026, 8, 18, 21, 47, 38)
user: "darman"
response: "hunter2"
message: "authentication failed"
messageIsError: true
failed: true
}
@@ -0,0 +1,21 @@
import QtQuick
import qs.HyprChrome.Widgets.Greeter
// Offscreen render of the login panel after a rejected password.
//
// ./tools/quickshell-preview/render.sh \
// tests/LoginPanelHeadless.qml \
// .artifacts/quickshell-preview/login-panel.png 700 340
LoginContent {
width: 640
hostName: "terra"
sessionName: "hyprland"
now: new Date(2026, 8, 18, 21, 47, 38)
user: "darman"
response: "hunter2"
message: "Authentication failure"
messageIsError: true
failed: true
}
@@ -0,0 +1,90 @@
import QtQuick
import qs.HyprChrome.Widgets.Bar.Luna
// The rail's luna panel in both densities and every daemon state. Collapsed
// is the left column (state only), expanded the right (messages) — the two
// things the panel has to get right, side by side.
//
// ./tools/quickshell-preview/render.sh \
// tests/LunaPanelHeadless.qml \
// .artifacts/quickshell-preview/luna-panel.png 640 560
Rectangle {
width: 640
height: 560
color: "#0f1012"
Row {
x: 16
y: 16
spacing: 24
Column {
spacing: 12
LunaPanel {
expanded: false
connected: true
active: false
daemonState: "idle"
}
LunaPanel {
expanded: false
connected: true
active: true
daemonState: "listening"
rms: 0.02
}
LunaPanel {
expanded: false
connected: true
active: true
daemonState: "thinking"
}
LunaPanel {
expanded: false
connected: true
active: true
daemonState: "speaking"
rms: 0.05
}
LunaPanel {
expanded: false
connected: false
}
}
Column {
spacing: 12
LunaPanel {
expanded: true
connected: true
active: false
daemonState: "idle"
}
LunaPanel {
expanded: true
connected: true
active: true
daemonState: "listening"
rms: 0.02
userText: "hey luna, what's the time?"
}
LunaPanel {
expanded: true
connected: true
active: true
daemonState: "speaking"
rms: 0.05
userText: "hey luna, what's the time?"
lunaText: "It's 23:40 on Sunday night, chief. Shouldn't you be asleep?"
}
}
}
}
@@ -0,0 +1,58 @@
import QtQuick
import qs.HyprChrome.Widgets.Notifications
// Offscreen render of the three urgencies, with actions, a link and a
// part-drained meter.
//
// ./tools/quickshell-preview/render.sh \
// tests/NotificationCardHeadless.qml \
// .artifacts/quickshell-preview/notifications.png 400 520
Rectangle {
width: 400
height: 520
color: "#1b1d20"
Column {
x: 20
y: 20
width: 360
spacing: 14
NotificationCard {
width: parent.width
appName: "Firefox"
summary: "Download complete"
body: "<b>nixos-26.05-x86_64.iso</b> finished — <a href=\"file:///tmp\">open folder</a>"
appIcon: "firefox"
time: "14:32"
actions: [
{ identifier: "default", text: "Open" },
{ identifier: "show", text: "Show in folder" },
{ identifier: "dismiss", text: "Dismiss" }
]
timeout: 5000
countdown: false
remaining: 0.6
}
NotificationCard {
width: parent.width
appName: "smartd"
summary: "Disk /dev/sdb reports 8 reallocated sectors"
body: "SMART attribute 5 crossed its threshold. Back up the RAID0 set on /mnt/data now."
urgency: 2
time: "14:30"
}
NotificationCard {
width: parent.width
appName: "nix"
summary: "Build finished"
urgency: 0
time: "14:28"
timeout: 5000
countdown: false
remaining: 0.2
}
}
}
@@ -0,0 +1,20 @@
import QtQuick
import qs.widgets.launcher
OrbitLauncherContent {
width: 1120
height: 660
query: "media"
selectedIndex: 3
showIcons: false
apps: [
{ name: "Vivaldi", genericName: "Web Browser", comment: "Access network and web applications", icon: "vivaldi" },
{ name: "Obsidian", genericName: "Knowledge Base", comment: "Local-first markdown workspace", icon: "obsidian" },
{ name: "Blender", genericName: "3D Creation", comment: "Model, animate and render 3D scenes", icon: "blender" },
{ name: "Jellyfin Media Player", genericName: "Media Player", comment: "Stream media from the homelab library", icon: "jellyfin-media-player" },
{ name: "Spotify", genericName: "Music Player", comment: "Browse and play music", icon: "spotify" },
{ name: "Steam", genericName: "Game Platform", comment: "Launch and manage games", icon: "steam" },
{ name: "Cosmic Files", genericName: "File Manager", comment: "Browse and manage local storage", icon: "com.system76.CosmicFiles" },
{ name: "Alacritty", genericName: "Terminal Emulator", comment: "GPU accelerated command interface", icon: "utilities-terminal" }
]
}
@@ -0,0 +1,33 @@
import QtQuick
import qs.HyprChrome.Widgets.Polkit
// Offscreen render of the polkit prompt with a failed first attempt and two
// eligible identities — the state that exercises every optional element at
// once (picker, pam_error text, rejected-attempt border).
//
// ./tools/quickshell-preview/render.sh \
// tests/PolkitPromptHeadless.qml \
// .artifacts/quickshell-preview/polkit-prompt.png 560 320
PolkitPromptContent {
width: 520
message: "Authentication is required to install or remove software"
actionId: "org.freedesktop.packagekit.package-install"
iconName: "system-software-install"
showIcon: false
identities: [
{ id: "1000", displayName: "darman", isGroup: false },
{ id: "0", displayName: "root", isGroup: false }
]
selectedIdentity: 0
responseRequired: true
inputPrompt: "Password:"
responseVisible: false
response: "hunter2"
supplementaryMessage: "Authentication failure. 2 attempts remaining."
supplementaryIsError: true
failed: true
}
@@ -0,0 +1,49 @@
import QtQuick
import qs.HyprChrome.Widgets.Polkit
// Offscreen render of the polkit prompt with the Proton Pass panel expanded,
// more vaults than fit (Work, selected, sits in the open overflow menu), the
// password revealed and a failed fetch under the
// field. Credentials are deliberately out of order, to show the title sort.
//
// ./tools/quickshell-preview/render.sh \
// tests/PolkitPromptVaultHeadless.qml \
// .artifacts/quickshell-preview/polkit-prompt-vault.png 560 560
PolkitPromptContent {
width: 520
message: "Authentication is required to install or remove software"
actionId: "org.freedesktop.packagekit.package-install"
showIcon: false
identities: [{ id: "1000", displayName: "darman", isGroup: false }]
responseRequired: true
inputPrompt: "Password:"
response: "hunter2"
revealed: true
credentialsEnabled: true
credentials: [
{ title: "router admin", vault: "HomeLab" },
{ title: "proton.me", vault: "Personal" },
{ title: "darman@terra", vault: "HomeLab" },
{ title: "netcup", vault: "Work" },
{ title: "Darman@mars", vault: "HomeLab" },
{ title: "github.com", vault: "Personal" },
{ title: "root@terra", vault: "HomeLab" },
{ title: "grandma wifi", vault: "Family" },
{ title: "old forum", vault: "Archive" },
{ title: "billing portal", vault: "Clients" },
{ title: "ci deploy key", vault: "Shared Infrastructure" },
{ title: "vpn", vault: "Work" }
]
fetchStatus: "THAT ITEM HAS NO PASSWORD"
Component.onCompleted: {
openPicker();
pickerIndex = 1;
vaultFilter = "Work";
overflowMenuOpen = true;
}
}
@@ -1,80 +0,0 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import qs.widgets.launcher
Scope {
id: root
Variants {
model: Quickshell.screens
PanelWindow {
required property var modelData
screen: modelData
color: "transparent"
anchors {
bottom: true
left: true
right: true
}
implicitHeight: wrapper.implicitHeight
WrapperRectangle {
id: wrapper
color: "transparent"
anchors.fill: parent
leftMargin: 12
rightMargin: 12
bottomMargin: 12
Rectangle {
implicitHeight: 12
// Brightens when the Dock launcher (variant 5) opens.
color: LauncherState.dockOpen ? "#FFF3C0" : "#FFD063"
Behavior on color {
ColorAnimation {
duration: 250
}
}
// Gentle "listening" pulse while the dock is open.
Rectangle {
anchors.fill: parent
color: "#FFFFFF"
opacity: 0
visible: LauncherState.dockOpen
SequentialAnimation on opacity {
running: LauncherState.dockOpen
loops: Animation.Infinite
NumberAnimation {
to: 0.4
duration: 700
easing.type: Easing.InOutSine
}
NumberAnimation {
to: 0.0
duration: 700
easing.type: Easing.InOutSine
}
}
}
}
}
}
}
}
@@ -1,80 +0,0 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Widgets
import QtQuick
import qs.widgets.launcher
Scope {
id: root
Variants {
model: Quickshell.screens
PanelWindow {
id: topBar
required property var modelData
screen: modelData
color: "transparent"
anchors {
top: true
left: true
right: true
}
implicitHeight: wrapper.implicitHeight
WrapperRectangle {
id: wrapper
color: "transparent"
anchors.fill: parent
margin: 12
bottomMargin: 0
Rectangle {
implicitHeight: 6
// Brightens when the Console launcher (variant 4) opens.
color: LauncherState.consoleOpen ? "#FFF3C0" : "#FFD063"
Behavior on color {
ColorAnimation {
duration: 250
}
}
// Gentle "listening" pulse while the console is open.
Rectangle {
anchors.fill: parent
color: "#FFFFFF"
opacity: 0
visible: LauncherState.consoleOpen
SequentialAnimation on opacity {
running: LauncherState.consoleOpen
loops: Animation.Infinite
NumberAnimation {
to: 0.4
duration: 700
easing.type: Easing.InOutSine
}
NumberAnimation {
to: 0.0
duration: 700
easing.type: Easing.InOutSine
}
}
}
}
}
}
}
}
@@ -0,0 +1,86 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Services.Pipewire
import Quickshell.Services.SystemTray
import QtQuick
import qs.widgets.vitals
// Production/layer-shell adapter. All visual composition lives in the
// Item-rooted DenseBarContent so the exact bar can be rendered headlessly.
Scope {
id: root
readonly property PwNode sink: Pipewire.defaultAudioSink
readonly property real volume: sink?.audio?.volume ?? 0
readonly property bool muted: sink?.audio?.muted ?? false
readonly property var workspaceIds: Hyprland.workspaces.values
.filter(workspace => workspace.id > 0)
.map(workspace => workspace.id)
readonly property int activeWorkspaceId: Hyprland.focusedWorkspace?.id ?? 1
readonly property var rootDisk: vitals.disks.length > 0 ? vitals.disks[0] : null
PwObjectTracker {
objects: [root.sink]
}
VitalsData {
id: vitals
active: true
}
Variants {
model: Quickshell.screens
PanelWindow {
id: window
required property var modelData
screen: modelData
color: "transparent"
implicitHeight: 164
anchors {
top: true
left: true
right: true
}
DenseBarContent {
anchors.fill: parent
hostName: vitals.host || "LOCAL"
telemetryReady: vitals.ready && !vitals.failed
ratesReady: vitals.ratesReady && !vitals.failed
cpuFraction: vitals.cpu
cpuThreads: vitals.cpuThreads
memoryFraction: vitals.memTotal > 0 ? vitals.memUsed / vitals.memTotal : 0
memoryUsedText: vitals.fmtBytes(vitals.memUsed)
temperatureCelsius: vitals.cpuTemp
networkInterface: vitals.netIface || "NET"
networkRxText: vitals.fmtRate(vitals.netRx)
networkTxText: vitals.fmtRate(vitals.netTx)
storageFraction: root.rootDisk && root.rootDisk.size > 0
? root.rootDisk.used / root.rootDisk.size : 0
storageFreeText: root.rootDisk
? vitals.fmtBytes(root.rootDisk.size - root.rootDisk.used) + " FREE"
: "-- FREE"
workspaceIds: root.workspaceIds.length > 0 ? root.workspaceIds : [1, 2, 3, 4]
activeWorkspaceId: root.activeWorkspaceId
trayCount: SystemTray.items.values.length
audioFraction: Math.max(0, Math.min(1, root.volume))
audioMuted: root.muted
onWorkspaceActivated: workspaceId => {
const workspace = Hyprland.workspaces.values.find(item => item.id === workspaceId);
if (workspace)
workspace.activate();
else
Hyprland.dispatch("workspace " + workspaceId);
}
}
}
}
}
@@ -0,0 +1,675 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import qs.widgets.theme
// Renderable visual core for the desktop telemetry rail. Runtime services stay
// in DenseBar.qml so this Item can be exercised without Wayland or Hyprland.
Item {
id: root
implicitWidth: 1920
implicitHeight: 164
readonly property bool compact: width <= 1400
property bool autoClock: true
property date now: new Date()
property string hostName: "LOCAL"
property bool telemetryReady: false
property bool ratesReady: false
property real cpuFraction: 0
property int cpuThreads: 0
property real memoryFraction: 0
property string memoryUsedText: "--"
property real temperatureCelsius: NaN
property string networkInterface: "NET"
property string networkRxText: "--"
property string networkTxText: "--"
property real storageFraction: 0
property string storageFreeText: "-- FREE"
property var workspaceIds: [1, 2, 3, 4]
property int activeWorkspaceId: 1
property int trayCount: 0
property real audioFraction: 0
property bool audioMuted: false
signal workspaceActivated(int workspaceId)
function pct(value, ready) {
return ready ? Math.round(Math.max(0, Math.min(1, value)) * 100) : 0;
}
function two(value) {
return value < 10 ? "0" + value : String(value);
}
function timeText(value) {
return root.two(value.getHours()) + ":" + root.two(value.getMinutes());
}
function dateText(value) {
const days = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
const months = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
return days[value.getDay()] + " // " + root.two(value.getDate()) + " " + months[value.getMonth()];
}
Timer {
interval: 30000
running: root.autoClock
repeat: true
triggeredOnStart: true
onTriggered: root.now = new Date()
}
// Faint drafting grid; no gradient and deliberately subordinate to data.
Repeater {
model: Math.ceil(root.width / 40)
Rectangle {
required property int index
x: index * 40
width: 1
height: root.height
color: Theme.text
opacity: 0.018
}
}
Repeater {
model: Math.ceil(root.height / 40)
Rectangle {
required property int index
y: index * 40
width: root.width
height: 1
color: Theme.text
opacity: 0.018
}
}
Item {
id: array
x: 12
y: 8
width: root.width - 24
height: 92
readonly property real identityWidth: root.compact ? 250 : 320
readonly property real stateWidth: root.compact ? 300 : 350
readonly property real flexWidth: Math.max(250, (width - identityWidth - stateWidth - 32) / 2)
Row {
anchors.fill: parent
spacing: 8
StatusBarPanel {
width: array.identityWidth
height: array.height
panelId: "001"
title: "COMMAND LAYER"
Text {
x: 12
y: 34
text: root.hostName.toUpperCase()
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: root.compact ? 20 : 25
font.bold: true
font.letterSpacing: 2
elide: Text.ElideRight
width: parent.width - 92
}
Text {
x: 13
y: 63
text: "STATUS ARRAY // " + (root.telemetryReady ? "LIVE" : "STANDBY")
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 7
font.letterSpacing: 1.4
}
Rectangle {
x: parent.width - 75
y: 36
width: 1
height: 43
color: Theme.hair
}
Rectangle {
x: parent.width - 62
y: 42
width: 5
height: 5
color: Theme.accent
opacity: root.telemetryReady ? 1 : 0.35
}
Text {
x: parent.width - 50
y: 38
text: root.telemetryReady ? "ONLINE" : "LOCAL"
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 7
}
Text {
x: parent.width - 63
y: 57
text: "NODE // " + (root.hostName || "--").toUpperCase().slice(0, 7)
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 6
}
Shape {
x: parent.width - 63
y: 71
width: 48
height: 10
ShapePath {
fillColor: "transparent"
strokeColor: Theme.accent
strokeWidth: 1
startX: 0; startY: 6
PathLine { x: 11; y: 6 }
PathLine { x: 16; y: 1 }
PathLine { x: 22; y: 9 }
PathLine { x: 27; y: 6 }
PathLine { x: 48; y: 6 }
}
}
}
StatusBarPanel {
width: array.flexWidth
height: array.height
panelId: "02"
title: "RESOURCE LATTICE"
meta: root.telemetryReady ? "REALTIME" : "FALLBACK"
Row {
x: 11
y: 32
width: parent.width - 22
height: 51
spacing: root.compact ? 7 : 12
MetricBlock {
width: (parent.width - parent.spacing * (root.compact ? 1 : 2)) / (root.compact ? 2 : 3)
label: "CPU"
value: root.cpuFraction
ready: root.ratesReady
readout: root.ratesReady ? root.pct(root.cpuFraction, true) + "%" : "--"
detailLeft: "CORE:" + (root.cpuThreads || "--")
detailRight: root.ratesReady ? "BUSY" : "PRIME"
}
MetricBlock {
width: (parent.width - parent.spacing * (root.compact ? 1 : 2)) / (root.compact ? 2 : 3)
label: "MEM"
value: root.memoryFraction
ready: root.telemetryReady
readout: root.telemetryReady ? root.pct(root.memoryFraction, true) + "%" : "--"
detailLeft: "ALLOC"
detailRight: root.memoryUsedText
}
MetricBlock {
visible: !root.compact
width: (parent.width - parent.spacing * 2) / 3
label: "THERM"
value: isFinite(root.temperatureCelsius) ? root.temperatureCelsius / 100 : 0
ready: isFinite(root.temperatureCelsius)
readout: isFinite(root.temperatureCelsius) ? Math.round(root.temperatureCelsius) + "°C" : "--"
detailLeft: "ZONE:01"
detailRight: isFinite(root.temperatureCelsius) && root.temperatureCelsius >= 85 ? "HOT" : "NOMINAL"
}
}
}
StatusBarPanel {
width: array.flexWidth
height: array.height
panelId: "03"
title: "CARRIER UPLINK"
meta: root.networkInterface.toUpperCase()
NetworkTrace {
x: 12
y: 43
width: parent.width - (root.compact ? 117 : 145)
height: 33
level: root.ratesReady ? root.cpuFraction : 0.25
}
Column {
anchors.right: parent.right
anchors.rightMargin: 14
y: 34
width: root.compact ? 92 : 116
spacing: 1
Text {
width: parent.width
text: root.networkRxText
horizontalAlignment: Text.AlignRight
color: Theme.accent
font.family: Theme.displayFont
font.pixelSize: root.compact ? 11 : 13
font.bold: true
elide: Text.ElideLeft
}
MicroText { width: parent.width; text: "RX // DOWN"; horizontalAlignment: Text.AlignRight }
Text {
width: parent.width
text: root.networkTxText
horizontalAlignment: Text.AlignRight
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: root.compact ? 11 : 13
font.bold: true
elide: Text.ElideLeft
}
MicroText { width: parent.width; text: "TX // UP"; horizontalAlignment: Text.AlignRight }
}
}
StatusBarPanel {
width: array.stateWidth
height: array.height
panelId: "04"
title: "SYSTEM STATE"
Row {
x: 10
y: 35
spacing: 6
StateCell { code: "N"; active: root.ratesReady; label: "NET" }
StateCell { code: root.audioMuted ? "M" : "A"; active: !root.audioMuted; label: "AUD" }
StateCell { visible: !root.compact; code: String(root.trayCount); active: root.trayCount > 0; label: "TRAY" }
}
Rectangle {
x: root.compact ? 101 : 151
y: 33
width: 1
height: 46
color: Theme.hair
}
Column {
anchors.right: parent.right
anchors.rightMargin: 12
y: 34
width: root.compact ? 91 : 82
spacing: 2
Text {
width: parent.width
text: root.timeText(root.now)
horizontalAlignment: Text.AlignRight
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: root.compact ? 20 : 22
font.bold: true
font.letterSpacing: 1
}
Text {
width: parent.width
text: root.dateText(root.now)
horizontalAlignment: Text.AlignRight
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 6
elide: Text.ElideLeft
}
MicroText { width: parent.width; text: "LOCAL TIME"; horizontalAlignment: Text.AlignRight }
}
}
}
}
StatusBarPanel {
id: rail
x: 12
y: 108
width: root.width - 24
height: 34
showHeader: false
chamfer: 10
Row {
anchors.fill: parent
anchors.leftMargin: 10
anchors.rightMargin: 10
RailSection {
width: root.compact ? 252 : 310
Text {
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: "06 // DESKTOP"
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 7
font.letterSpacing: 1
}
Row {
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
spacing: 3
Repeater {
model: root.workspaceIds.slice(0, root.compact ? 4 : 6)
Rectangle {
required property var modelData
width: 24
height: 17
color: Number(modelData) === root.activeWorkspaceId ? Theme.accentAlpha(0.18) : "transparent"
border.width: 1
border.color: Number(modelData) === root.activeWorkspaceId ? Theme.accent : Theme.hair
Text {
anchors.centerIn: parent
text: root.two(Number(parent.modelData))
color: Number(parent.modelData) === root.activeWorkspaceId ? Theme.accent : Theme.muted
font.family: Theme.microFont
font.pixelSize: 7
}
MouseArea {
anchors.fill: parent
onClicked: root.workspaceActivated(Number(parent.modelData))
}
}
}
}
}
RailSection {
width: root.compact ? 260 : 410
MicroText { x: 9; anchors.verticalCenter: parent.verticalCenter; text: "PROCESS" }
Text {
x: 76
anchors.verticalCenter: parent.verticalCenter
text: "COMPOSITOR // NODE_EXPORTER // SHELL"
color: root.telemetryReady ? Theme.text : Theme.muted
font.family: Theme.microFont
font.pixelSize: 7
elide: Text.ElideRight
width: parent.width - 84
}
}
RailSection {
width: root.compact ? 300 : 385
MicroText { x: 9; anchors.verticalCenter: parent.verticalCenter; text: "VOL // ROOT" }
Text {
x: 93
anchors.verticalCenter: parent.verticalCenter
text: root.storageFreeText
color: Theme.text
font.family: Theme.microFont
font.pixelSize: 8
}
SegmentMeter {
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
width: root.compact ? 95 : 170
height: 7
segments: root.compact ? 10 : 16
value: root.storageFraction
ready: root.telemetryReady
}
}
RailSection {
visible: !root.compact
width: 350
MicroText { x: 9; anchors.verticalCenter: parent.verticalCenter; text: "AUDIO BUS" }
Text {
x: 89
anchors.verticalCenter: parent.verticalCenter
text: root.audioMuted ? "MUTED" : Math.round(root.audioFraction * 100) + "%"
color: root.audioMuted ? Theme.muted : Theme.accent
font.family: Theme.microFont
font.pixelSize: 8
}
SegmentMeter {
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
width: 155
height: 7
segments: 16
value: root.audioFraction
ready: true
}
}
RailSection {
width: Math.max(150, rail.width - (root.compact ? 812 : 1455) - 20)
borderVisible: false
MicroText { x: 9; anchors.verticalCenter: parent.verticalCenter; text: root.compact ? "SYS // " + root.timeText(root.now) : "EVENTS" }
Text {
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
text: root.telemetryReady ? "WARN:00 // ERR:00" : "TELEMETRY WAIT"
color: root.telemetryReady ? Theme.muted : Theme.accent
font.family: Theme.microFont
font.pixelSize: 7
elide: Text.ElideLeft
width: parent.width - 64
horizontalAlignment: Text.AlignRight
}
}
}
}
// Bottom routing trace and caution hatch.
Shape {
x: 12
y: 150
width: root.width - 24
height: 12
ShapePath {
fillColor: "transparent"
strokeColor: Theme.accentAlpha(0.55)
strokeWidth: 1
startX: 0; startY: 1
PathLine { x: 220; y: 1 }
PathLine { x: 232; y: 11 }
PathLine { x: 330; y: 11 }
}
}
Row {
x: 360
y: 151
width: root.width - 372
height: 3
spacing: 5
clip: true
Repeater {
model: Math.ceil(parent.width / 10)
Rectangle {
required property int index
width: 5
height: 3
color: index % 2 === 0 ? Theme.accent : "transparent"
opacity: 0.58
}
}
}
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 6
font.letterSpacing: 0.7
}
component RailSection: Item {
property bool borderVisible: true
height: rail.height
Rectangle {
visible: parent.borderVisible
anchors.right: parent.right
width: 1
height: parent.height
color: Theme.hair
opacity: 0.65
}
}
component MetricBlock: Item {
id: metric
property string label: ""
property real value: 0
property bool ready: false
property string readout: "--"
property string detailLeft: ""
property string detailRight: ""
height: 51
MicroText { x: 0; y: 1; text: metric.label; font.pixelSize: 7 }
Text {
anchors.right: parent.right
y: -3
text: metric.readout
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: root.compact ? 14 : 17
font.bold: true
}
SegmentMeter {
x: 0; y: 19
width: parent.width
height: 9
segments: 10
value: metric.value
ready: metric.ready
}
MicroText { x: 0; y: 34; text: metric.detailLeft }
MicroText { anchors.right: parent.right; y: 34; text: metric.detailRight; horizontalAlignment: Text.AlignRight }
}
component SegmentMeter: Row {
id: meter
property int segments: 10
property real value: 0
property bool ready: false
spacing: 2
Repeater {
model: meter.segments
Rectangle {
required property int index
width: Math.max(2, (meter.width - (meter.segments - 1) * meter.spacing) / meter.segments)
height: meter.height
readonly property bool on: meter.ready && index < Math.round(Math.max(0, Math.min(1, meter.value)) * meter.segments)
color: on ? Theme.accent : Theme.textAlpha(0.06)
border.width: 1
border.color: on ? Theme.accent : Theme.textAlpha(0.18)
}
}
}
component StateCell: Item {
id: state
property string code: "--"
property string label: ""
property bool active: false
width: root.compact ? 39 : 43
height: 42
Shape {
anchors.fill: parent
ShapePath {
fillColor: state.active ? Theme.accentAlpha(0.18) : "transparent"
strokeColor: state.active ? Theme.accent : Theme.hair
strokeWidth: 1
startX: 1; startY: 1
PathLine { x: parent.width - 7; y: 1 }
PathLine { x: parent.width - 1; y: 7 }
PathLine { x: parent.width - 1; y: parent.height - 1 }
PathLine { x: 7; y: parent.height - 1 }
PathLine { x: 1; y: parent.height - 7 }
PathLine { x: 1; y: 1 }
}
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
y: 7
text: state.code
color: state.active ? Theme.accent : Theme.text
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
}
MicroText { anchors.horizontalCenter: parent.horizontalCenter; y: 27; text: state.label }
}
component RadarGauge: Item {
id: radar
property real size: 58
property real level: 0
width: size
height: size
Repeater {
model: [1, 0.72, 0.36]
Rectangle {
required property int index
required property var modelData
anchors.centerIn: parent
width: radar.size * Number(modelData)
height: width
radius: width / 2
color: "transparent"
border.width: 1
border.color: index === 0 ? Theme.accent : Theme.hair
}
}
Rectangle { x: 0; y: parent.height / 2; width: parent.width; height: 1; color: Theme.hair }
Rectangle { x: parent.width / 2; y: 0; width: 1; height: parent.height; color: Theme.hair }
Rectangle { x: 12; y: 18; width: 4; height: 4; color: Theme.accent }
Rectangle { x: parent.width - 14; y: parent.height - 20; width: 4; height: 4; color: Theme.accent }
Rectangle { x: parent.width / 2; y: parent.height - 11; width: 4; height: 4; color: Theme.accent }
MicroText { anchors.right: parent.right; y: 3; text: "R:" + Math.round(radar.level * 99); color: Theme.accent }
}
component NetworkTrace: Item {
id: trace
property real level: 0
Rectangle { x: 0; y: parent.height - 1; width: parent.width; height: 1; color: Theme.hair }
Rectangle { x: 0; y: 0; width: 1; height: parent.height; color: Theme.hair }
Shape {
anchors.fill: parent
ShapePath {
fillColor: "transparent"
strokeColor: Theme.accent
strokeWidth: 1.2
startX: 0; startY: trace.height * 0.65
PathLine { x: trace.width * 0.10; y: trace.height * 0.65 }
PathLine { x: trace.width * 0.15; y: trace.height * (0.25 + trace.level * 0.15) }
PathLine { x: trace.width * 0.21; y: trace.height * 0.78 }
PathLine { x: trace.width * 0.31; y: trace.height * 0.56 }
PathLine { x: trace.width * 0.43; y: trace.height * 0.62 }
PathLine { x: trace.width * 0.49; y: trace.height * 0.18 }
PathLine { x: trace.width * 0.57; y: trace.height * 0.82 }
PathLine { x: trace.width * 0.68; y: trace.height * 0.58 }
PathLine { x: trace.width * 0.79; y: trace.height * 0.62 }
PathLine { x: trace.width * 0.85; y: trace.height * 0.34 }
PathLine { x: trace.width * 0.91; y: trace.height * 0.75 }
PathLine { x: trace.width; y: trace.height * 0.60 }
}
}
}
}
@@ -0,0 +1,130 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import qs.widgets.theme
// Chamfered panel chrome for the dense status rail: outline, corner accent
// lines, and the optional header strip (id chip / title / meta / tick marks).
// Content is supplied as children by the call site.
//
// Colors and fonts both come from the Theme singleton.
Item {
id: panel
property string panelId: ""
property string title: ""
property string meta: ""
property bool showHeader: true
property int chamfer: 13
property int offsetY: 2
property int accentLineThickness: 3
Shape {
id: panelShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.surface
strokeColor: Theme.hair
strokeWidth: 1
startX: 0; startY: panel.offsetY
PathLine { x: panelShape.width - panel.chamfer; y: panel.offsetY }
PathLine { x: panelShape.width; y: panel.chamfer }
PathLine { x: panelShape.width; y: panelShape.height }
PathLine { x: panel.chamfer; y: panelShape.height }
PathLine { x: 0; y: panelShape.height - panel.chamfer }
PathLine { x: 0; y: panel.offsetY }
}
// Upper left accent line
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: 0
PathLine { x: Math.min(49, panelShape.width / 3); y: 0 }
PathLine { x: Math.min(49, panelShape.width / 3); y: panel.accentLineThickness }
PathLine { x: 0; y: panel.accentLineThickness }
PathLine { x: 0; y: 0 }
}
// Lower right accent line
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: panelShape.width; startY: panelShape.height
PathLine { x: panelShape.width - Math.min(49, panelShape.width / 3); y: panelShape.height }
PathLine { x: panelShape.width - Math.min(49, panelShape.width / 3); y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height - panel.accentLineThickness }
PathLine { x: panelShape.width; y: panelShape.height }
}
}
Rectangle {
visible: panel.showHeader
x: 1; y: 22
width: parent.width - 2
height: 1
color: Theme.text
opacity: 0.12
}
Rectangle {
visible: panel.showHeader
x: 5; y: 7
width: panel.panelId.length > 2 ? 29 : 24
height: 11
color: Theme.accent
Text {
anchors.centerIn: parent
text: panel.panelId
color: Theme.surface
font.family: Theme.microFont
font.pixelSize: 8
font.bold: true
}
}
Text {
visible: panel.showHeader
x: 40; y: 7
width: parent.width - 105
text: panel.title
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 9
font.bold: true
font.letterSpacing: 1.1
elide: Text.ElideRight
}
// Inlined rather than reusing DenseBarContent's MicroText, which is an
// inline component and therefore not visible from another file.
Text {
visible: panel.showHeader && panel.meta.length > 0
anchors.right: parent.right
anchors.rightMargin: 12
y: 6
text: panel.meta
width: Math.min(80, parent.width / 4)
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 6
font.letterSpacing: 0.7
horizontalAlignment: Text.AlignRight
elide: Text.ElideRight
}
Row {
visible: panel.showHeader
anchors.right: parent.right
anchors.rightMargin: 10
y: 14
spacing: 2
Repeater {
model: 5
Rectangle { required property int index; width: 4; height: 2; color: Theme.accent }
}
}
}
@@ -1,10 +1,11 @@
import QtQuick import QtQuick
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.theme
Shape { Shape {
preferredRendererType: Shape.CurveRenderer preferredRendererType: Shape.CurveRenderer
ShapePath { ShapePath {
fillColor: "#FFD063" fillColor: Theme.accent
strokeWidth: 0 strokeWidth: 0
startX: 0 startX: 0
@@ -5,6 +5,7 @@ import QtQuick.Layouts
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.decoration import qs.widgets.decoration
import qs.widgets.theme
WrapperItem { WrapperItem {
RowLayout { RowLayout {
@@ -24,7 +25,7 @@ WrapperItem {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#0F1012" fillColor: Theme.surface
startX: 8 startX: 8
startY: 0 startY: 0
@@ -52,7 +53,7 @@ WrapperItem {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#0F1012" fillColor: Theme.surface
startX: 16 startX: 16
startY: 0 startY: 0
@@ -83,7 +84,7 @@ WrapperItem {
startY: 0 startY: 0
strokeWidth: 0 strokeWidth: 0
fillColor: "#0F1012" fillColor: Theme.surface
PathLine { PathLine {
x: shape.width x: shape.width
@@ -0,0 +1,80 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import QtQuick
import qs.widgets.theme
// Variant 9 — asymmetric Blade application launcher.
Scope {
id: root
property bool active: false
function toggle() { root.active = !root.active; }
GlobalShortcut {
name: "launcher9"
description: "Toggle app launcher (Blade matrix)"
onPressed: root.toggle()
}
PanelWindow {
id: win
visible: root.active
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
exclusionMode: ExclusionMode.Ignore
color: Theme.textAlpha(0)
anchors { top: true; left: true; right: true; bottom: true }
property int selectedIndex: 0
function clampSelection(index) {
return model.apps.length === 0 ? 0 : Math.max(0, Math.min(model.apps.length - 1, index));
}
function move(delta) {
const count = model.apps.length;
if (count === 0)
return;
selectedIndex = ((selectedIndex + delta) % count + count) % count;
}
function launch(index) {
if (model.launch(index))
root.active = false;
}
onVisibleChanged: {
if (visible) {
content.clearSearch();
selectedIndex = 0;
content.focusSearch();
}
}
AppModel { id: model; search: content.query }
Rectangle {
anchors.fill: parent
color: Theme.surface
opacity: 0.78
MouseArea { anchors.fill: parent; onClicked: root.active = false }
}
BladeLauncherContent {
id: content
anchors.centerIn: parent
width: 1120
height: 640
scale: Math.min(1, (parent.width - 56) / width, (parent.height - 56) / height)
transformOrigin: Item.Center
apps: model.apps
selectedIndex: win.selectedIndex
onSelectionRequested: index => win.selectedIndex = win.clampSelection(index)
onMoveRequested: delta => win.move(delta)
onLaunchRequested: index => win.launch(index)
onDismissRequested: root.active = false
}
}
}
@@ -0,0 +1,473 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Shapes
import qs.widgets.theme
// Variant 9 visual core: asymmetric "Blade" composition. It shares the shell
// Theme and AppModel contract, but intentionally does not reuse StatusBarPanel
// or the nested-panel structure of ApplicationLauncherContent.
Item {
id: root
property var apps: []
property int selectedIndex: 0
property bool showIcons: true
property alias query: commandInput.text
readonly property var selectedApp: apps.length > 0 && selectedIndex >= 0 && selectedIndex < apps.length
? apps[selectedIndex] : null
signal selectionRequested(int index)
signal moveRequested(int delta)
signal launchRequested(int index)
signal dismissRequested
function focusSearch() { commandInput.forceActiveFocus(); }
function clearSearch() { commandInput.text = ""; }
implicitWidth: 1120
implicitHeight: 640
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 7
font.letterSpacing: 0.9
elide: Text.ElideRight
}
Rectangle { anchors.fill: parent; color: Theme.surface }
// Sparse circuit traces behind the active surfaces.
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.accentAlpha(0.24)
strokeWidth: 1
startX: 24; startY: 92
PathLine { x: 115; y: 92 }
PathLine { x: 138; y: 69 }
PathLine { x: 480; y: 69 }
PathLine { x: 494; y: 55 }
PathLine { x: 840; y: 55 }
}
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.hair
strokeWidth: 1
startX: 115; startY: 570
PathLine { x: 146; y: 601 }
PathLine { x: 775; y: 601 }
PathLine { x: 801; y: 575 }
PathLine { x: 1095; y: 575 }
}
}
// Top command mast — an open angular frame rather than panel chrome.
Shape {
id: mast
x: 26; y: 18
width: parent.width - 52; height: 72
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0.018)
strokeColor: Theme.hair
strokeWidth: 1
startX: 0; startY: 17
PathLine { x: 17; y: 0 }
PathLine { x: mast.width - 110; y: 0 }
PathLine { x: mast.width - 88; y: 22 }
PathLine { x: mast.width; y: 22 }
PathLine { x: mast.width; y: mast.height }
PathLine { x: 0; y: mast.height }
PathLine { x: 0; y: 17 }
}
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: 17
PathLine { x: 17; y: 0 }
PathLine { x: 122; y: 0 }
PathLine { x: 116; y: 4 }
PathLine { x: 20; y: 4 }
PathLine { x: 4; y: 20 }
PathLine { x: 4; y: mast.height }
PathLine { x: 0; y: mast.height }
PathLine { x: 0; y: 17 }
}
}
Text {
x: 54; y: 31
text: "BLADE // EXECUTION MATRIX"
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 16
font.bold: true
font.letterSpacing: 1.4
}
MicroText { x: 56; y: 57; text: "09 / APPLICATION ROUTER / LOCAL DESKTOP ENTRIES"; color: Theme.accent }
Row {
anchors.right: parent.right
anchors.rightMargin: 48
y: 37
spacing: 4
Repeater {
model: 16
Rectangle {
required property int index
width: 9; height: index % 4 === 0 ? 16 : 8
y: index % 4 === 0 ? 0 : 8
color: index < Math.min(16, root.apps.length + 6) ? Theme.accent : Theme.hair
transform: Rotation { angle: -28 }
}
}
}
// Left category rotor and mode spine.
Item {
id: rotorZone
x: 26; y: 108
width: 188; height: 444
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0.018)
strokeColor: Theme.hair
strokeWidth: 1
startX: 0; startY: 0
PathLine { x: 154; y: 0 }
PathLine { x: 188; y: 34 }
PathLine { x: 188; y: 408 }
PathLine { x: 152; y: 444 }
PathLine { x: 0; y: 444 }
PathLine { x: 0; y: 0 }
}
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: 0
PathLine { x: 7; y: 0 }
PathLine { x: 7; y: 444 }
PathLine { x: 0; y: 444 }
PathLine { x: 0; y: 0 }
}
}
Text {
x: 20; y: 18
text: "VECTOR"
color: Theme.accent
font.family: Theme.displayFont
font.pixelSize: 11
font.bold: true
font.letterSpacing: 1.4
}
MicroText { x: 20; y: 38; text: "CATEGORY BUS" }
Item {
id: rotor
anchors.horizontalCenter: parent.horizontalCenter
y: 70; width: 126; height: 126
Rectangle { anchors.centerIn: parent; width: 116; height: 116; radius: 58; color: Theme.textAlpha(0); border.width: 1; border.color: Theme.accentAlpha(0.55) }
Rectangle { anchors.centerIn: parent; width: 82; height: 82; radius: 41; color: Theme.textAlpha(0); border.width: 1; border.color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 126; height: 1; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 1; height: 126; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 32; height: 32; color: Theme.accentAlpha(0.18); border.width: 1; border.color: Theme.accent; transform: Rotation { angle: 45 } }
Text { anchors.centerIn: parent; text: "A"; color: Theme.accent; font.family: Theme.displayFont; font.pixelSize: 16; font.bold: true }
Repeater {
model: 4
Rectangle {
required property int index
width: 6; height: 6; radius: 3
x: [16, 101, 101, 16][index]
y: [16, 16, 101, 101][index]
color: Theme.accent
}
}
}
Column {
x: 18; y: 218
width: parent.width - 38
spacing: 7
Repeater {
model: ["ALL TARGETS", "SYSTEM", "DEVELOP", "NETWORK", "MEDIA"]
Rectangle {
required property int index
required property string modelData
width: parent.width - index * 5
height: 31
x: index * 5
color: index === 0 ? Theme.accentAlpha(0.14) : Theme.textAlpha(0.025)
border.width: 1
border.color: index === 0 ? Theme.accent : Theme.hair
Text {
x: 9; anchors.verticalCenter: parent.verticalCenter
text: String(index).padStart(2, "0") + " " + modelData
color: index === 0 ? Theme.accent : Theme.muted
font.family: Theme.microFont
font.pixelSize: 7
font.bold: index === 0
font.letterSpacing: 0.7
}
}
}
}
MicroText { x: 18; anchors.bottom: parent.bottom; anchors.bottomMargin: 14; text: "BUS // UNFILTERED"; color: Theme.accent }
}
// Central command spine.
Item {
id: commandZone
x: 230; y: 108
width: 594; height: 486
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0.012)
strokeColor: Theme.hair
strokeWidth: 1
startX: 20; startY: 0
PathLine { x: commandZone.width; y: 0 }
PathLine { x: commandZone.width - 20; y: commandZone.height }
PathLine { x: 0; y: commandZone.height }
PathLine { x: 20; y: 0 }
}
}
// Search blade.
Shape {
id: searchBlade
x: 12; y: 12; width: parent.width - 32; height: 58
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.accentAlpha(0.10)
strokeColor: Theme.accent
strokeWidth: 1
startX: 18; startY: 0
PathLine { x: searchBlade.width; y: 0 }
PathLine { x: searchBlade.width - 18; y: searchBlade.height }
PathLine { x: 0; y: searchBlade.height }
PathLine { x: 18; y: 0 }
}
}
Text { x: 32; y: 28; text: ">"; color: Theme.accent; font.family: Theme.displayFont; font.pixelSize: 20; font.bold: true }
TextInput {
id: commandInput
x: 62; y: 22; width: 430; height: 38
verticalAlignment: TextInput.AlignVCenter
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 17
font.letterSpacing: 1
clip: true
onTextChanged: root.selectionRequested(0)
Keys.onPressed: event => {
switch (event.key) {
case Qt.Key_Down: case Qt.Key_Tab: root.moveRequested(1); event.accepted = true; break;
case Qt.Key_Up: case Qt.Key_Backtab: root.moveRequested(-1); event.accepted = true; break;
case Qt.Key_PageDown: root.moveRequested(5); event.accepted = true; break;
case Qt.Key_PageUp: root.moveRequested(-5); event.accepted = true; break;
case Qt.Key_Return: case Qt.Key_Enter: root.launchRequested(root.selectedIndex); event.accepted = true; break;
case Qt.Key_Escape: root.dismissRequested(); event.accepted = true; break;
}
}
Text { anchors.fill: parent; verticalAlignment: Text.AlignVCenter; visible: commandInput.text.length === 0; text: "ACQUIRE TARGET"; color: Theme.muted; font: commandInput.font }
}
MicroText { anchors.right: parent.right; anchors.rightMargin: 38; y: 35; text: root.apps.length + " HIT"; color: Theme.accent }
ListView {
id: bladeList
x: 10; y: 84; width: parent.width - 26; height: 382
model: root.apps
currentIndex: root.selectedIndex
clip: true
spacing: 4
boundsBehavior: Flickable.StopAtBounds
onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)
delegate: MouseArea {
id: blade
required property int index
required property var modelData
readonly property bool selected: index === root.selectedIndex
width: ListView.view.width - (index % 2 === 0 ? 0 : 16)
height: 43
x: index % 2 === 0 ? 0 : 16
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: root.selectionRequested(index)
onClicked: root.launchRequested(index)
Shape {
id: bladeShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: blade.selected ? Theme.selection : Theme.textAlpha(0.025)
strokeColor: blade.selected ? Theme.accent : Theme.textAlpha(0.12)
strokeWidth: 1
startX: 16; startY: 0
PathLine { x: bladeShape.width; y: 0 }
PathLine { x: bladeShape.width - 24; y: bladeShape.height }
PathLine { x: 0; y: bladeShape.height }
PathLine { x: 16; y: 0 }
}
ShapePath {
fillColor: blade.selected ? Theme.accent : Theme.textAlpha(0.12)
strokeWidth: 0
startX: 16; startY: 0
PathLine { x: 22; y: 0 }
PathLine { x: 6; y: bladeShape.height }
PathLine { x: 0; y: bladeShape.height }
PathLine { x: 16; y: 0 }
}
}
RowLayout {
anchors.fill: parent
anchors.leftMargin: 26
anchors.rightMargin: 28
spacing: 10
Text { Layout.preferredWidth: 26; text: String(blade.index + 1).padStart(2, "0"); color: blade.selected ? Theme.accent : Theme.muted; font.family: Theme.microFont; font.pixelSize: 7 }
Rectangle {
Layout.preferredWidth: 28; Layout.preferredHeight: 28
color: blade.selected ? Theme.accentAlpha(0.14) : Theme.textAlpha(0.025)
border.width: 1; border.color: blade.selected ? Theme.accent : Theme.hair
IconImage { visible: root.showIcons; anchors.centerIn: parent; implicitSize: 20; source: root.showIcons ? Quickshell.iconPath(blade.modelData.icon || "application-x-executable", "application-x-executable") : "" }
Text { visible: !root.showIcons; anchors.centerIn: parent; text: String(blade.modelData.name || "?").charAt(0).toUpperCase(); color: blade.selected ? Theme.accent : Theme.text; font.family: Theme.displayFont; font.pixelSize: 11; font.bold: true }
}
Text { Layout.fillWidth: true; text: blade.modelData.name || "UNKNOWN"; color: blade.selected ? Theme.accent : Theme.text; font.family: Theme.displayFont; font.pixelSize: 10; font.bold: blade.selected; elide: Text.ElideRight }
MicroText { Layout.preferredWidth: 125; horizontalAlignment: Text.AlignRight; text: blade.modelData.genericName || "APPLICATION" }
Rectangle { Layout.preferredWidth: blade.selected ? 32 : 12; Layout.preferredHeight: 3; color: blade.selected ? Theme.accent : Theme.hair }
}
}
Text { anchors.centerIn: parent; visible: root.apps.length === 0; text: "NO TARGET VECTOR"; color: Theme.muted; font.family: Theme.microFont; font.pixelSize: 9; font.letterSpacing: 1.2 }
}
}
// Right dossier: open brackets and data lines, deliberately not a panel.
Item {
id: dossier
x: 842; y: 108
width: 252; height: 444
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.accent
strokeWidth: 2
startX: 36; startY: 0
PathLine { x: 0; y: 0 }
PathLine { x: 0; y: 86 }
}
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.accent
strokeWidth: 2
startX: dossier.width - 36; startY: dossier.height
PathLine { x: dossier.width; y: dossier.height }
PathLine { x: dossier.width; y: dossier.height - 86 }
}
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.hair
strokeWidth: 1
startX: 20; startY: 20
PathLine { x: dossier.width; y: 20 }
PathLine { x: dossier.width; y: dossier.height - 20 }
PathLine { x: 0; y: dossier.height - 20 }
PathLine { x: 0; y: 104 }
}
}
MicroText { x: 18; y: 12; text: "ACTIVE DOSSIER"; color: Theme.accent }
Text {
x: 18; y: 45; width: parent.width - 36
text: root.selectedApp ? root.selectedApp.name : "NO TARGET"
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 18
font.bold: true
font.letterSpacing: 0.8
wrapMode: Text.Wrap
maximumLineCount: 2
elide: Text.ElideRight
}
MicroText { x: 18; y: 94; width: parent.width - 36; text: root.selectedApp ? (root.selectedApp.genericName || "DESKTOP APPLICATION") : "AWAITING ACQUISITION"; color: Theme.accent }
Rectangle { x: 18; y: 119; width: parent.width - 36; height: 1; color: Theme.hair }
MicroText { x: 18; y: 137; width: parent.width - 36; height: 52; wrapMode: Text.Wrap; maximumLineCount: 4; text: root.selectedApp ? (root.selectedApp.comment || "No metadata supplied by desktop entry.") : "Enter a search vector and select an executable target." }
Column {
x: 18; y: 210; width: parent.width - 36; spacing: 8
Repeater {
model: [
{ k: "INDEX", v: String(Math.max(0, root.selectedIndex + 1)).padStart(3, "0") },
{ k: "TYPE", v: "DESKTOP ENTRY" },
{ k: "ROUTE", v: "DETACHED" },
{ k: "STATE", v: root.selectedApp ? "ARMED" : "IDLE" }
]
Item {
required property var modelData
width: parent.width; height: 27
Rectangle { x: 0; y: parent.height - 1; width: parent.width; height: 1; color: Theme.hair }
MicroText { x: 0; anchors.verticalCenter: parent.verticalCenter; text: modelData.k }
Text { anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter; text: modelData.v; color: modelData.k === "STATE" ? Theme.accent : Theme.text; font.family: Theme.displayFont; font.pixelSize: 8; font.bold: true; font.letterSpacing: 0.5 }
}
}
}
MouseArea {
id: fire
x: 18; anchors.bottom: parent.bottom; anchors.bottomMargin: 34
width: parent.width - 36; height: 44
enabled: root.selectedApp !== null
hoverEnabled: true
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: root.launchRequested(root.selectedIndex)
Shape {
id: fireShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: fire.containsMouse ? Theme.accent : Theme.accentAlpha(0.16)
strokeColor: Theme.accent
strokeWidth: 1
startX: 14; startY: 0
PathLine { x: fireShape.width; y: 0 }
PathLine { x: fireShape.width - 14; y: fireShape.height }
PathLine { x: 0; y: fireShape.height }
PathLine { x: 14; y: 0 }
}
}
Text { anchors.centerIn: parent; text: "LAUNCH VECTOR"; color: fire.containsMouse ? Theme.surface : Theme.accent; font.family: Theme.displayFont; font.pixelSize: 10; font.bold: true; font.letterSpacing: 1.2 }
}
}
// Bottom caution lane and key map.
Row {
x: 28; y: 612; spacing: 4
Repeater { model: 30; Rectangle { required property int index; width: 12; height: 4; color: index % 3 === 0 ? Theme.accent : Theme.hair; transform: Rotation { angle: -32 } } }
}
MicroText { x: 420; y: 606; text: "↑↓ SELECT // ENTER LAUNCH // ESC ABORT // PGUP/PGDN STEP"; color: Theme.accent }
MicroText { anchors.right: parent.right; anchors.rightMargin: 28; y: 606; text: "BLADE-09 / CRC A7F2" }
}
@@ -0,0 +1,88 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import QtQuick
import qs.widgets.theme
// Variant 11 — cyberpunk bottom dock inspired by V5's rising carousel.
Scope {
id: root
property bool active: false
function toggle() { root.active = !root.active; }
onActiveChanged: {
LauncherState.dockOpen = root.active;
if (root.active)
win.prepareOpen();
}
GlobalShortcut {
name: "launcher11"
description: "Toggle app launcher (Cyber Dock)"
onPressed: root.toggle()
}
PanelWindow {
id: win
visible: root.active || deck.y < height
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: root.active ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
exclusionMode: ExclusionMode.Ignore
color: Theme.textAlpha(0)
anchors { bottom: true; left: true; right: true }
margins { bottom: 10; left: 12; right: 12 }
implicitHeight: 290
property int selectedIndex: 0
function prepareOpen() {
deck.clearSearch();
selectedIndex = 0;
deck.focusSearch();
}
function clampSelection(index) {
return model.apps.length === 0 ? 0 : Math.max(0, Math.min(model.apps.length - 1, index));
}
function move(delta) {
const count = model.apps.length;
if (count === 0)
return;
selectedIndex = ((selectedIndex + delta) % count + count) % count;
}
function launch(index) {
if (model.launch(index))
root.active = false;
}
AppModel { id: model; search: deck.query }
CyberDockContent {
id: deck
width: 1440
height: 272
x: (parent.width - width) / 2
y: root.active ? parent.height - height : parent.height + 4
scale: Math.min(1, (parent.width - 16) / width)
transformOrigin: Item.Bottom
apps: model.apps
selectedIndex: win.selectedIndex
Behavior on y {
NumberAnimation {
duration: 240
easing.type: root.active ? Easing.OutCubic : Easing.InCubic
}
}
onSelectionRequested: index => win.selectedIndex = win.clampSelection(index)
onMoveRequested: delta => win.move(delta)
onLaunchRequested: index => win.launch(index)
onDismissRequested: root.active = false
}
}
}
@@ -0,0 +1,300 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Shapes
import qs.widgets.theme
// Headlessly renderable visual core for variant 11. Inspired by V5's bottom
// deck and horizontal carousel, but owns a denser industrial cyberpunk chassis.
Item {
id: root
property var apps: []
property int selectedIndex: 0
property bool showIcons: true
property alias query: dockInput.text
readonly property var selectedApp: apps.length > 0 && selectedIndex >= 0 && selectedIndex < apps.length
? apps[selectedIndex] : null
signal selectionRequested(int index)
signal moveRequested(int delta)
signal launchRequested(int index)
signal dismissRequested
function focusSearch() { dockInput.forceActiveFocus(); }
function clearSearch() { dockInput.text = ""; }
implicitWidth: 1440
implicitHeight: 272
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 7
font.letterSpacing: 0.9
elide: Text.ElideRight
}
Rectangle { anchors.fill: parent; color: Theme.textAlpha(0) }
// Main dock chassis with clipped upper corners and heavier lower edge.
Shape {
id: chassis
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.surface
strokeColor: Theme.hair
strokeWidth: 1
startX: 28; startY: 0
PathLine { x: chassis.width - 28; y: 0 }
PathLine { x: chassis.width; y: 28 }
PathLine { x: chassis.width; y: chassis.height }
PathLine { x: 0; y: chassis.height }
PathLine { x: 0; y: 28 }
PathLine { x: 28; y: 0 }
}
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 28; startY: 0
PathLine { x: 250; y: 0 }
PathLine { x: 244; y: 4 }
PathLine { x: 32; y: 4 }
PathLine { x: 4; y: 32 }
PathLine { x: 4; y: 96 }
PathLine { x: 0; y: 96 }
PathLine { x: 0; y: 28 }
PathLine { x: 28; y: 0 }
}
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: chassis.height - 6
PathLine { x: chassis.width; y: chassis.height - 6 }
PathLine { x: chassis.width; y: chassis.height }
PathLine { x: 0; y: chassis.height }
PathLine { x: 0; y: chassis.height - 6 }
}
}
// Top caution seam.
Row {
x: 270; y: 1; spacing: 5
Repeater {
model: 58
Rectangle {
required property int index
width: 10; height: 3
color: index % 4 === 0 ? Theme.accent : Theme.hair
transform: Rotation { angle: -32 }
}
}
}
// Left system coupler.
Item {
id: coupler
x: 18; y: 18
width: 156; height: 184
Rectangle { anchors.centerIn: parent; width: 112; height: 112; radius: 56; color: Theme.textAlpha(0.012); border.width: 1; border.color: Theme.accentAlpha(0.55) }
Rectangle { anchors.centerIn: parent; width: 78; height: 78; radius: 39; color: Theme.textAlpha(0); border.width: 1; border.color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 118; height: 1; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 1; height: 118; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 38; height: 38; color: Theme.accentAlpha(0.16); border.width: 1; border.color: Theme.accent; transform: Rotation { angle: 45 } }
Text { anchors.centerIn: parent; text: "11"; color: Theme.accent; font.family: Theme.displayFont; font.pixelSize: 13; font.bold: true }
MicroText { anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom; anchors.bottomMargin: 15; text: "DOCK BUS"; color: Theme.accent }
}
Text {
x: 24; y: 16
text: "CYBER//DOCK"
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 9
font.bold: true
font.letterSpacing: 1
}
// Horizontal cartridge conveyor.
ListView {
id: cartridgeList
x: 178; y: 20
width: root.width - 356
height: 180
orientation: ListView.Horizontal
model: root.apps
currentIndex: root.selectedIndex
spacing: 8
clip: true
boundsBehavior: Flickable.StopAtBounds
onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)
delegate: MouseArea {
id: cartridge
required property int index
required property var modelData
readonly property bool selected: index === root.selectedIndex
width: selected ? 128 : 108
height: selected ? 176 : 148
y: selected ? 0 : 24
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: root.selectionRequested(index)
onClicked: root.launchRequested(index)
Behavior on y { NumberAnimation { duration: 120; easing.type: Easing.OutCubic } }
Behavior on height { NumberAnimation { duration: 120; easing.type: Easing.OutCubic } }
Shape {
id: cartridgeShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: cartridge.selected ? Theme.selection : Theme.textAlpha(0.022)
strokeColor: cartridge.selected ? Theme.accent : Theme.hair
strokeWidth: cartridge.selected ? 2 : 1
startX: 12; startY: 0
PathLine { x: cartridgeShape.width - 8; y: 0 }
PathLine { x: cartridgeShape.width; y: 8 }
PathLine { x: cartridgeShape.width; y: cartridgeShape.height - 14 }
PathLine { x: cartridgeShape.width - 14; y: cartridgeShape.height }
PathLine { x: 0; y: cartridgeShape.height }
PathLine { x: 0; y: 12 }
PathLine { x: 12; y: 0 }
}
ShapePath {
fillColor: cartridge.selected ? Theme.accent : Theme.textAlpha(0.12)
strokeWidth: 0
startX: 0; startY: cartridgeShape.height - 6
PathLine { x: cartridgeShape.width - 14; y: cartridgeShape.height - 6 }
PathLine { x: cartridgeShape.width - 20; y: cartridgeShape.height }
PathLine { x: 0; y: cartridgeShape.height }
PathLine { x: 0; y: cartridgeShape.height - 6 }
}
}
MicroText { x: 9; y: 8; text: "C" + String(cartridge.index + 1).padStart(2, "0"); color: cartridge.selected ? Theme.accent : Theme.muted }
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
y: cartridge.selected ? 30 : 27
width: cartridge.selected ? 68 : 54
height: width
color: cartridge.selected ? Theme.accentAlpha(0.12) : Theme.textAlpha(0.018)
border.width: 1
border.color: cartridge.selected ? Theme.accent : Theme.hair
IconImage { visible: root.showIcons; anchors.centerIn: parent; implicitSize: cartridge.selected ? 48 : 38; source: root.showIcons ? Quickshell.iconPath(cartridge.modelData.icon || "application-x-executable", "application-x-executable") : "" }
Text { visible: !root.showIcons; anchors.centerIn: parent; text: String(cartridge.modelData.name || "?").charAt(0).toUpperCase(); color: cartridge.selected ? Theme.accent : Theme.text; font.family: Theme.displayFont; font.pixelSize: cartridge.selected ? 23 : 18; font.bold: true }
}
Text {
x: 8; anchors.bottom: generic.top; anchors.bottomMargin: 4
width: parent.width - 16
text: cartridge.modelData.name || "UNKNOWN"
color: cartridge.selected ? Theme.accent : Theme.text
font.family: Theme.displayFont
font.pixelSize: cartridge.selected ? 10 : 9
font.bold: cartridge.selected
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
}
MicroText {
id: generic
x: 8; anchors.bottom: parent.bottom; anchors.bottomMargin: 13
width: parent.width - 16
text: cartridge.modelData.genericName || "APPLICATION"
horizontalAlignment: Text.AlignHCenter
}
}
Text { anchors.centerIn: parent; visible: root.apps.length === 0; text: "NO CARTRIDGES MATCH QUERY"; color: Theme.muted; font.family: Theme.microFont; font.pixelSize: 9; font.letterSpacing: 1.2 }
}
// Right telemetry clamp.
Item {
id: clamp
anchors.right: parent.right
anchors.rightMargin: 18
y: 20; width: 150; height: 180
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0.018)
strokeColor: Theme.hair
strokeWidth: 1
startX: 0; startY: 0
PathLine { x: 128; y: 0 }
PathLine { x: 150; y: 22 }
PathLine { x: 150; y: 180 }
PathLine { x: 0; y: 180 }
PathLine { x: 0; y: 0 }
}
}
MicroText { x: 12; y: 12; text: "ACTIVE SLOT"; color: Theme.accent }
Text { x: 12; y: 35; width: parent.width - 24; text: String(Math.max(0, root.selectedIndex + 1)).padStart(3, "0"); color: Theme.text; font.family: Theme.displayFont; font.pixelSize: 28; font.bold: true }
MicroText { x: 12; y: 75; width: parent.width - 24; text: root.selectedApp ? root.selectedApp.name : "NO TARGET"; color: Theme.text }
MicroText { x: 12; y: 96; width: parent.width - 24; text: root.apps.length + " AVAILABLE" }
Row { x: 12; y: 120; spacing: 3; Repeater { model: 12; Rectangle { required property int index; width: 7; height: 4; color: index < Math.min(12, root.apps.length) ? Theme.accent : Theme.hair } } }
MicroText { x: 12; anchors.bottom: parent.bottom; anchors.bottomMargin: 12; text: "BUS // ARMED"; color: Theme.accent }
}
// Bottom command spine.
Shape {
id: commandSpine
x: 176; y: 211
width: root.width - 352; height: 48
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.accentAlpha(0.10)
strokeColor: Theme.accent
strokeWidth: 1
startX: 14; startY: 0
PathLine { x: commandSpine.width; y: 0 }
PathLine { x: commandSpine.width - 14; y: commandSpine.height }
PathLine { x: 0; y: commandSpine.height }
PathLine { x: 14; y: 0 }
}
}
Text { x: 196; y: 221; text: ">_"; color: Theme.accent; font.family: Theme.displayFont; font.pixelSize: 17; font.bold: true }
TextInput {
id: dockInput
x: 230; y: 219; width: root.width - 650; height: 34
verticalAlignment: TextInput.AlignVCenter
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 14
font.letterSpacing: 1
clip: true
onTextChanged: root.selectionRequested(0)
Keys.onPressed: event => {
switch (event.key) {
case Qt.Key_Right: case Qt.Key_Tab: root.moveRequested(1); event.accepted = true; break;
case Qt.Key_Left: case Qt.Key_Backtab: root.moveRequested(-1); event.accepted = true; break;
case Qt.Key_PageDown: root.moveRequested(5); event.accepted = true; break;
case Qt.Key_PageUp: root.moveRequested(-5); event.accepted = true; break;
case Qt.Key_Return: case Qt.Key_Enter: root.launchRequested(root.selectedIndex); event.accepted = true; break;
case Qt.Key_Escape: root.dismissRequested(); event.accepted = true; break;
}
}
Text { anchors.fill: parent; verticalAlignment: Text.AlignVCenter; visible: dockInput.text.length === 0; text: "FILTER DOCK CARTRIDGES"; color: Theme.muted; font: dockInput.font }
}
MicroText { x: root.width - 492; y: 228; text: "← → SELECT // ENTER LAUNCH // ESC RETRACT"; color: Theme.accent }
// Lower rail hardware.
Row {
x: 18; anchors.bottom: parent.bottom; anchors.bottomMargin: 1; spacing: 4
Repeater { model: 70; Rectangle { required property int index; width: 10; height: 4; color: index % 5 === 0 ? Theme.accent : Theme.hair; transform: Rotation { angle: -32 } } }
}
}
@@ -6,6 +6,7 @@ import Quickshell.Wayland
import Quickshell.Widgets import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs.widgets.theme
// Variant 4 — "Console": a full-width command deck that unfolds down out of // Variant 4 — "Console": a full-width command deck that unfolds down out of
// the top bar, with a horizontal carousel of app cards. While open it drives // the top bar, with a horizontal carousel of app cards. While open it drives
@@ -99,7 +100,7 @@ Scope {
anchors.right: parent.right anchors.right: parent.right
clip: true clip: true
color: "#0F1012" color: Theme.surface
height: root.active ? win.openHeight : 0 height: root.active ? win.openHeight : 0
@@ -116,7 +117,7 @@ Scope {
// Accent lid — mirrors the top bar strip, reads as its extension. // Accent lid — mirrors the top bar strip, reads as its extension.
Rectangle { Rectangle {
color: "#FFD063" color: Theme.accent
implicitHeight: 4 implicitHeight: 4
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -132,8 +133,8 @@ Scope {
Text { Text {
text: ">_" text: ">_"
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 22 font.pointSize: 22
font.bold: true font.bold: true
} }
@@ -147,7 +148,7 @@ Scope {
anchors.fill: parent anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
color: "#EEEEEE" color: Theme.text
font.pointSize: 16 font.pointSize: 16
clip: true clip: true
@@ -182,7 +183,7 @@ Scope {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: input.text.length === 0 visible: input.text.length === 0
text: "launch application…" text: "launch application…"
color: "#7A7B7D" color: Theme.muted
font: input.font font: input.font
} }
} }
@@ -190,14 +191,14 @@ Scope {
Text { Text {
text: model.apps.length + " apps" text: model.apps.length + " apps"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 15 font.pointSize: 15
} }
} }
Rectangle { Rectangle {
color: "#292C30" color: Theme.raised
implicitHeight: 1 implicitHeight: 1
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -236,9 +237,9 @@ Scope {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: card.selected ? "#292C30" : "transparent" color: card.selected ? Theme.raised : "transparent"
border.width: 1 border.width: 1
border.color: card.selected ? "#FFD063" : "#292C30" border.color: card.selected ? Theme.accent : Theme.raised
Behavior on border.color { Behavior on border.color {
ColorAnimation { ColorAnimation {
@@ -261,7 +262,7 @@ Scope {
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
text: card.modelData.name text: card.modelData.name
color: card.selected ? "#FFD063" : "#EEEEEE" color: card.selected ? Theme.accent : Theme.text
font.pointSize: 9 font.pointSize: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight elide: Text.ElideRight
@@ -277,8 +278,8 @@ Scope {
anchors.centerIn: parent anchors.centerIn: parent
visible: model.apps.length === 0 visible: model.apps.length === 0
text: "no matches" text: "no matches"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 16 font.pointSize: 16
} }
} }
@@ -7,6 +7,7 @@ import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.theme
// Variant 7 — a copy of the "Slant" (V6) launcher, plus a small floating // Variant 7 — a copy of the "Slant" (V6) launcher, plus a small floating
// power panel docked to its right with Shutdown / Reboot buttons. // power panel docked to its right with Shutdown / Reboot buttons.
@@ -77,7 +78,7 @@ Scope {
// Dim backdrop — click to dismiss. // Dim backdrop — click to dismiss.
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "#0A0A0C" color: Theme.surface
opacity: 0.55 opacity: 0.55
MouseArea { MouseArea {
@@ -107,8 +108,8 @@ Scope {
preferredRendererType: Shape.CurveRenderer preferredRendererType: Shape.CurveRenderer
ShapePath { ShapePath {
fillColor: "#0F1012" fillColor: Theme.surface
strokeColor: "#FFD063" strokeColor: Theme.accent
strokeWidth: 2 strokeWidth: 2
startX: frame.chamfer startX: frame.chamfer
@@ -153,7 +154,7 @@ Scope {
// run out to the top and left edges to meet the straight borders. // run out to the top and left edges to meet the straight borders.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 0 startX: 0
startY: frame.chamfer startY: frame.chamfer
@@ -179,7 +180,7 @@ Scope {
// bottom and right edges. // bottom and right edges.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width startX: panelShape.width
startY: panelShape.height - frame.chamfer startY: panelShape.height - frame.chamfer
@@ -205,7 +206,7 @@ Scope {
// detached from the panel by the width of the cut. // detached from the panel by the width of the cut.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width startX: panelShape.width
startY: panelShape.height startY: panelShape.height
@@ -228,7 +229,7 @@ Scope {
// slanted end pieces on both arms. // slanted end pieces on both arms.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
// inner, right end of the bottom arm // inner, right end of the bottom arm
startX: panelShape.width / 3 startX: panelShape.width / 3
@@ -277,7 +278,7 @@ Scope {
// slanted end pieces on both arms. // slanted end pieces on both arms.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
// inner, bottom of the right arm // inner, bottom of the right arm
startX: panelShape.width startX: panelShape.width
@@ -345,7 +346,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 6 startX: 6
startY: 0 startY: 0
PathLine { PathLine {
@@ -367,7 +368,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 15 startX: 15
startY: 0 startY: 0
PathLine { PathLine {
@@ -389,7 +390,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 24 startX: 24
startY: 0 startY: 0
PathLine { PathLine {
@@ -420,8 +421,8 @@ Scope {
anchors.fill: parent anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
color: "#EEEEEE" color: Theme.text
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 20 font.pointSize: 20
font.letterSpacing: 1 font.letterSpacing: 1
clip: true clip: true
@@ -457,7 +458,7 @@ Scope {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: input.text.length === 0 visible: input.text.length === 0
text: "run" text: "run"
color: "#7A7B7D" color: Theme.muted
font: input.font font: input.font
} }
} }
@@ -465,8 +466,8 @@ Scope {
Text { Text {
text: model.apps.length text: model.apps.length
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 18 font.pointSize: 18
} }
} }
@@ -489,7 +490,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: divider.slant startX: divider.slant
startY: 0 startY: 0
PathLine { PathLine {
@@ -512,7 +513,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 0 startX: 0
startY: divider.height startY: divider.height
PathLine { PathLine {
@@ -535,7 +536,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: divider.width startX: divider.width
startY: 0 startY: 0
PathLine { PathLine {
@@ -597,7 +598,7 @@ Scope {
// Body // Body
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#22262C" fillColor: Theme.raised
startX: appRow.shear startX: appRow.shear
startY: 0 startY: 0
PathLine { PathLine {
@@ -620,7 +621,7 @@ Scope {
// Left accent edge // Left accent edge
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: appRow.shear startX: appRow.shear
startY: 0 startY: 0
PathLine { PathLine {
@@ -655,7 +656,7 @@ Scope {
Text { Text {
text: appRow.modelData.name text: appRow.modelData.name
color: appRow.selected ? "#FFD063" : "#EEEEEE" color: appRow.selected ? Theme.accent : Theme.text
font.pointSize: 12 font.pointSize: 12
elide: Text.ElideRight elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
@@ -663,7 +664,7 @@ Scope {
Text { Text {
text: appRow.modelData.genericName || "" text: appRow.modelData.genericName || ""
color: "#7A7B7D" color: Theme.muted
font.pointSize: 10 font.pointSize: 10
elide: Text.ElideRight elide: Text.ElideRight
Layout.maximumWidth: 220 Layout.maximumWidth: 220
@@ -694,8 +695,8 @@ Scope {
preferredRendererType: Shape.CurveRenderer preferredRendererType: Shape.CurveRenderer
ShapePath { ShapePath {
fillColor: "#FFD063" fillColor: Theme.accent
strokeColor: "#FFD063" strokeColor: Theme.accent
strokeWidth: 2 strokeWidth: 2
startX: 0 startX: 0
@@ -732,9 +733,9 @@ Scope {
Text { Text {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: "POWER" text: "POWER"
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
color: "#0F1012" color: Theme.surface
} }
Repeater { Repeater {
@@ -762,8 +763,8 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 1 strokeWidth: 1
strokeColor: powerButton.containsMouse ? "#FFD063" : "#7A7B7D" strokeColor: powerButton.containsMouse ? Theme.accent : Theme.muted
fillColor: "#292C30" fillColor: Theme.raised
startX: powerButton.chamfer startX: powerButton.chamfer
startY: 0 startY: 0
@@ -785,8 +786,8 @@ Scope {
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: powerButton.modelData.label text: powerButton.modelData.label
color: powerButton.containsMouse ? "#FFD063" : "#EEEEEE" color: powerButton.containsMouse ? Theme.accent : Theme.text
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
} }
} }
@@ -6,6 +6,7 @@ import Quickshell.Wayland
import Quickshell.Widgets import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs.widgets.theme
// Variant 5 — "Dock": the Console concept mirrored to the bottom edge. A // Variant 5 — "Dock": the Console concept mirrored to the bottom edge. A
// full-width deck rises up out of the bottom bar, which energizes via // full-width deck rises up out of the bottom bar, which energizes via
@@ -98,7 +99,7 @@ Scope {
anchors.right: parent.right anchors.right: parent.right
clip: true clip: true
color: "#0F1012" color: Theme.surface
height: root.active ? win.openHeight : 0 height: root.active ? win.openHeight : 0
@@ -153,9 +154,9 @@ Scope {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: card.selected ? "#292C30" : "transparent" color: card.selected ? Theme.raised : "transparent"
border.width: 1 border.width: 1
border.color: card.selected ? "#FFD063" : "#292C30" border.color: card.selected ? Theme.accent : Theme.raised
Behavior on border.color { Behavior on border.color {
ColorAnimation { ColorAnimation {
@@ -178,7 +179,7 @@ Scope {
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
text: card.modelData.name text: card.modelData.name
color: card.selected ? "#FFD063" : "#EEEEEE" color: card.selected ? Theme.accent : Theme.text
font.pointSize: 9 font.pointSize: 9
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight elide: Text.ElideRight
@@ -194,14 +195,14 @@ Scope {
anchors.centerIn: parent anchors.centerIn: parent
visible: model.apps.length === 0 visible: model.apps.length === 0
text: "no matches" text: "no matches"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 16 font.pointSize: 16
} }
} }
Rectangle { Rectangle {
color: "#292C30" color: Theme.raised
implicitHeight: 1 implicitHeight: 1
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -217,8 +218,8 @@ Scope {
Text { Text {
text: ">_" text: ">_"
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 22 font.pointSize: 22
font.bold: true font.bold: true
} }
@@ -232,7 +233,7 @@ Scope {
anchors.fill: parent anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
color: "#EEEEEE" color: Theme.text
font.pointSize: 16 font.pointSize: 16
clip: true clip: true
@@ -267,7 +268,7 @@ Scope {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: input.text.length === 0 visible: input.text.length === 0
text: "launch application…" text: "launch application…"
color: "#7A7B7D" color: Theme.muted
font: input.font font: input.font
} }
} }
@@ -275,15 +276,15 @@ Scope {
Text { Text {
text: model.apps.length + " apps" text: model.apps.length + " apps"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 15 font.pointSize: 15
} }
} }
// Accent lid — mirrors the bottom bar strip. // Accent lid — mirrors the bottom bar strip.
Rectangle { Rectangle {
color: "#FFD063" color: Theme.accent
implicitHeight: 4 implicitHeight: 4
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -6,6 +6,7 @@ import Quickshell.Wayland
import Quickshell.Widgets import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs.widgets.theme
// Variant 2 — "Grid": centered app-drawer with a dim backdrop and icon tiles. // Variant 2 — "Grid": centered app-drawer with a dim backdrop and icon tiles.
Scope { Scope {
@@ -78,7 +79,7 @@ Scope {
// Dim backdrop — click anywhere outside to dismiss. // Dim backdrop — click anywhere outside to dismiss.
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "#0A0A0C" color: Theme.surface
opacity: 0.55 opacity: 0.55
MouseArea { MouseArea {
@@ -93,9 +94,9 @@ Scope {
width: 760 width: 760
height: 560 height: 560
color: "#0F1012" color: Theme.surface
border.width: 1 border.width: 1
border.color: "#FFD063" border.color: Theme.accent
opacity: 0.98 opacity: 0.98
// Accent corner brackets for the cyberpunk frame. // Accent corner brackets for the cyberpunk frame.
@@ -104,14 +105,14 @@ Scope {
anchors.left: parent.left anchors.left: parent.left
width: 5 width: 5
height: 28 height: 28
color: "#FFD063" color: Theme.accent
} }
Rectangle { Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
width: 28 width: 28
height: 5 height: 5
color: "#FFD063" color: Theme.accent
} }
ColumnLayout { ColumnLayout {
@@ -126,8 +127,8 @@ Scope {
Text { Text {
text: "APPS" text: "APPS"
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 22 font.pointSize: 22
font.letterSpacing: 3 font.letterSpacing: 3
} }
@@ -138,9 +139,9 @@ Scope {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "#292C30" color: Theme.raised
border.width: 1 border.width: 1
border.color: input.activeFocus ? "#FFD063" : "#7A7B7D" border.color: input.activeFocus ? Theme.accent : Theme.muted
Behavior on border.color { Behavior on border.color {
ColorAnimation { ColorAnimation {
@@ -155,7 +156,7 @@ Scope {
anchors.rightMargin: 12 anchors.rightMargin: 12
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
color: "#EEEEEE" color: Theme.text
font.pointSize: 13 font.pointSize: 13
clip: true clip: true
@@ -198,7 +199,7 @@ Scope {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: input.text.length === 0 visible: input.text.length === 0
text: "Type to search…" text: "Type to search…"
color: "#7A7B7D" color: Theme.muted
font: input.font font: input.font
} }
} }
@@ -207,7 +208,7 @@ Scope {
} }
Rectangle { Rectangle {
color: "#FFD063" color: Theme.accent
implicitHeight: 3 implicitHeight: 3
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -242,9 +243,9 @@ Scope {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
anchors.margins: 6 anchors.margins: 6
color: tile.selected ? "#292C30" : "transparent" color: tile.selected ? Theme.raised : "transparent"
border.width: 1 border.width: 1
border.color: tile.selected ? "#FFD063" : "transparent" border.color: tile.selected ? Theme.accent : "transparent"
Behavior on border.color { Behavior on border.color {
ColorAnimation { ColorAnimation {
@@ -266,7 +267,7 @@ Scope {
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
text: tile.modelData.name text: tile.modelData.name
color: tile.selected ? "#FFD063" : "#EEEEEE" color: tile.selected ? Theme.accent : Theme.text
font.pointSize: 10 font.pointSize: 10
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight elide: Text.ElideRight
@@ -7,6 +7,7 @@ import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.theme
// Variant 6 — "Slant": breaks up the rectangular layout with angled geometry — // Variant 6 — "Slant": breaks up the rectangular layout with angled geometry —
// a chamfered panel, a slanted header divider and sheared row highlights. // a chamfered panel, a slanted header divider and sheared row highlights.
@@ -77,7 +78,7 @@ Scope {
// Dim backdrop — click to dismiss. // Dim backdrop — click to dismiss.
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "#0A0A0C" color: Theme.surface
opacity: 0.55 opacity: 0.55
MouseArea { MouseArea {
@@ -107,8 +108,8 @@ Scope {
preferredRendererType: Shape.CurveRenderer preferredRendererType: Shape.CurveRenderer
ShapePath { ShapePath {
fillColor: "#0F1012" fillColor: Theme.surface
strokeColor: "#FFD063" strokeColor: Theme.accent
strokeWidth: 2 strokeWidth: 2
startX: frame.chamfer startX: frame.chamfer
@@ -153,7 +154,7 @@ Scope {
// run out to the top and left edges to meet the straight borders. // run out to the top and left edges to meet the straight borders.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 0 startX: 0
startY: frame.chamfer startY: frame.chamfer
@@ -179,7 +180,7 @@ Scope {
// bottom and right edges. // bottom and right edges.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width startX: panelShape.width
startY: panelShape.height - frame.chamfer startY: panelShape.height - frame.chamfer
@@ -205,7 +206,7 @@ Scope {
// detached from the panel by the width of the cut. // detached from the panel by the width of the cut.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width startX: panelShape.width
startY: panelShape.height startY: panelShape.height
@@ -228,7 +229,7 @@ Scope {
// slanted end pieces on both arms. // slanted end pieces on both arms.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
// inner, right end of the bottom arm // inner, right end of the bottom arm
startX: panelShape.width / 3 startX: panelShape.width / 3
@@ -277,7 +278,7 @@ Scope {
// slanted end pieces on both arms. // slanted end pieces on both arms.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
// inner, bottom of the right arm // inner, bottom of the right arm
startX: panelShape.width startX: panelShape.width
@@ -345,7 +346,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 6 startX: 6
startY: 0 startY: 0
PathLine { PathLine {
@@ -367,7 +368,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 15 startX: 15
startY: 0 startY: 0
PathLine { PathLine {
@@ -389,7 +390,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 24 startX: 24
startY: 0 startY: 0
PathLine { PathLine {
@@ -420,8 +421,8 @@ Scope {
anchors.fill: parent anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
color: "#EEEEEE" color: Theme.text
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 20 font.pointSize: 20
font.letterSpacing: 1 font.letterSpacing: 1
clip: true clip: true
@@ -457,7 +458,7 @@ Scope {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: input.text.length === 0 visible: input.text.length === 0
text: "run" text: "run"
color: "#7A7B7D" color: Theme.muted
font: input.font font: input.font
} }
} }
@@ -465,8 +466,8 @@ Scope {
Text { Text {
text: model.apps.length text: model.apps.length
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 18 font.pointSize: 18
} }
} }
@@ -489,7 +490,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: divider.slant startX: divider.slant
startY: 0 startY: 0
PathLine { PathLine {
@@ -512,7 +513,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 0 startX: 0
startY: divider.height startY: divider.height
PathLine { PathLine {
@@ -535,7 +536,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: divider.width startX: divider.width
startY: 0 startY: 0
PathLine { PathLine {
@@ -597,7 +598,7 @@ Scope {
// Body // Body
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#22262C" fillColor: Theme.raised
startX: appRow.shear startX: appRow.shear
startY: 0 startY: 0
PathLine { PathLine {
@@ -620,7 +621,7 @@ Scope {
// Left accent edge // Left accent edge
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: appRow.shear startX: appRow.shear
startY: 0 startY: 0
PathLine { PathLine {
@@ -655,7 +656,7 @@ Scope {
Text { Text {
text: appRow.modelData.name text: appRow.modelData.name
color: appRow.selected ? "#FFD063" : "#EEEEEE" color: appRow.selected ? Theme.accent : Theme.text
font.pointSize: 12 font.pointSize: 12
elide: Text.ElideRight elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
@@ -663,7 +664,7 @@ Scope {
Text { Text {
text: appRow.modelData.genericName || "" text: appRow.modelData.genericName || ""
color: "#7A7B7D" color: Theme.muted
font.pointSize: 10 font.pointSize: 10
elide: Text.ElideRight elide: Text.ElideRight
Layout.maximumWidth: 220 Layout.maximumWidth: 220
@@ -6,6 +6,7 @@ import Quickshell.Wayland
import Quickshell.Widgets import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs.widgets.theme
// Variant 3 — "Spotlight": top-center command bar with a compact result list. // Variant 3 — "Spotlight": top-center command bar with a compact result list.
Scope { Scope {
@@ -91,9 +92,9 @@ Scope {
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 60 implicitHeight: 60
color: "#0F1012" color: Theme.surface
border.width: 1 border.width: 1
border.color: "#FFD063" border.color: Theme.accent
RowLayout { RowLayout {
anchors.fill: parent anchors.fill: parent
@@ -103,8 +104,8 @@ Scope {
Text { Text {
text: ">" text: ">"
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 26 font.pointSize: 26
font.bold: true font.bold: true
} }
@@ -118,7 +119,7 @@ Scope {
anchors.fill: parent anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
color: "#EEEEEE" color: Theme.text
font.pointSize: 17 font.pointSize: 17
clip: true clip: true
@@ -153,7 +154,7 @@ Scope {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: input.text.length === 0 visible: input.text.length === 0
text: "run application" text: "run application"
color: "#7A7B7D" color: Theme.muted
font: input.font font: input.font
} }
} }
@@ -161,8 +162,8 @@ Scope {
Text { Text {
text: model.apps.length + " ▸" text: model.apps.length + " ▸"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 16 font.pointSize: 16
} }
} }
@@ -172,7 +173,7 @@ Scope {
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 3 implicitHeight: 3
color: "#FFD063" color: Theme.accent
visible: model.apps.length > 0 visible: model.apps.length > 0
} }
@@ -181,11 +182,11 @@ Scope {
Layout.fillWidth: true Layout.fillWidth: true
// Cap the visible height to maxRows; scroll beyond that. // Cap the visible height to maxRows; scroll beyond that.
implicitHeight: Math.min(model.apps.length, win.maxRows) * 44 + 2 implicitHeight: Math.min(model.apps.length, win.maxRows) * 44 + 2
color: "#0F1012" color: Theme.surface
opacity: 0.97 opacity: 0.97
visible: model.apps.length > 0 visible: model.apps.length > 0
border.width: 1 border.width: 1
border.color: "#292C30" border.color: Theme.raised
ListView { ListView {
id: list id: list
@@ -215,14 +216,14 @@ Scope {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: entry.selected ? "#1A1C1F" : "transparent" color: entry.selected ? Theme.selection : "transparent"
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: 3 width: 3
color: "#FFD063" color: Theme.accent
visible: entry.selected visible: entry.selected
} }
@@ -239,7 +240,7 @@ Scope {
Text { Text {
text: entry.modelData.name text: entry.modelData.name
color: entry.selected ? "#FFD063" : "#EEEEEE" color: entry.selected ? Theme.accent : Theme.text
font.pointSize: 12 font.pointSize: 12
elide: Text.ElideRight elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
@@ -247,7 +248,7 @@ Scope {
Text { Text {
text: entry.modelData.genericName || "" text: entry.modelData.genericName || ""
color: "#7A7B7D" color: Theme.muted
font.pointSize: 10 font.pointSize: 10
elide: Text.ElideRight elide: Text.ElideRight
Layout.maximumWidth: 200 Layout.maximumWidth: 200
@@ -6,6 +6,7 @@ import Quickshell.Wayland
import Quickshell.Widgets import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs.widgets.theme
// Variant 1 — "Stack": left-anchored vertical list launcher. // Variant 1 — "Stack": left-anchored vertical list launcher.
// Framed with the top/bottom accent strips used by the main Bar. // Framed with the top/bottom accent strips used by the main Bar.
@@ -82,7 +83,7 @@ Scope {
spacing: 0 spacing: 0
Rectangle { Rectangle {
color: "#FFD063" color: Theme.accent
implicitHeight: 5 implicitHeight: 5
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -93,8 +94,8 @@ Scope {
margin: 12 margin: 12
border.width: 1 border.width: 1
border.color: "#FFD063" border.color: Theme.accent
color: "#0F1012" color: Theme.surface
opacity: 0.95 opacity: 0.95
ColumnLayout { ColumnLayout {
@@ -107,7 +108,7 @@ Scope {
Text { Text {
text: "▚" text: "▚"
color: "#FFD063" color: Theme.accent
font.pointSize: 14 font.pointSize: 14
font.bold: true font.bold: true
} }
@@ -121,8 +122,8 @@ Scope {
anchors.fill: parent anchors.fill: parent
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
color: "#EEEEEE" color: Theme.text
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 16 font.pointSize: 16
clip: true clip: true
@@ -158,7 +159,7 @@ Scope {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: input.text.length === 0 visible: input.text.length === 0
text: "search" text: "search"
color: "#7A7B7D" color: Theme.muted
font: input.font font: input.font
} }
} }
@@ -166,14 +167,14 @@ Scope {
Text { Text {
text: model.apps.length text: model.apps.length
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 14 font.pointSize: 14
} }
} }
Rectangle { Rectangle {
color: "#FFD063" color: Theme.accent
implicitHeight: 2 implicitHeight: 2
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -207,7 +208,7 @@ Scope {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: appRow.selected ? "#292C30" : "transparent" color: appRow.selected ? Theme.raised : "transparent"
// Accent bar on the selected row. // Accent bar on the selected row.
Rectangle { Rectangle {
@@ -215,7 +216,7 @@ Scope {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: 3 width: 3
color: "#FFD063" color: Theme.accent
visible: appRow.selected visible: appRow.selected
} }
@@ -236,7 +237,7 @@ Scope {
Text { Text {
text: appRow.modelData.name text: appRow.modelData.name
color: appRow.selected ? "#FFD063" : "#EEEEEE" color: appRow.selected ? Theme.accent : Theme.text
font.pointSize: 12 font.pointSize: 12
elide: Text.ElideRight elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
@@ -245,7 +246,7 @@ Scope {
Text { Text {
visible: text.length > 0 visible: text.length > 0
text: appRow.modelData.genericName || appRow.modelData.comment || "" text: appRow.modelData.genericName || appRow.modelData.comment || ""
color: "#7A7B7D" color: Theme.muted
font.pointSize: 9 font.pointSize: 9
elide: Text.ElideRight elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
@@ -259,7 +260,7 @@ Scope {
} }
Rectangle { Rectangle {
color: "#FFD063" color: Theme.accent
implicitHeight: 5 implicitHeight: 5
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -0,0 +1,79 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import QtQuick
import qs.widgets.theme
// Variant 10 — radial Orbit application launcher.
Scope {
id: root
property bool active: false
function toggle() { root.active = !root.active; }
GlobalShortcut {
name: "launcher10"
description: "Toggle app launcher (Orbit targeting)"
onPressed: root.toggle()
}
PanelWindow {
id: win
visible: root.active
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
exclusionMode: ExclusionMode.Ignore
color: Theme.textAlpha(0)
anchors { top: true; left: true; right: true; bottom: true }
property int selectedIndex: 0
function clampSelection(index) {
return model.apps.length === 0 ? 0 : Math.max(0, Math.min(model.apps.length - 1, index));
}
function move(delta) {
const count = model.apps.length;
if (count === 0)
return;
selectedIndex = ((selectedIndex + delta) % count + count) % count;
}
function launch(index) {
if (model.launch(index))
root.active = false;
}
onVisibleChanged: {
if (visible) {
content.clearSearch();
selectedIndex = 0;
content.focusSearch();
}
}
AppModel { id: model; search: content.query }
Rectangle {
anchors.fill: parent
color: Theme.surface
opacity: 0.80
MouseArea { anchors.fill: parent; onClicked: root.active = false }
}
OrbitLauncherContent {
id: content
anchors.centerIn: parent
width: 1120
height: 660
scale: Math.min(1, (parent.width - 56) / width, (parent.height - 56) / height)
transformOrigin: Item.Center
apps: model.apps
selectedIndex: win.selectedIndex
onSelectionRequested: index => win.selectedIndex = win.clampSelection(index)
onMoveRequested: delta => win.move(delta)
onLaunchRequested: index => win.launch(index)
onDismissRequested: root.active = false
}
}
}
@@ -0,0 +1,338 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Shapes
import qs.widgets.theme
// Variant 10 visual core: radial application targeting arena plus execution
// tape. Shares Theme/AppModel contracts but no launcher panel primitives.
Item {
id: root
property var apps: []
property int selectedIndex: 0
property bool showIcons: true
property alias query: orbitInput.text
readonly property var selectedApp: apps.length > 0 && selectedIndex >= 0 && selectedIndex < apps.length
? apps[selectedIndex] : null
readonly property int orbitCount: Math.min(8, apps.length)
signal selectionRequested(int index)
signal moveRequested(int delta)
signal launchRequested(int index)
signal dismissRequested
function focusSearch() { orbitInput.forceActiveFocus(); }
function clearSearch() { orbitInput.text = ""; }
implicitWidth: 1120
implicitHeight: 660
component MicroText: Text {
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 7
font.letterSpacing: 0.9
elide: Text.ElideRight
}
Rectangle { anchors.fill: parent; color: Theme.surface }
// Perimeter bracket frame, deliberately open on all four sides.
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.accent
strokeWidth: 2
startX: 24; startY: 92
PathLine { x: 24; y: 24 }
PathLine { x: 128; y: 24 }
}
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.accent
strokeWidth: 2
startX: root.width - 128; startY: 24
PathLine { x: root.width - 24; y: 24 }
PathLine { x: root.width - 24; y: 92 }
}
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.accent
strokeWidth: 2
startX: 24; startY: root.height - 92
PathLine { x: 24; y: root.height - 24 }
PathLine { x: 128; y: root.height - 24 }
}
ShapePath {
fillColor: Theme.textAlpha(0)
strokeColor: Theme.accent
strokeWidth: 2
startX: root.width - 128; startY: root.height - 24
PathLine { x: root.width - 24; y: root.height - 24 }
PathLine { x: root.width - 24; y: root.height - 92 }
}
}
Text {
x: 44; y: 38
text: "ORBIT // APPLICATION TARGETING"
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 17
font.bold: true
font.letterSpacing: 1.5
}
MicroText { x: 46; y: 64; text: "10 / RADIAL INDEX / EXECUTION CONTROL"; color: Theme.accent }
MicroText { anchors.right: parent.right; anchors.rightMargin: 44; y: 48; text: root.apps.length + " TRACKED OBJECTS" }
// Radial targeting arena.
Item {
id: arena
x: 36; y: 92
width: 716; height: 500
// Axis traces.
Rectangle { anchors.centerIn: parent; width: parent.width - 28; height: 1; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 1; height: parent.height - 16; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 414; height: 414; radius: 207; color: Theme.textAlpha(0.008); border.width: 1; border.color: Theme.accentAlpha(0.50) }
Rectangle { anchors.centerIn: parent; width: 326; height: 326; radius: 163; color: Theme.textAlpha(0); border.width: 1; border.color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 220; height: 220; radius: 110; color: Theme.textAlpha(0); border.width: 1; border.color: Theme.accentAlpha(0.28) }
// Cardinal labels.
MicroText { anchors.horizontalCenter: parent.horizontalCenter; y: 8; text: "N // INDEX 00" }
MicroText { anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom; anchors.bottomMargin: 5; text: "S // COMMAND BUS" }
MicroText { anchors.verticalCenter: parent.verticalCenter; x: 8; text: "W"; color: Theme.accent }
MicroText { anchors.verticalCenter: parent.verticalCenter; anchors.right: parent.right; anchors.rightMargin: 8; text: "E"; color: Theme.accent }
// App nodes distributed around the outer orbit.
Repeater {
model: root.orbitCount
MouseArea {
id: node
required property int index
readonly property var app: root.apps[index]
readonly property real angle: -Math.PI / 2 + index * (2 * Math.PI / Math.max(1, root.orbitCount))
readonly property bool selected: index === root.selectedIndex
width: selected ? 92 : 74
height: selected ? 52 : 44
x: arena.width / 2 + Math.cos(angle) * 205 - width / 2
y: arena.height / 2 + Math.sin(angle) * 205 - height / 2
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: root.selectionRequested(index)
onClicked: root.launchRequested(index)
Shape {
id: nodeShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: node.selected ? Theme.selection : Theme.surface
strokeColor: node.selected ? Theme.accent : Theme.hair
strokeWidth: node.selected ? 2 : 1
startX: 10; startY: 0
PathLine { x: nodeShape.width; y: 0 }
PathLine { x: nodeShape.width - 10; y: nodeShape.height }
PathLine { x: 0; y: nodeShape.height }
PathLine { x: 10; y: 0 }
}
}
Rectangle {
x: 7; anchors.verticalCenter: parent.verticalCenter
width: 27; height: 27
color: node.selected ? Theme.accentAlpha(0.18) : Theme.textAlpha(0.025)
border.width: 1
border.color: node.selected ? Theme.accent : Theme.hair
IconImage { visible: root.showIcons; anchors.centerIn: parent; implicitSize: 20; source: root.showIcons ? Quickshell.iconPath(node.app.icon || "application-x-executable", "application-x-executable") : "" }
Text { visible: !root.showIcons; anchors.centerIn: parent; text: String(node.app.name || "?").charAt(0).toUpperCase(); color: node.selected ? Theme.accent : Theme.text; font.family: Theme.displayFont; font.pixelSize: 11; font.bold: true }
}
Text {
x: 40; anchors.verticalCenter: parent.verticalCenter
width: parent.width - 48
text: node.app.name || "UNKNOWN"
color: node.selected ? Theme.accent : Theme.text
font.family: Theme.displayFont
font.pixelSize: 8
font.bold: node.selected
elide: Text.ElideRight
}
}
}
// Core target, not a conventional card.
Item {
id: core
anchors.centerIn: parent
width: 196; height: 196
Rectangle { anchors.centerIn: parent; width: 186; height: 186; radius: 93; color: Theme.surface; border.width: 2; border.color: Theme.accent }
Rectangle { anchors.centerIn: parent; width: 156; height: 156; radius: 78; color: Theme.accentAlpha(0.04); border.width: 1; border.color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 118; height: 118; color: Theme.textAlpha(0.012); border.width: 1; border.color: Theme.accentAlpha(0.42); transform: Rotation { angle: 45 } }
Rectangle { anchors.centerIn: parent; width: 196; height: 1; color: Theme.hair }
Rectangle { anchors.centerIn: parent; width: 1; height: 196; color: Theme.hair }
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
y: 31; width: 58; height: 58
color: Theme.surface
border.width: 1; border.color: Theme.accent
IconImage { visible: root.showIcons; anchors.centerIn: parent; implicitSize: 42; source: root.showIcons && root.selectedApp ? Quickshell.iconPath(root.selectedApp.icon || "application-x-executable", "application-x-executable") : "" }
Text { visible: !root.showIcons; anchors.centerIn: parent; text: root.selectedApp ? String(root.selectedApp.name || "?").charAt(0).toUpperCase() : "?"; color: Theme.accent; font.family: Theme.displayFont; font.pixelSize: 26; font.bold: true }
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
y: 100; width: 156
text: root.selectedApp ? root.selectedApp.name : "NO TARGET"
color: Theme.text
font.family: Theme.displayFont
font.pixelSize: 11
font.bold: true
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
}
MicroText { anchors.horizontalCenter: parent.horizontalCenter; y: 124; width: 150; horizontalAlignment: Text.AlignHCenter; text: root.selectedApp ? (root.selectedApp.genericName || "APPLICATION") : "AWAITING LOCK"; color: Theme.accent }
MicroText { anchors.horizontalCenter: parent.horizontalCenter; y: 146; text: "LOCK // " + String(Math.max(0, root.selectedIndex + 1)).padStart(3, "0") }
}
// Search rail crosses the bottom of the arena.
Shape {
id: queryRail
x: 98; anchors.bottom: parent.bottom; anchors.bottomMargin: 24
width: 520; height: 48
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.accentAlpha(0.10)
strokeColor: Theme.accent
strokeWidth: 1
startX: 16; startY: 0
PathLine { x: queryRail.width; y: 0 }
PathLine { x: queryRail.width - 16; y: queryRail.height }
PathLine { x: 0; y: queryRail.height }
PathLine { x: 16; y: 0 }
}
}
Text { x: 118; anchors.bottom: parent.bottom; anchors.bottomMargin: 33; text: "⌕"; color: Theme.accent; font.family: Theme.displayFont; font.pixelSize: 19; font.bold: true }
TextInput {
id: orbitInput
x: 152; anchors.bottom: parent.bottom; anchors.bottomMargin: 31
width: 385; height: 32
verticalAlignment: TextInput.AlignVCenter
color: Theme.text
selectionColor: Theme.accent
selectedTextColor: Theme.surface
font.family: Theme.displayFont
font.pixelSize: 15
font.letterSpacing: 1
clip: true
onTextChanged: root.selectionRequested(0)
Keys.onPressed: event => {
switch (event.key) {
case Qt.Key_Right: case Qt.Key_Down: case Qt.Key_Tab: root.moveRequested(1); event.accepted = true; break;
case Qt.Key_Left: case Qt.Key_Up: case Qt.Key_Backtab: root.moveRequested(-1); event.accepted = true; break;
case Qt.Key_PageDown: root.moveRequested(5); event.accepted = true; break;
case Qt.Key_PageUp: root.moveRequested(-5); event.accepted = true; break;
case Qt.Key_Return: case Qt.Key_Enter: root.launchRequested(root.selectedIndex); event.accepted = true; break;
case Qt.Key_Escape: root.dismissRequested(); event.accepted = true; break;
}
}
Text { anchors.fill: parent; verticalAlignment: Text.AlignVCenter; visible: orbitInput.text.length === 0; text: "SCAN APPLICATION INDEX"; color: Theme.muted; font: orbitInput.font }
}
}
// Right execution tape.
Item {
id: tape
x: 778; y: 92
width: 308; height: 500
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
fillColor: Theme.textAlpha(0.014)
strokeColor: Theme.hair
strokeWidth: 1
startX: 0; startY: 0
PathLine { x: tape.width - 28; y: 0 }
PathLine { x: tape.width; y: 28 }
PathLine { x: tape.width; y: tape.height }
PathLine { x: 28; y: tape.height }
PathLine { x: 0; y: tape.height - 28 }
PathLine { x: 0; y: 0 }
}
ShapePath {
fillColor: Theme.accent
strokeWidth: 0
startX: 0; startY: 0
PathLine { x: 82; y: 0 }
PathLine { x: 82; y: 4 }
PathLine { x: 0; y: 4 }
PathLine { x: 0; y: 0 }
}
}
Text { x: 16; y: 15; text: "EXECUTION TAPE"; color: Theme.accent; font.family: Theme.displayFont; font.pixelSize: 10; font.bold: true; font.letterSpacing: 1.2 }
MicroText { anchors.right: parent.right; anchors.rightMargin: 17; y: 17; text: root.apps.length + " ROWS" }
Rectangle { x: 14; y: 40; width: parent.width - 28; height: 1; color: Theme.hair }
ListView {
id: tapeList
x: 12; y: 51; width: parent.width - 24; height: 350
model: root.apps
currentIndex: root.selectedIndex
spacing: 3
clip: true
boundsBehavior: Flickable.StopAtBounds
onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)
delegate: MouseArea {
id: tapeRow
required property int index
required property var modelData
readonly property bool selected: index === root.selectedIndex
width: ListView.view.width
height: 37
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: root.selectionRequested(index)
onClicked: root.launchRequested(index)
Rectangle { anchors.fill: parent; color: tapeRow.selected ? Theme.selection : Theme.textAlpha(0.018); border.width: 1; border.color: tapeRow.selected ? Theme.accent : Theme.textAlpha(0.09) }
Rectangle { x: 0; width: tapeRow.selected ? 6 : 2; height: parent.height; color: tapeRow.selected ? Theme.accent : Theme.hair }
Text { x: 13; anchors.verticalCenter: parent.verticalCenter; width: 24; text: String(tapeRow.index + 1).padStart(2, "0"); color: tapeRow.selected ? Theme.accent : Theme.muted; font.family: Theme.microFont; font.pixelSize: 7 }
Text { x: 43; anchors.verticalCenter: parent.verticalCenter; width: parent.width - 116; text: tapeRow.modelData.name || "UNKNOWN"; color: tapeRow.selected ? Theme.accent : Theme.text; font.family: Theme.displayFont; font.pixelSize: 9; font.bold: tapeRow.selected; elide: Text.ElideRight }
MicroText { anchors.right: parent.right; anchors.rightMargin: 10; anchors.verticalCenter: parent.verticalCenter; text: tapeRow.selected ? "LOCK" : "PASS"; color: tapeRow.selected ? Theme.accent : Theme.muted }
}
}
MicroText { x: 16; y: 417; width: parent.width - 32; height: 28; wrapMode: Text.Wrap; maximumLineCount: 2; text: root.selectedApp ? (root.selectedApp.comment || "No target metadata supplied.") : "No target acquired." }
MouseArea {
id: execute
x: 14; anchors.bottom: parent.bottom; anchors.bottomMargin: 15
width: parent.width - 28; height: 42
enabled: root.selectedApp !== null
hoverEnabled: true
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: root.launchRequested(root.selectedIndex)
Rectangle { anchors.fill: parent; color: execute.containsMouse ? Theme.accent : Theme.accentAlpha(0.16); border.width: 1; border.color: Theme.accent }
Text { anchors.centerIn: parent; text: "COMMIT ORBITAL LAUNCH"; color: execute.containsMouse ? Theme.surface : Theme.accent; font.family: Theme.displayFont; font.pixelSize: 9; font.bold: true; font.letterSpacing: 1.1 }
}
}
Row {
x: 42; y: 622; spacing: 4
Repeater { model: 28; Rectangle { required property int index; width: 11; height: 3; color: index % 4 === 0 ? Theme.accent : Theme.hair; transform: Rotation { angle: -30 } } }
}
MicroText { x: 390; y: 617; text: "←↑↓→ TRACK // ENTER COMMIT // ESC RELEASE"; color: Theme.accent }
MicroText { anchors.right: parent.right; anchors.rightMargin: 40; y: 617; text: "ORBIT-10 // CRC 9C31" }
}
@@ -1,119 +0,0 @@
import Quickshell.Services.Notifications
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
ColumnLayout {
id: root
required property Notification modelData
spacing: 0
Layout.fillWidth: true
Rectangle {
color: "#FFD063"
implicitHeight: 5
Layout.fillWidth: true
}
WrapperRectangle {
Layout.fillWidth: true
margin: 12
border.width: 1
border.color: "#FFD063"
color: "#0F1012"
opacity: .9
ColumnLayout {
spacing: 4
Layout.fillWidth: true
RowLayout {
spacing: 8
Layout.fillWidth: true
IconImage {
visible: root.modelData.appIcon !== ""
source: root.modelData.appIcon
implicitSize: 20
}
Text {
text: root.modelData.summary
color: "#EEEEEE"
font.pointSize: 14
font.bold: true
elide: Text.ElideRight
Layout.fillWidth: true
}
Text {
id: dismissButton
text: "×"
color: "#FFD063"
font.pointSize: 18
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: root.modelData.dismiss()
}
}
}
Text {
visible: root.modelData.body !== ""
text: root.modelData.body
color: "#EEEEEE"
font.pointSize: 12
wrapMode: Text.Wrap
Layout.fillWidth: true
}
RowLayout {
visible: root.modelData.actions.length > 0
spacing: 6
Layout.fillWidth: true
Repeater {
model: root.modelData.actions
Rectangle {
id: actionButton
required property NotificationAction modelData
color: "#292C30"
border.width: 1
border.color: "#FFD063"
implicitHeight: 28
implicitWidth: actionText.implicitWidth + 16
Text {
id: actionText
anchors.centerIn: parent
text: actionButton.modelData.text
color: "#EEEEEE"
font.pointSize: 12
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: actionButton.modelData.invoke()
}
}
}
}
}
}
}
@@ -1,79 +0,0 @@
import Quickshell
import Quickshell.Services.Notifications
import QtQuick
import QtQuick.Layouts
Scope {
id: root
NotificationServer {
id: server
keepOnReload: true
bodySupported: true
bodyMarkupSupported: true
imageSupported: true
actionsSupported: true
actionIconsSupported: true
onNotification: notification => {
notification.tracked = true;
const timeout = notification.expireTimeout === 0 ? 0 : notification.expireTimeout > 0 ? notification.expireTimeout : (notification.urgency === NotificationUrgency.Critical ? 0 : 5000);
if (timeout <= 0)
return;
let closed = false;
notification.closed.connect(() => {
closed = true;
});
const timer = expiryTimerComponent.createObject(root, {
interval: timeout
});
timer.triggered.connect(() => {
if (!closed)
notification.expire();
timer.destroy();
});
}
}
Component {
id: expiryTimerComponent
Timer {
running: true
}
}
PanelWindow {
screen: Quickshell.screens.find(s => s.name === "DP-2")
color: "transparent"
anchors {
top: true
right: true
}
margins.top: 12
margins.right: 12
implicitWidth: 340
implicitHeight: column.implicitHeight
ColumnLayout {
id: column
anchors.fill: parent
spacing: 8
Repeater {
model: server.trackedNotifications
NotificationPopup {}
}
}
}
}
@@ -2,6 +2,7 @@ import Quickshell
import Quickshell.Services.Pipewire import Quickshell.Services.Pipewire
import Quickshell.Wayland import Quickshell.Wayland
import QtQuick import QtQuick
import qs.widgets.theme
Scope { Scope {
id: root id: root
@@ -38,7 +39,7 @@ Scope {
} }
PanelWindow { PanelWindow {
screen: Quickshell.screens.find(s => s.name === "DP-2") screen: Quickshell.screens.find(s => s.name === Quickshell.env("QS_PRIMARY_OUTPUT"))
visible: root.active visible: root.active
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay
@@ -68,7 +69,7 @@ Scope {
anchors.bottomMargin: 4 anchors.bottomMargin: 4
text: Math.round(Math.min(root.volume, root.maxVolume) * 100) + "%" text: Math.round(Math.min(root.volume, root.maxVolume) * 100) + "%"
color: !root.muted && root.volume > 1 ? "#FF6B4A" : "#FFD063" color: !root.muted && root.volume > 1 ? Theme.hot : Theme.accent
font.pointSize: 12 font.pointSize: 12
font.bold: true font.bold: true
} }
@@ -84,7 +85,7 @@ Scope {
anchors.centerIn: parent anchors.centerIn: parent
implicitHeight: 6 implicitHeight: 6
width: parent.width * Math.min(root.volume, root.maxVolume) / root.maxVolume width: parent.width * Math.min(root.volume, root.maxVolume) / root.maxVolume
color: "#FF6B4A" color: Theme.hot
visible: !root.muted && root.volume > 1 visible: !root.muted && root.volume > 1
Behavior on width { Behavior on width {
@@ -98,7 +99,7 @@ Scope {
anchors.centerIn: parent anchors.centerIn: parent
implicitHeight: 6 implicitHeight: 6
width: parent.width * Math.min(root.volume, 1) / root.maxVolume width: parent.width * Math.min(root.volume, 1) / root.maxVolume
color: root.muted ? "#7A7B7D" : "#FFD063" color: root.muted ? Theme.muted : Theme.accent
Behavior on width { Behavior on width {
NumberAnimation { NumberAnimation {
@@ -1,476 +0,0 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Services.Pipewire
import Quickshell.Wayland
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import QtQuick.Shapes
// A vertical sidebar carrying the "Slant" (launcher V6) visual language —
// chamfered panel, thick trapezoid bevel accents, an outward bracket, a
// floating triangle cap and a slanted divider. Right-anchored, mirrored.
Scope {
id: root
property bool active: true
function toggle() {
root.active = !root.active;
}
GlobalShortcut {
name: "sidebar"
description: "Toggle the Slant sidebar"
onPressed: root.toggle()
}
readonly property PwNode sink: Pipewire.defaultAudioSink
readonly property real volume: sink?.audio?.volume ?? 0
readonly property bool muted: sink?.audio?.muted ?? false
readonly property real maxVolume: 1.5
PwObjectTracker {
objects: [root.sink]
}
PanelWindow {
id: win
visible: root.active
color: "transparent"
anchors {
top: true
right: true
bottom: true
}
margins {
top: 8
}
// Frame width plus the gutter the outward bracket grows into.
readonly property int pad: 10
implicitWidth: 72 + 2 * pad
Item {
id: frame
// Inset so the outward bracket has room in the gutter.
anchors.fill: parent
anchors.margins: win.pad
readonly property int chamfer: 18 // big cut corners (top-right, bottom-left)
readonly property int smallChamfer: 7 // small bevel (top-left, bottom-right)
readonly property int bevel: 4 // inward thickness of the trapezoid accents
readonly property int chunkThick: 7 // outward thickness of the bracket
readonly property int chunkSlant: 10 // slant of the bracket end pieces
readonly property int capSize: 10 // floating triangle cap
readonly property int armSide: 58 // bracket arm down the left edge
readonly property int armTop: 34 // bracket arm along the top edge
Shape {
id: panelShape
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
// Panel: big chamfers on top-right & bottom-left, small bevels
// on top-left & bottom-right (mirror of the left-anchored panel).
ShapePath {
fillColor: "#0F1012"
strokeColor: "#FFD063"
strokeWidth: 2
startX: panelShape.width - frame.chamfer
startY: 0
PathLine {
x: frame.smallChamfer
y: 0
}
PathLine {
x: 0
y: frame.smallChamfer
}
PathLine {
x: 0
y: panelShape.height - frame.chamfer
}
PathLine {
x: frame.chamfer
y: panelShape.height
}
PathLine {
x: panelShape.width - frame.smallChamfer
y: panelShape.height
}
PathLine {
x: panelShape.width
y: panelShape.height - frame.smallChamfer
}
PathLine {
x: panelShape.width
y: frame.chamfer
}
PathLine {
x: panelShape.width - frame.chamfer
y: 0
}
}
// Thick top-right bevel accent (trapezoid to the edges).
ShapePath {
strokeWidth: 0
fillColor: "#FFD063"
startX: panelShape.width
startY: frame.chamfer
PathLine {
x: panelShape.width - frame.chamfer
y: 0
}
PathLine {
x: panelShape.width - frame.chamfer - 2 * frame.bevel
y: 0
}
PathLine {
x: panelShape.width
y: frame.chamfer + 2 * frame.bevel
}
PathLine {
x: panelShape.width
y: frame.chamfer
}
}
// Thick bottom-left bevel accent.
ShapePath {
strokeWidth: 0
fillColor: "#FFD063"
startX: 0
startY: panelShape.height - frame.chamfer
PathLine {
x: frame.chamfer
y: panelShape.height
}
PathLine {
x: frame.chamfer + 2 * frame.bevel
y: panelShape.height
}
PathLine {
x: 0
y: panelShape.height - frame.chamfer - 2 * frame.bevel
}
PathLine {
x: 0
y: panelShape.height - frame.chamfer
}
}
// Floating triangle cap in the bottom-left notch.
ShapePath {
strokeWidth: 0
fillColor: "#FFD063"
startX: 0
startY: panelShape.height
PathLine {
x: 0
y: panelShape.height - frame.capSize
}
PathLine {
x: frame.capSize
y: panelShape.height
}
PathLine {
x: 0
y: panelShape.height
}
}
// Outward bracket wrapping the top-left corner: down the left
// edge and along the top edge, with slanted ends and a beveled
// corner following the small chamfer.
ShapePath {
strokeWidth: 0
fillColor: "#FFD063"
startX: 0
startY: frame.armSide
PathLine {
x: -frame.chunkThick
y: frame.armSide - frame.chunkSlant
}
PathLine {
x: -frame.chunkThick
y: frame.smallChamfer
}
PathLine {
x: frame.smallChamfer
y: -frame.chunkThick
}
PathLine {
x: frame.armTop - frame.chunkSlant
y: -frame.chunkThick
}
PathLine {
x: frame.armTop
y: 0
}
PathLine {
x: frame.smallChamfer
y: 0
}
PathLine {
x: 0
y: frame.smallChamfer
}
PathLine {
x: 0
y: frame.armSide
}
}
}
// ── Content ────────────────────────────────────────────────────
ColumnLayout {
anchors.fill: parent
anchors.topMargin: 16
anchors.bottomMargin: 16
anchors.leftMargin: 10
anchors.rightMargin: 8
spacing: 10
// Clock — Digital-7, hh over mm
Text {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: Qt.formatDateTime(clock.date, "hh\nmm")
font.family: "Digital-7 Mono"
font.pointSize: 22
font.letterSpacing: 1
color: "#EEEEEE"
SystemClock {
id: clock
precision: SystemClock.Minutes
}
}
// Date
Text {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: Qt.formatDateTime(clock.date, "dd\nMMM").toUpperCase()
font.family: "Digital-7 Mono"
font.pointSize: 13
color: "#FFD063"
}
// Slanted divider
Item {
Layout.fillWidth: true
implicitHeight: 4
Shape {
id: divider
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
strokeWidth: 0
fillColor: "#FFD063"
startX: 8
startY: 0
PathLine { x: divider.width; y: 0 }
PathLine { x: divider.width - 8; y: divider.height }
PathLine { x: 0; y: divider.height }
PathLine { x: 8; y: 0 }
}
}
}
Item {
Layout.fillHeight: true
}
// Volume — vertical meter with a sheared fill and a % readout
Text {
Layout.alignment: Qt.AlignHCenter
text: "VOL"
font.family: "Digital-7 Mono"
font.pointSize: 10
color: "#7A7B7D"
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 3
// Overflow — three floating slanted segments for volume
// pushed above 100%, lit with the same overload color as
// the volume OSD.
Repeater {
model: 3
delegate: Item {
id: seg
required property int index
readonly property real segStart: 1 + (2 - index) / 3 * (root.maxVolume - 1)
readonly property real segEnd: 1 + (3 - index) / 3 * (root.maxVolume - 1)
readonly property real frac: root.muted ? 0 : Math.max(0, Math.min(1, (root.volume - segStart) / (segEnd - segStart)))
readonly property int chamfer: 4
Layout.alignment: Qt.AlignHCenter
implicitWidth: 16
implicitHeight: 12
// Empty track, chamfered to match the main meter.
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
strokeWidth: 1
strokeColor: "#7A7B7D"
fillColor: "#292C30"
startX: seg.chamfer
startY: 0
PathLine { x: seg.width; y: 0 }
PathLine { x: seg.width; y: seg.height - seg.chamfer }
PathLine { x: seg.width - seg.chamfer; y: seg.height }
PathLine { x: 0; y: seg.height }
PathLine { x: 0; y: seg.chamfer }
PathLine { x: seg.chamfer; y: 0 }
}
}
// Overload fill — reveals a fixed copy of the same
// chamfered hexagon from the bottom, so filled and
// empty states always share one silhouette.
Item {
id: segFillClip
anchors.left: parent.left
anchors.leftMargin: 2
anchors.right: parent.right
anchors.rightMargin: 2
anchors.bottom: parent.bottom
anchors.bottomMargin: 2
clip: true
height: seg.frac * (seg.height - 4)
Shape {
id: segFill
width: seg.width - 4
height: seg.height - 4
y: segFillClip.height - height
preferredRendererType: Shape.CurveRenderer
readonly property int chamfer: seg.chamfer - 2
ShapePath {
strokeWidth: 0
fillColor: "#FF6B4A"
startX: segFill.chamfer
startY: 0
PathLine { x: segFill.width; y: 0 }
PathLine { x: segFill.width; y: segFill.height - segFill.chamfer }
PathLine { x: segFill.width - segFill.chamfer; y: segFill.height }
PathLine { x: 0; y: segFill.height }
PathLine { x: 0; y: segFill.chamfer }
PathLine { x: segFill.chamfer; y: 0 }
}
}
}
}
}
Item {
id: volMeter
Layout.alignment: Qt.AlignHCenter
implicitWidth: 16
implicitHeight: 96
readonly property int chamfer: 6
// Track — chamfered top-left/bottom-right to match the
// panel's slant, so the sheared fill sits in a shape that
// agrees with it rather than a plain rectangle.
Shape {
anchors.fill: parent
preferredRendererType: Shape.CurveRenderer
ShapePath {
strokeWidth: 1
strokeColor: "#7A7B7D"
fillColor: "#292C30"
startX: volMeter.chamfer
startY: 0
PathLine { x: volMeter.width; y: 0 }
PathLine { x: volMeter.width; y: volMeter.height - volMeter.chamfer }
PathLine { x: volMeter.width - volMeter.chamfer; y: volMeter.height }
PathLine { x: 0; y: volMeter.height }
PathLine { x: 0; y: volMeter.chamfer }
PathLine { x: volMeter.chamfer; y: 0 }
}
}
// Accent fill — reveals a fixed copy of the same
// chamfered hexagon as the track from the bottom, so
// the fill and background always share one silhouette.
Item {
id: fillClip
anchors.left: parent.left
anchors.leftMargin: 2
anchors.right: parent.right
anchors.rightMargin: 2
anchors.bottom: parent.bottom
anchors.bottomMargin: 2
clip: true
readonly property real frac: root.muted ? 0 : Math.min(root.volume, 1)
height: frac * (volMeter.height - 4)
Shape {
id: vol
width: volMeter.width - 4
height: volMeter.height - 4
y: fillClip.height - height
preferredRendererType: Shape.CurveRenderer
readonly property int chamfer: volMeter.chamfer - 2
ShapePath {
strokeWidth: 0
fillColor: root.muted ? "#7A7B7D" : "#FFD063"
startX: vol.chamfer
startY: 0
PathLine { x: vol.width; y: 0 }
PathLine { x: vol.width; y: vol.height - vol.chamfer }
PathLine { x: vol.width - vol.chamfer; y: vol.height }
PathLine { x: 0; y: vol.height }
PathLine { x: 0; y: vol.chamfer }
PathLine { x: vol.chamfer; y: 0 }
}
}
}
}
}
Text {
Layout.alignment: Qt.AlignHCenter
text: root.muted ? "--" : Math.round(root.volume * 100)
font.family: "Digital-7 Mono"
font.pointSize: 14
color: root.muted ? "#7A7B7D" : "#EEEEEE"
}
}
}
}
}
+14 -13
View File
@@ -6,10 +6,11 @@ import Quickshell.Widgets
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.theme
// The right bar: a compact utility strip for the SystemTray icons, styled // The right bar: a compact utility strip for the SystemTray icons, styled
// in the same family as the Launcher (V6 "Slant") and SideBar — accent // in the same family as the Launcher (V6 "Slant") and SideBar — accent
// color, chamfered corners, Digital-7 Mono, the slash-trio motif — but with // color, chamfered corners, the readout font, the slash-trio motif — but with
// its own plain, evenly-chamfered panel rather than their ornate // its own plain, evenly-chamfered panel rather than their ornate
// bracket-and-cap silhouette, since this is a secondary/utility bar rather // bracket-and-cap silhouette, since this is a secondary/utility bar rather
// than a hero surface. // than a hero surface.
@@ -54,8 +55,8 @@ Scope {
preferredRendererType: Shape.CurveRenderer preferredRendererType: Shape.CurveRenderer
ShapePath { ShapePath {
fillColor: "#0F1012" fillColor: Theme.surface
strokeColor: "#FFD063" strokeColor: Theme.accent
strokeWidth: 2 strokeWidth: 2
startX: frame.chamfer startX: frame.chamfer
@@ -114,7 +115,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 6 startX: 6
startY: 0 startY: 0
PathLine { x: 10; y: 0 } PathLine { x: 10; y: 0 }
@@ -124,7 +125,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 15 startX: 15
startY: 0 startY: 0
PathLine { x: 19; y: 0 } PathLine { x: 19; y: 0 }
@@ -134,7 +135,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 24 startX: 24
startY: 0 startY: 0
PathLine { x: 28; y: 0 } PathLine { x: 28; y: 0 }
@@ -155,7 +156,7 @@ Scope {
preferredRendererType: Shape.CurveRenderer preferredRendererType: Shape.CurveRenderer
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 8 startX: 8
startY: 0 startY: 0
PathLine { x: divider.width; y: 0 } PathLine { x: divider.width; y: 0 }
@@ -169,9 +170,9 @@ Scope {
Text { Text {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: "TRAY" text: "TRAY"
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 12 font.pointSize: 12
color: "#7A7B7D" color: Theme.muted
} }
ListView { ListView {
@@ -201,17 +202,17 @@ Scope {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
visible: SystemTray.items.values.length === 0 visible: SystemTray.items.values.length === 0
text: "--" text: "--"
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 14 font.pointSize: 14
color: "#7A7B7D" color: Theme.muted
} }
Text { Text {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: SystemTray.items.values.length text: SystemTray.items.values.length
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 16 font.pointSize: 16
color: "#EEEEEE" color: Theme.text
} }
} }
} }
@@ -2,6 +2,7 @@ import Quickshell
import Quickshell.Services.SystemTray import Quickshell.Services.SystemTray
import QtQuick import QtQuick
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.theme
// A single tray icon, chamfered to match the Slant (launcher V6 / SideBar) // A single tray icon, chamfered to match the Slant (launcher V6 / SideBar)
// visual language instead of a plain rectangular hit target. // visual language instead of a plain rectangular hit target.
@@ -35,8 +36,8 @@ MouseArea {
ShapePath { ShapePath {
strokeWidth: 1 strokeWidth: 1
strokeColor: root.containsMouse ? "#FFD063" : "#7A7B7D" strokeColor: root.containsMouse ? Theme.accent : Theme.muted
fillColor: "#292C30" fillColor: Theme.raised
startX: root.chamfer startX: root.chamfer
startY: 0 startY: 0
@@ -0,0 +1,61 @@
pragma Singleton
import Quickshell
import QtQuick
// Single source of truth for the shell's palette and font families.
//
// The shell previously ran two unrelated palettes: an amber one (#FFD063) used
// by the launchers, sidebar, systray, vitals and notifications, and an orange
// one (#e8722a) that only the dense bar had, tokenized as per-file properties.
// This unifies on the ORANGE values under the AMBER naming scheme.
//
// `surface` deliberately takes the dense bar's void (#0a0a0a) rather than the
// old panel background (#0F1012), which also absorbs the near-identical
// #0A0A0C scrim.
Singleton {
// ---- core ----
readonly property color accent: "#e8722a" // was #FFD063 (amber) / #e8722a (bar)
readonly property color text: "#dedede" // was #EEEEEE / #dedede
readonly property color muted: "#858585" // was #7A7B7D / #858585
readonly property color surface: "#0a0a0a" // was #0F1012 + #0A0A0C + #0a0a0a
readonly property color hot: "#ff6b4a" // alert/hot; no bar equivalent, kept
// ---- supporting darks ----
// A three-step ramp above `surface`. `raised` also absorbs #22262C, which
// differed from #292C30 by an imperceptible amount across two call sites.
readonly property color selection: "#1a1c1f" // selected row fill
readonly property color raised: "#292c30" // raised surface / border
readonly property color disabled: "#3a3d42" // unknown / disabled stroke
// ---- accents ----
// The pale "flash" the top/bottom bars show while a launcher is open. Was a
// hand-picked #FFF3C0 against amber; derived here so it tracks `accent`.
// 55% toward white reproduces the original amber relationship closely
// (#FFD063 -> #FFE9B8 vs the hand-picked #FFF3C0).
readonly property color accentSoft: Qt.tint(accent, Qt.rgba(1, 1, 1, 0.55))
readonly property color highlight: "#ffffff"
// ---- fonts ----
// Two faces. `readoutFont` is an alias rather than a second literal so the
// two roles cannot silently drift apart; point it at a different family if
// the readouts should ever diverge from the headings again.
//
// Installed by services/desktop/desktop-apps.nix (nerd-fonts.departure-mono).
// The former readout face, Digital-7 Mono, was never packaged — it relied on
// a manual ~/.dots/fonts/digital_7 install, so dropping it also removes an
// undeclared external dependency.
readonly property string displayFont: "DepartureMono Nerd Font" // headings, large values
readonly property string readoutFont: displayFont // seven-segment readouts: launchers, sidebar, systray, vitals
readonly property string microFont: "DejaVu Sans Mono" // dense bar micro labels
// ---- derived alpha variants ----
// The dense bar hand-encoded these as Qt.rgba(0.87,0.87,0.87,a) = text and
// Qt.rgba(0.91,0.45,0.16,a) = accent. Expressed as functions so the
// relationship survives a palette change.
function textAlpha(a) { return Qt.rgba(text.r, text.g, text.b, a); }
function accentAlpha(a) { return Qt.rgba(accent.r, accent.g, accent.b, a); }
// Hairline rule / panel outline: text at 28%.
readonly property color hair: textAlpha(0.28)
}
@@ -1,5 +1,6 @@
import QtQuick import QtQuick
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.theme
// Horizontal meter in the Slant language: a chamfered track whose fill is a // Horizontal meter in the Slant language: a chamfered track whose fill is a
// clipped copy of the SAME hexagon, so empty and full always share one // clipped copy of the SAME hexagon, so empty and full always share one
@@ -26,8 +27,8 @@ Item {
ShapePath { ShapePath {
strokeWidth: 1 strokeWidth: 1
strokeColor: bar.unknown ? "#3A3D42" : "#7A7B7D" strokeColor: bar.unknown ? Theme.disabled : Theme.muted
fillColor: "#292C30" fillColor: Theme.raised
startX: bar.chamfer startX: bar.chamfer
startY: 0 startY: 0
@@ -72,7 +73,7 @@ Item {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: bar.hot ? "#FF6B4A" : "#FFD063" fillColor: bar.hot ? Theme.hot : Theme.accent
Behavior on fillColor { Behavior on fillColor {
ColorAnimation { ColorAnimation {
+43 -42
View File
@@ -6,6 +6,7 @@ import Quickshell.Wayland
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Shapes import QtQuick.Shapes
import qs.widgets.theme
// Host vitals HUD — the "Slant" language (chamfered panel, trapezoid bevels, // Host vitals HUD — the "Slant" language (chamfered panel, trapezoid bevels,
// outward corner chunks, floating cap, slanted dividers) carried over from the // outward corner chunks, floating cap, slanted dividers) carried over from the
@@ -59,7 +60,7 @@ Scope {
// Dim backdrop — click anywhere to dismiss. // Dim backdrop — click anywhere to dismiss.
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "#0A0A0C" color: Theme.surface
opacity: 0.5 opacity: 0.5
MouseArea { MouseArea {
@@ -102,8 +103,8 @@ Scope {
preferredRendererType: Shape.CurveRenderer preferredRendererType: Shape.CurveRenderer
ShapePath { ShapePath {
fillColor: "#0F1012" fillColor: Theme.surface
strokeColor: "#FFD063" strokeColor: Theme.accent
strokeWidth: 2 strokeWidth: 2
startX: frame.chamfer startX: frame.chamfer
@@ -121,7 +122,7 @@ Scope {
// Thick top-left bevel accent. // Thick top-left bevel accent.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 0 startX: 0
startY: frame.chamfer startY: frame.chamfer
@@ -134,7 +135,7 @@ Scope {
// Thick bottom-right bevel accent. // Thick bottom-right bevel accent.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width startX: panelShape.width
startY: panelShape.height - frame.chamfer startY: panelShape.height - frame.chamfer
@@ -147,7 +148,7 @@ Scope {
// Floating triangle cap in the bottom-right notch. // Floating triangle cap in the bottom-right notch.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width startX: panelShape.width
startY: panelShape.height startY: panelShape.height
@@ -159,7 +160,7 @@ Scope {
// Heavy outward chunk wrapping the bottom-left corner. // Heavy outward chunk wrapping the bottom-left corner.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width / 3 startX: panelShape.width / 3
startY: panelShape.height startY: panelShape.height
@@ -176,7 +177,7 @@ Scope {
// Heavy outward chunk wrapping the top-right corner. // Heavy outward chunk wrapping the top-right corner.
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: panelShape.width startX: panelShape.width
startY: panelShape.height / 3 startY: panelShape.height / 3
@@ -217,7 +218,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 6 startX: 6
startY: 0 startY: 0
PathLine { x: 10; y: 0 } PathLine { x: 10; y: 0 }
@@ -227,7 +228,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 15 startX: 15
startY: 0 startY: 0
PathLine { x: 19; y: 0 } PathLine { x: 19; y: 0 }
@@ -237,7 +238,7 @@ Scope {
} }
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 24 startX: 24
startY: 0 startY: 0
PathLine { x: 28; y: 0 } PathLine { x: 28; y: 0 }
@@ -249,8 +250,8 @@ Scope {
Text { Text {
text: (vitals.host || "vitals").toUpperCase() text: (vitals.host || "vitals").toUpperCase()
color: "#EEEEEE" color: Theme.text
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 20 font.pointSize: 20
font.letterSpacing: 2 font.letterSpacing: 2
} }
@@ -261,15 +262,15 @@ Scope {
Text { Text {
text: "UP" text: "UP"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
} }
Text { Text {
text: vitals.fmtUptime(vitals.uptime) text: vitals.fmtUptime(vitals.uptime)
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 16 font.pointSize: 16
} }
} }
@@ -281,8 +282,8 @@ Scope {
Layout.fillWidth: true Layout.fillWidth: true
visible: vitals.failed visible: vitals.failed
text: "NODE_EXPORTER UNREACHABLE ON :" + vitals.port text: "NODE_EXPORTER UNREACHABLE ON :" + vitals.port
color: "#FF6B4A" color: Theme.hot
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 13 font.pointSize: 13
} }
@@ -353,7 +354,7 @@ Scope {
Text { Text {
Layout.preferredWidth: 96 Layout.preferredWidth: 96
text: diskRow.modelData.mount text: diskRow.modelData.mount
color: "#7A7B7D" color: Theme.muted
font.pointSize: 9 font.pointSize: 9
elide: Text.ElideMiddle elide: Text.ElideMiddle
} }
@@ -369,8 +370,8 @@ Scope {
Layout.preferredWidth: 48 Layout.preferredWidth: 48
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
text: Math.round(diskRow.frac * 100) + "%" text: Math.round(diskRow.frac * 100) + "%"
color: diskRow.frac >= 0.9 ? "#FF6B4A" : "#EEEEEE" color: diskRow.frac >= 0.9 ? Theme.hot : Theme.text
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 13 font.pointSize: 13
} }
@@ -378,8 +379,8 @@ Scope {
Layout.preferredWidth: 104 Layout.preferredWidth: 104
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
text: vitals.fmtBytes(diskRow.modelData.size - diskRow.modelData.used) + " FREE" text: vitals.fmtBytes(diskRow.modelData.size - diskRow.modelData.used) + " FREE"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
} }
} }
@@ -399,21 +400,21 @@ Scope {
Text { Text {
Layout.preferredWidth: 96 Layout.preferredWidth: 96
text: vitals.netIface || "NET" text: vitals.netIface || "NET"
color: "#7A7B7D" color: Theme.muted
font.pointSize: 9 font.pointSize: 9
} }
Text { Text {
text: "RX" text: "RX"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
} }
Text { Text {
text: vitals.fmtRate(vitals.netRx) text: vitals.fmtRate(vitals.netRx)
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 14 font.pointSize: 14
} }
@@ -423,15 +424,15 @@ Scope {
Text { Text {
text: "TX" text: "TX"
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
} }
Text { Text {
text: vitals.fmtRate(vitals.netTx) text: vitals.fmtRate(vitals.netTx)
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 14 font.pointSize: 14
// Right-align the TX readout against the panel edge the // Right-align the TX readout against the panel edge the
@@ -469,8 +470,8 @@ Scope {
Text { Text {
Layout.preferredWidth: 46 Layout.preferredWidth: 46
text: metric.label text: metric.label
color: "#FFD063" color: Theme.accent
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 15 font.pointSize: 15
font.letterSpacing: 1 font.letterSpacing: 1
} }
@@ -486,8 +487,8 @@ Scope {
Layout.preferredWidth: 54 Layout.preferredWidth: 54
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
text: metric.readout text: metric.readout
color: "#EEEEEE" color: Theme.text
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 16 font.pointSize: 16
} }
} }
@@ -499,8 +500,8 @@ Scope {
Text { Text {
text: metric.detail text: metric.detail
color: "#7A7B7D" color: Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
} }
@@ -511,8 +512,8 @@ Scope {
Text { Text {
visible: metric.aside.length > 0 visible: metric.aside.length > 0
text: metric.aside text: metric.aside
color: metric.asideHot ? "#FF6B4A" : "#7A7B7D" color: metric.asideHot ? Theme.hot : Theme.muted
font.family: "Digital-7 Mono" font.family: Theme.readoutFont
font.pointSize: 11 font.pointSize: 11
} }
} }
@@ -530,7 +531,7 @@ Scope {
ShapePath { ShapePath {
strokeWidth: 0 strokeWidth: 0
fillColor: "#FFD063" fillColor: Theme.accent
startX: 6 startX: 6
startY: 0 startY: 0
PathLine { x: divider.width; y: 0 } PathLine { x: divider.width; y: 0 }
+3 -1
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Start both comms apps; Hyprland window rules move them to special:communications. # Start the comms apps; Hyprland window rules move them to special:communications.
flatpak run org.telegram.desktop & flatpak run org.telegram.desktop &
flatpak run com.discordapp.Discord & flatpak run com.discordapp.Discord &
# terra only (hosts/terra/configuration.nix).
command -v TeamSpeak >/dev/null && TeamSpeak &
Generated
+383 -67
View File
@@ -14,11 +14,11 @@
"uv2nix": "uv2nix" "uv2nix": "uv2nix"
}, },
"locked": { "locked": {
"lastModified": 1786986906, "lastModified": 1794238815,
"narHash": "sha256-DJ1oU9szQJNdEM0dysh4NnKOB1HwOKtNukrUYKpawVs=", "narHash": "sha256-ITaU80ncGp9K/OqoRBbiuxVgMyFHU5sJ9W4FeU6oyiE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "authentik-nix", "repo": "authentik-nix",
"rev": "afdb2eeca1e0b38fabb93c4a8944be73d3581268", "rev": "6441c8b2b900260ac4e9520ab1ce5be6ff1ff39e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -30,16 +30,16 @@
"authentik-src": { "authentik-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1784731584, "lastModified": 1792581414,
"narHash": "sha256-/HdXzjjvuSW7zjbCNJKm3Fj8gvIwfrDf8mOYev0yuIg=", "narHash": "sha256-gdhGKCfsMUrWyFnf5TaaHM2ZQ1WYgTLOgGg4DlCaUHU=",
"owner": "goauthentik", "owner": "goauthentik",
"repo": "authentik", "repo": "authentik",
"rev": "0c67ea476be6319f1b2a41cb0f5ed128af37b99b", "rev": "4ec0d19b98da3c329781894cd550da95d3033954",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "goauthentik", "owner": "goauthentik",
"ref": "version/2026.5.6", "ref": "version/2026.8.5",
"repo": "authentik", "repo": "authentik",
"type": "github" "type": "github"
} }
@@ -47,11 +47,11 @@
"client-ts-generator-src": { "client-ts-generator-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1784638510, "lastModified": 1792605533,
"narHash": "sha256-NfwEWQ/SRjgeUz+F/7uoWAMwk7OqdF2+686krhvJn2M=", "narHash": "sha256-f82MB+n7cgKj62g2aTSW34KosYhE7d/dj1KUhJ5KrTY=",
"owner": "goauthentik", "owner": "goauthentik",
"repo": "client-ts", "repo": "client-ts",
"rev": "5850af5867bef6fd4291731797d21b704c7f189d", "rev": "cbdadfa3cb808b6b587e64c5430bf2d70b2d3461",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -67,11 +67,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781152676, "lastModified": 1794328522,
"narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=", "narHash": "sha256-h2BYMW4nTFpIqnMd8gwAPFmJAp/1wWLQ6vT0NfL5qt4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1", "rev": "1dd30c29c88d99ce295f15e27f93c49bc5fbae07",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -96,16 +96,48 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1777699697,
"narHash": "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ=",
"rev": "382052b74656a369c5408822af3f2501e9b1af81",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/382052b74656a369c5408822af3f2501e9b1af81.tar.gz?rev=382052b74656a369c5408822af3f2501e9b1af81"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1785627969, "lastModified": 1793576659,
"narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=", "narHash": "sha256-V1h85lUaJBQoHFrB2vpXZOE0Ju1MYSnIpsehoVZYlDo=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a", "rev": "ea2630b7470978622c7689a1ff75d2b389175399",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1793576659,
"narHash": "sha256-V1h85lUaJBQoHFrB2vpXZOE0Ju1MYSnIpsehoVZYlDo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "ea2630b7470978622c7689a1ff75d2b389175399",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -122,11 +154,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1791914995,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-Zf/xfQEAasnwnmEfHqW/4hjDE/s44yn2hD4RuVIZRjA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "b7a79d3fea1e214f6d668d521cecec0c01e26544",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -135,6 +167,33 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": {
"inputs": {
"flake-compat": [
"nix-citizen",
"nix-gaming",
"flake-compat"
],
"nixpkgs": [
"nix-citizen",
"nix-gaming",
"nixpkgs"
]
},
"locked": {
"lastModified": 1793686154,
"narHash": "sha256-Zb/0L3soxrkfcrywpfp0J++0WFLB3tzh0Xtx9up+VNc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "204b6977e00caac19e2313015a598543ca7be150",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -142,11 +201,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1787377438, "lastModified": 1794251182,
"narHash": "sha256-Sxu1NLTD/Ern6hFGLlZmtKCSct3YQXZI/lls8RE1XeM=", "narHash": "sha256-R2sZBXiOJo3HAnvTiVkbbHDJy//JMlAwUKEiPbfqPXk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "65258d5c65a250189fde2e35f490d15e064c4c62", "rev": "6eb2d33d1d0c95a37ef6443c88e6c1686012ee8b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -156,6 +215,26 @@
"type": "github" "type": "github"
} }
}, },
"honcho-console": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1790980944,
"narHash": "sha256-uvGecoGp+jTNCyVi3Zhxk3nNYPYfmbuQ9jE6BXU5d5E=",
"ref": "refs/heads/master",
"rev": "6aa45e5a7a238c1d84cf2014b3a1dec5c8969371",
"revCount": 12,
"type": "git",
"url": "ssh://gitea@git.mgaction.town:2222/darman/honcho-console.git"
},
"original": {
"type": "git",
"url": "ssh://gitea@git.mgaction.town:2222/darman/honcho-console.git"
}
},
"hypr-chrome": { "hypr-chrome": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -176,6 +255,43 @@
"url": "https://git.mgaction.town/darman/hypr-chrome.git" "url": "https://git.mgaction.town/darman/hypr-chrome.git"
} }
}, },
"hyprchrome": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1794684228,
"narHash": "sha256-Tn9JdMOSHfnhdmnTc9brl1dQPB/qkYkjH8ka2J3E8FU=",
"ref": "refs/heads/master",
"rev": "61959090074cbc3bfb7bdf22d861ab82e2dce397",
"revCount": 2,
"submodules": true,
"type": "git",
"url": "ssh://gitea@git.mgaction.town:2222/darman/hyprchrome.git"
},
"original": {
"type": "git",
"url": "ssh://gitea@git.mgaction.town:2222/darman/hyprchrome.git"
}
},
"livesync-bridge": {
"flake": false,
"locked": {
"lastModified": 1793773829,
"narHash": "sha256-YbenBjZd0WfPQ9Djtd7D460JmJzXiWeyBf2rYc4YE6A=",
"owner": "vrtmrz",
"repo": "livesync-bridge",
"rev": "1c252305bbddcacd200b8560d3bb786afe0906e9",
"type": "github"
},
"original": {
"owner": "vrtmrz",
"repo": "livesync-bridge",
"type": "github"
}
},
"media-manager": { "media-manager": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -216,13 +332,94 @@
"type": "github" "type": "github"
} }
}, },
"millennium": {
"inputs": {
"millennium-src": "millennium-src",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-bun": "nixpkgs-bun"
},
"locked": {
"dir": "packages/nix",
"lastModified": 1794588209,
"narHash": "sha256-i0Y49re/VXOTBGSjsYdEoIrP9IaNejmCeUHFssGQ+NQ=",
"owner": "SteamClientHomebrew",
"repo": "Millennium",
"rev": "6522c24e8bd3de41a7601ceb4e78a619930f1704",
"type": "github"
},
"original": {
"dir": "packages/nix",
"owner": "SteamClientHomebrew",
"repo": "Millennium",
"type": "github"
}
},
"millennium-src": {
"flake": false,
"locked": {
"lastModified": 1794587997,
"narHash": "sha256-UZQSHMsAaYTcx1TDAI7FTqVRsMpB1jLBL8kYKivwbYo=",
"owner": "SteamClientHomebrew",
"repo": "Millennium",
"rev": "ac5e1ad646b1d1dd76a04aecf32d9e5e41779201",
"type": "github"
},
"original": {
"owner": "SteamClientHomebrew",
"repo": "Millennium",
"rev": "ac5e1ad646b1d1dd76a04aecf32d9e5e41779201",
"type": "github"
}
},
"nexusmods-app": {
"flake": false,
"locked": {
"lastModified": 1792841846,
"narHash": "sha256-phMkc6bsvT0IzQ81rIMdnsrwXSHkwX69hL1mM1QW6e0=",
"ref": "feat/bg3-load-order",
"rev": "2a118e6e98811223526e1f5595390d81f9206b62",
"revCount": 8786,
"submodules": true,
"type": "git",
"url": "file:///mnt/hdd_01/dev/repos/nexus-mods-app"
},
"original": {
"ref": "feat/bg3-load-order",
"submodules": true,
"type": "git",
"url": "file:///mnt/hdd_01/dev/repos/nexus-mods-app"
}
},
"nix-citizen": {
"inputs": {
"flake-compat": "flake-compat_2",
"nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1794766393,
"narHash": "sha256-qtNL+kX2ru2k6kwmPhqG/mWjo83orqSi6wEXMxMmErI=",
"owner": "LovingMelody",
"repo": "nix-citizen",
"rev": "6b732ddacf308fa5820ca00133d4d72336bf3442",
"type": "github"
},
"original": {
"owner": "LovingMelody",
"repo": "nix-citizen",
"type": "github"
}
},
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1783368811, "lastModified": 1791644268,
"narHash": "sha256-0H8jDwR4Kegb3heaTrH1ftbgKfZVDT8JE+46uXxDy/Q=", "narHash": "sha256-f7Z4PmfnRxf7+37NN48ep+KsQauGtL5REE99pJtMNp8=",
"owner": "gmodena", "owner": "gmodena",
"repo": "nix-flatpak", "repo": "nix-flatpak",
"rev": "20d42f0ee98c9fe9f85e8d1de474f1409ed10d05", "rev": "02656785ab214fa1c9655f1beaaf0269eeeec2ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -231,6 +428,33 @@
"type": "github" "type": "github"
} }
}, },
"nix-gaming": {
"inputs": {
"flake-compat": [
"nix-citizen",
"flake-compat"
],
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"nixpkgs": [
"nix-citizen",
"nixpkgs"
]
},
"locked": {
"lastModified": 1794375173,
"narHash": "sha256-x97M5XOV+IDcm7K9Bv6a7OUePyEVCjPeLpr3iD3BJD8=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "3d460ece2fde6ba86a7f9deacc9a65e40f9ed19e",
"type": "github"
},
"original": {
"owner": "fufexan",
"repo": "nix-gaming",
"type": "github"
}
},
"nix-vm-test": { "nix-vm-test": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -239,11 +463,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1786747096, "lastModified": 1789916284,
"narHash": "sha256-9QqhmaLVsPhKdMSBaWKjDqeGRn8G4ov4cVuZ6JFwXbo=", "narHash": "sha256-lv8kCCNM04qFsEMjDVrx6Z4q1afk46CBCQQq1wk5yNM=",
"owner": "numtide", "owner": "numtide",
"repo": "nix-vm-test", "repo": "nix-vm-test",
"rev": "c8781a0ea2d8417506fff7722eae5a6316461212", "rev": "f6688c8cc9185daccbeb89b2ff6e57dd66e5474a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -267,14 +491,14 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1787124618, "lastModified": 1793171667,
"narHash": "sha256-aKf1k2hvYgaxP9oxDPRiv9npEJLODC9eKxk7nR69lzQ=", "narHash": "sha256-8h9MU32SjnFWIWRdtP9vYVNV5QrVbai8Oo1LW1rAmwc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-anywhere", "repo": "nixos-anywhere",
"rev": "ad8fa24e11eef167fd72d49fafefa3f840312d71", "rev": "58132e1d1f813b845382a2aeca4203b18d2ac807",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -291,11 +515,11 @@
"nixos-unstable": "nixos-unstable" "nixos-unstable": "nixos-unstable"
}, },
"locked": { "locked": {
"lastModified": 1787222173, "lastModified": 1791456080,
"narHash": "sha256-acp6QJnWVnLvnanC59CMkiDC/i0ZhdFKiB7prru9SHw=", "narHash": "sha256-VDnm81L/1YLrPklNacGCNwpPhHi5Tya1XbfdnCB/Zd0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-images", "repo": "nixos-images",
"rev": "e17386d9193d6d5a90f1b4b6a8a5cd2620d34b56", "rev": "50939ddf1a0339f289a9dbd810bdfd4e4fba6df4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -323,11 +547,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1786862985, "lastModified": 1794042290,
"narHash": "sha256-FBJRXmbGXiSUDvYEbfLYRkckayyZ6SK1UEqhCrIZ2Cs=", "narHash": "sha256-ziZn2PvCJE5JEEpqTdxXwJpPB+L3YqoCpTAMCzyaP3U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e5bdc4a41d4c072fe1e3787eaa0320a384741d44", "rev": "f4a03c008967841f2a0b3cb7c436fc6fc31671f6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -337,13 +561,44 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-bun": {
"locked": {
"lastModified": 1790822859,
"narHash": "sha256-69xHQhAeMAD2wDXO7T2pcOZIF9Sga2W+JkmY2a11Ops=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c59305bab2065cfecc4944690d9eedbb56f3a9fa",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c59305bab2065cfecc4944690d9eedbb56f3a9fa",
"type": "github"
}
},
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1785031560, "lastModified": 1793504054,
"narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=", "narHash": "sha256-ThkfL3D/FhCiZFc9+3BtxwuMmpuK+/bGtXCSo1+yVew=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c", "rev": "7851ba61fd862b277cb6a9cef37394bc18bb94e4",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1793504054,
"narHash": "sha256-ThkfL3D/FhCiZFc9+3BtxwuMmpuK+/bGtXCSo1+yVew=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "7851ba61fd862b277cb6a9cef37394bc18bb94e4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -354,11 +609,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1787209939, "lastModified": 1794644783,
"narHash": "sha256-WvvHR4kSQLAbtouMC/ruZ5UpLwlUcY3K4FAllMN+yGk=", "narHash": "sha256-3GnIGIy15bMduoS9RnWqKTmsJLWThla42UFtm0S7+us=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "391b592eb44808b3bd0cb80bb71b63a5a118b8bb", "rev": "5d2b81a7a3be3e2f832879028e4d60abbf58e9a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -370,11 +625,24 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1787204541, "lastModified": 1794386569,
"narHash": "sha256-OURZPknrTjQrlNyxPdqzyqmU/81Wes1CUP/Ft1Rv/YI=", "narHash": "sha256-W60urNAgQVS8bhNWH0bQsYoiagds8m38oTDUjEOM9FE=",
"rev": "d4f25a3e562008648d45bcf2d70bcc7422cad84e",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1117658.d4f25a3e5620/nixexprs.tar.zst?lastModified=1794386569&rev=d4f25a3e562008648d45bcf2d70bcc7422cad84e"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1794552581,
"narHash": "sha256-qXFIqA6FCcx7XeDzw0ZNlkDT9UiCzrNDwK8RuU8RcHM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5880666fd9eb563038431edb35c2d0aa595884e6", "rev": "f1e5c356f35d07e7b71a6b5e6c9338e0b029e0c0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -400,11 +668,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1785730568, "lastModified": 1793820911,
"narHash": "sha256-NjSPsgjJ7MSpBtTkUcmNhRe6AFZ96+zsca2M8YuQi8Y=", "narHash": "sha256-cc2EX2rfojnhcvqPQh4JEFGm2Mn/VoJyw5hTJTaw7Wo=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "build-system-pkgs", "repo": "build-system-pkgs",
"rev": "90fde00db3687922d39d95fc591475fd0bbbcd72", "rev": "947b2b0c973de462b19577715f04ba8d6f48ed7e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -450,11 +718,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1786031528, "lastModified": 1793820880,
"narHash": "sha256-cROiHKO3UbIKqF5FG5NikvydzlfIj4EcR1Cty9qOVt4=", "narHash": "sha256-NUMabnvaL/0Ah9WM9pBMXEp+dQjMSYjezZ/fNjXouLQ=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "pyproject.nix", "repo": "pyproject.nix",
"rev": "1b1485546d85f6f6c7aadb10c4923dbc09633263", "rev": "d43f0e74444c1f266c640fc49ce6ce6fb69d33c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -489,14 +757,21 @@
"authentik-nix": "authentik-nix", "authentik-nix": "authentik-nix",
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"honcho-console": "honcho-console",
"hypr-chrome": "hypr-chrome", "hypr-chrome": "hypr-chrome",
"hyprchrome": "hyprchrome",
"livesync-bridge": "livesync-bridge",
"mediamanager-nix": "mediamanager-nix", "mediamanager-nix": "mediamanager-nix",
"millennium": "millennium",
"nexusmods-app": "nexusmods-app",
"nix-citizen": "nix-citizen",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixos-anywhere": "nixos-anywhere", "nixos-anywhere": "nixos-anywhere",
"nixos-images": "nixos-images", "nixos-images": "nixos-images",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"tbctl": "tbctl",
"tome": "tome" "tome": "tome"
} }
}, },
@@ -507,11 +782,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1786629091, "lastModified": 1794624949,
"narHash": "sha256-gkig4nPi1CWc4Z50GBsjE4ygSE7hMpl/TwID2an2Cck=", "narHash": "sha256-3q/hxp/flW1PnV3Dx+H3p8kHGEHJ7251BqVMNsAAB9E=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "a8627b21b9107c5711c96b84f32a9a4b3d45295f", "rev": "11e5885d241743ff0193465d533b20e754bc3ce0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -535,14 +810,34 @@
"type": "github" "type": "github"
} }
}, },
"tbctl": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1793410258,
"narHash": "sha256-MMfosPFbaOEEEZsfR3IdtbVrAft+HX+xvznK4ouzXH4=",
"ref": "refs/heads/main",
"rev": "4b02ee62d4f4ede5378d140c39154e6cb5aeef92",
"revCount": 46,
"type": "git",
"url": "file:///mnt/hdd_01/dev/repos/openbeach"
},
"original": {
"type": "git",
"url": "file:///mnt/hdd_01/dev/repos/openbeach"
}
},
"tome": { "tome": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1785431655, "lastModified": 1793641410,
"narHash": "sha256-EoM4HmJb7MZArMoP4y1b7DZcvM8iANYjMiE5gGUx070=", "narHash": "sha256-Rab2elFs1E8pJJ90y+omA5I+Vou8wf+70BGrH3HClDs=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "4f3ca447cdc967371adaf71b26cf283952e54212", "rev": "5274abdc96772669c736992a9dfcbb9497557edb",
"revCount": 51, "revCount": 53,
"type": "git", "type": "git",
"url": "ssh://gitea@git.mgaction.town:2222/darman/TOME.git" "url": "ssh://gitea@git.mgaction.town:2222/darman/TOME.git"
}, },
@@ -552,6 +847,27 @@
} }
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": {
"nixpkgs": [
"nix-citizen",
"nixpkgs"
]
},
"locked": {
"lastModified": 1791885023,
"narHash": "sha256-C3alQ2MEt0zVrUSho5NUDo3jmhbff72++bfwoqT9Omo=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "0d6d739a833ba9a9c93034862e4a7b061a062a1c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixos-anywhere", "nixos-anywhere",
@@ -559,11 +875,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1786901030, "lastModified": 1791885023,
"narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=", "narHash": "sha256-C3alQ2MEt0zVrUSho5NUDo3jmhbff72++bfwoqT9Omo=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa", "rev": "0d6d739a833ba9a9c93034862e4a7b061a062a1c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -584,11 +900,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1786615403, "lastModified": 1793272761,
"narHash": "sha256-U++y7nM/6xiEcWI7q4fQoPZjPvRaTwkSqzBOVoEBjUE=", "narHash": "sha256-3CE1CEwprYlHRlRVkXDkhqec0jjF9Cti7tdk8vVDsCM=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "uv2nix", "repo": "uv2nix",
"rev": "4b59abb2ae1896d2a0e1abfc47fbc9bf985ea730", "rev": "c361746c7d630d98b972378290547c8d35542a7a",
"type": "github" "type": "github"
}, },
"original": { "original": {
+292 -119
View File
@@ -31,31 +31,73 @@
url = "github:strangeglyph/mediamanager-nix"; url = "github:strangeglyph/mediamanager-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Headless CouchDB<->filesystem sync for Obsidian LiveSync
# (hosts/mars/livesync-bridge.nix); not a flake/not in nixpkgs, so plain
# source pinned by flake.lock. Pin carefully — it's a small third-party
# project with open storage->couchdb bugs, so an unreviewed bump could
# silently change how notes get written back.
livesync-bridge = {
url = "github:vrtmrz/livesync-bridge";
flake = false;
};
authentik-nix.url = "github:nix-community/authentik-nix"; authentik-nix.url = "github:nix-community/authentik-nix";
nix-flatpak.url = "github:gmodena/nix-flatpak"; nix-flatpak.url = "github:gmodena/nix-flatpak";
# Own Hyprland plugin (border + title bar), public repo, fetched over # Own Hyprland plugin (border + title bar), public repo over https.
# https (no credentials needed, unlike tome below). `nixpkgs.follows` is # `nixpkgs.follows` is required since Hyprland plugins are ABI-locked to
# what makes its packaged build ABI-correct — Hyprland plugins are # the exact Hyprland build — it must share this flake's nixpkgs, not
# ABI-locked to the exact Hyprland build they load into, so it has to be # whatever hypr-chrome's own lock pins standalone.
# built against THIS flake's own nixpkgs, not whatever hypr-chrome's own
# flake.lock happens to pin standalone.
hypr-chrome = { hypr-chrome = {
url = "git+https://git.mgaction.town/darman/hypr-chrome.git"; url = "git+https://git.mgaction.town/darman/hypr-chrome.git";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Tome (formerly AudibleLibrary) — darman's own .NET/Photino desktop app. # Tome (formerly AudibleLibrary) — darman's own .NET/Photino desktop app.
# Private repo on our own gitea; fetched over ssh with darman's ambient key, # Private repo on our own gitea, fetched over ssh with darman's ambient
# same as any other git flake input. `flake = false`: it's a plain source # key; plain source tree (`flake = false`), see pkgs/tome.nix.
# tree, not itself a flake. See pkgs/tome.nix.
# #
# NOTE: the credential-less installer-iso can't fetch this (git+ssh needs # NOTE: the credential-less installer-iso can't fetch this, so
# darman's key), so `./scripts/deploy install terra localhost` will fail # `./scripts/deploy install terra localhost` fails at nixos-install
# at nixos-install (post-disko) while this input is present. Known # (post-disko) while this input is present — a known tradeoff.
# tradeoff — re-removed this once before (4f79ec7) for the same reason.
tome = { tome = {
url = "git+ssh://gitea@git.mgaction.town:2222/darman/TOME.git"; url = "git+ssh://gitea@git.mgaction.town:2222/darman/TOME.git";
flake = false; flake = false;
}; };
# Web console for luna's Honcho (hosts/mars/honcho-console.nix); own repo
# on our gitea, ships its package + NixOS module.
honcho-console = {
url = "git+ssh://gitea@git.mgaction.town:2222/darman/honcho-console.git";
inputs.nixpkgs.follows = "nixpkgs";
};
# tbctl (openbeach): KB7/KP7/Kone II Air CLI + desktop GUI on terra.
# Local checkout for now; upstream is git+ssh://git@github.com/darman96/openbeach.git?ref=main.
tbctl = {
url = "git+file:///mnt/hdd_01/dev/repos/openbeach";
inputs.nixpkgs.follows = "nixpkgs";
};
# hyprchrome: harness for the HyprChrome apps on our gitea. Carries
# hyprchrome-files (terra's default file manager), hyprchrome-claude
# (desktop app around the claude CLI) and hyprchrome-widgets as
# submodules, plus their shared libcosmic/winit patches, and builds the
# packages. Push the app and the harness there, then
# `nix flake update hyprchrome` here.
hyprchrome = {
url = "git+ssh://gitea@git.mgaction.town:2222/darman/hyprchrome.git";
inputs.nixpkgs.follows = "nixpkgs";
};
# NexusMods.App (terra): source of nixpkgs' package overridden with the
# local checkout's BG3 branch, see services/desktop/nexusmods-app.nix.
# Commit there, then `nix flake update nexusmods-app` here.
nexusmods-app = {
url = "git+file:///mnt/hdd_01/dev/repos/nexus-mods-app?ref=feat/bg3-load-order&submodules=1";
flake = false;
};
# Millennium Steam client modding (terra). Its overlay builds against our
# nixpkgs; nixpkgs-bun stays pinned since a fixed-output hash depends on it.
millennium = {
url = "github:SteamClientHomebrew/Millennium?dir=packages/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Star Citizen (terra). No nixpkgs follows: keeps wine-astral on its Cachix.
nix-citizen.url = "github:LovingMelody/nix-citizen";
}; };
outputs = { self, nixpkgs, disko, nixos-anywhere, sops-nix, nixos-images, home-manager, mediamanager-nix, authentik-nix, ... }@inputs: outputs = { self, nixpkgs, disko, nixos-anywhere, sops-nix, nixos-images, home-manager, mediamanager-nix, authentik-nix, ... }@inputs:
@@ -111,8 +153,22 @@
]; ];
}; };
# mars — on-site x86_64 box, single-purpose: Hermes Agent only. # titan — ASUS Zenbook Pro Duo UX581 laptop; same Hyprland workstation
# See hosts/mars/*. # as terra (profiles/workstation.nix). See hosts/titan/*.
titan = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
disko.nixosModules.disko
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
inputs.nix-flatpak.nixosModules.nix-flatpak
./hosts/titan/configuration.nix
];
};
# mars — on-site x86_64 box: Hermes Agent, plus the LAN web apps luna
# hosts herself (hosts/mars/luna-sites.nix). See hosts/mars/*.
mars = nixpkgs.lib.nixosSystem { mars = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
@@ -124,10 +180,9 @@
]; ];
}; };
# mercury — Raspberry Pi 3B+ (aarch64), DNS/DHCP. Boots from an SD image: # mercury — Raspberry Pi 3B+ (aarch64), DNS/DHCP; SD image via:
# nix build .#nixosConfigurations.mercury.config.system.build.sdImage # nix build .#nixosConfigurations.mercury.config.system.build.sdImage
# (aarch64 build — needs binfmt/qemu on this x86 host, or a remote/aarch64 # Needs binfmt/qemu for the aarch64 build on this x86 host (or a remote aarch64 builder).
# builder; substitutes most paths from cache.nixos.org.)
mercury = nixpkgs.lib.nixosSystem { mercury = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
@@ -197,16 +252,12 @@
]; ];
}; };
# Bootable USB recovery installer with our SSH key + sshd + DHCP. Clones # Bootable USB recovery installer with our SSH key + sshd + DHCP; clones
# the (now public) homelab repo fresh at every boot to /root/homelab — # the public homelab repo fresh at every boot to /root/homelab, so the
# always current master, so the same USB stick stays useful across # same stick stays current without a rebuild. Reusable for any host's
# install/rescue occasions without ever needing a rebuild. No # manual-USB install path.
# rsync/copy-the-repo-over step: boot it, ssh in, # Build: nix build .#nixosConfigurations.installer-iso.config.system.build.isoImage,
# `cd /root/homelab && ./scripts/deploy install ...`. # dd to USB, boot the target, ssh in, ./scripts/deploy install ...
# Reusable for any host's manual-USB install path (jupiter, terra, ...).
# Build the ISO:
# nix build .#nixosConfigurations.installer-iso.config.system.build.isoImage
# dd it to a USB stick, boot the target from it, SSH in, ./deploy install.
installer-iso = nixpkgs.lib.nixosSystem { installer-iso = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
@@ -221,34 +272,18 @@
console.keyMap = "de"; # matches common.nix's real hosts console.keyMap = "de"; # matches common.nix's real hosts
environment.systemPackages = [ pkgs.git ]; environment.systemPackages = [ pkgs.git ];
# findiso= is a SCRIPT-stage-1 feature (stage-1-init.sh) only. The # The systemd initrd (default since 26.05) has no findiso= path — only
# systemd initrd — the default since 26.05 — has no findiso path # the legacy script stage-1 does — so this install method needs it off.
# at all: it mounts /iso straight from
# /dev/disk/by-label/<volumeID> (iso-image.nix), which only exists
# when the ISO is the physical boot medium. Booted as a kernel +
# initrd off the ESP with the iso as a plain file elsewhere, that
# label never appears and stage 1 times out into an emergency
# shell (mounts /sysroot fine, then fails /sysroot/nix/.ro-store).
# Script stage 1 instead loop-mounts the file findiso= points at
# and symlinks it to /dev/root — which is the whole mechanism this
# install path relies on. So force it off here.
boot.initrd.systemd.enable = false; boot.initrd.systemd.enable = false;
# installation-cd-minimal leaves experimental-features unset, so # installation-cd-minimal ships with experimental-features unset;
# the ISO's nix.conf has no `nix-command`/`flakes` at all (unlike # without this, both `nix run .#disko` and `nixos-install --flake`
# the nixos-images kexec installer, which sets # die with "experimental Nix feature 'nix-command' is disabled".
# extra-experimental-features itself — which is why the same
# `install <config> localhost` branch works after kexec-local but
# not here). Without this, both `nix run .#disko` and
# `nixos-install --flake` die with "experimental Nix feature
# 'nix-command' is disabled".
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Fresh clone of a PUBLIC repo — no credentials baked into the # Fresh clone of the public repo (no credentials baked in) so
# ISO. require_tracked() in scripts/deploy still works fine here # scripts/deploy's require_tracked() sees a real checkout; retry
# (this IS a real git checkout, unlike the old baked-`self` # with `systemctl restart homelab-checkout` if DHCP wasn't up yet.
# approach), but retry manually with `systemctl restart
# homelab-checkout` if DHCP was still coming up at boot.
systemd.services.homelab-checkout = { systemd.services.homelab-checkout = {
description = "Clone the homelab repo to /root/homelab"; description = "Clone the homelab repo to /root/homelab";
after = [ "network-online.target" ]; after = [ "network-online.target" ];
@@ -265,34 +300,24 @@
''; '';
}; };
# Finishes a local_install_prepare_and_reboot() run (scripts/deploy) # Completes an unattended local_install_prepare_and_reboot() run:
# unattended: that function stages this ISO, points a systemd-boot # re-runs `./scripts/deploy install <config> localhost`, now genuinely
# one-shot entry at it with `homelab.install=<config>` on the kernel # inside the installer so it takes the disko+nixos-install branch.
# cmdline, and reboots. Once booted here, this re-runs the exact same # No-op if homelab.install= isn't on the kernel cmdline.
# `./scripts/deploy install <config> localhost` command — now genuinely
# inside the installer (hostname homelab-installer), so is_live_installer
# takes the disko+nixos-install branch instead of preparing again.
# A manual boot of this ISO with no such cmdline param is a no-op.
systemd.services.homelab-auto-install = { systemd.services.homelab-auto-install = {
description = "Auto-run the homelab install if homelab.install= was passed on the kernel cmdline"; description = "Auto-run the homelab install if homelab.install= was passed on the kernel cmdline";
after = [ "homelab-checkout.service" ]; after = [ "homelab-checkout.service" ];
requires = [ "homelab-checkout.service" ]; requires = [ "homelab-checkout.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
# Full system PATH, not the restricted default a `path = [...]` # Needs the full system PATH: scripts/deploy execs bash then shells
# produces: this unit execs `./scripts/deploy`, whose # out to nix/nixos-install/git/sudo/efibootmgr, none of which a
# `#!/usr/bin/env bash` needs bash, and which then reaches for # restricted `path = [...]` PATH provides. mkForce overrides NixOS's
# nix / nixos-install / git / sudo / efibootmgr. The default # default PATH derivation from `path`.
# service PATH gave "env: 'bash': No such file or directory"
# (status 127) before the script even started.
# /run/current-system/sw/bin carries all of it on the installer;
# /run/wrappers/bin for sudo. mkForce because NixOS otherwise
# derives environment.PATH from `path` and that line would win.
# #
# HOME too: systemd sets no $HOME for a service without User= # HOME too: systemd sets no $HOME without User= (SetLoginEnvironment=
# (systemd.exec(5): SetLoginEnvironment= defaults false), and # defaults false), and scripts/deploy runs under `set -u`, so a
# scripts/deploy runs under `set -u`, so a bare $HOME aborted the # missing $HOME aborted with a confusing "unbound variable".
# whole run with an "unbound variable" that read like a bug.
environment = { environment = {
HOME = "/root"; HOME = "/root";
PATH = lib.mkForce "/run/current-system/sw/bin:/run/wrappers/bin"; PATH = lib.mkForce "/run/current-system/sw/bin:/run/wrappers/bin";
@@ -304,17 +329,11 @@
exit 0 exit 0
fi fi
# Persist this whole run to a file that OUTLIVES the install. # Persist this run to a file that outlives the install: the journal
# The systemd journal is on the installer's tmpfs and dies with # dies with the reboot and disko wipes the OS disk before a failure
# the reboot, and by the time anything interesting fails disko # can be read back. homelab.logpart= points at the staging partition
# has already wiped the OS disk — so a failed attempt used to # (survives the wipe); every step here is best-effort so logging
# leave nothing to debug. local_install_prepare_and_reboot() # itself can't break an install.
# (scripts/deploy) passes the STAGING partition's PARTUUID as
# homelab.logpart=; that partition holds the iso and is on a
# different disk from the one disko wipes, so it survives. The
# actual install runs inside do_install() below so one tee at
# the end captures all of it. Every step here is best-effort:
# logging must never be the thing that breaks an install.
logfile="" logfile=""
logpart=$(grep -o 'homelab\.logpart=[^ ]*' /proc/cmdline | cut -d= -f2 || true) logpart=$(grep -o 'homelab\.logpart=[^ ]*' /proc/cmdline | cut -d= -f2 || true)
if [ -n "$logpart" ]; then if [ -n "$logpart" ]; then
@@ -324,9 +343,8 @@
if mount -o rw "$dev" /run/homelab-log 2>/dev/null; then if mount -o rw "$dev" /run/homelab-log 2>/dev/null; then
logdir=/run/homelab-log logdir=/run/homelab-log
elif where=$(findmnt -fno TARGET "$dev" 2>/dev/null) && [ -n "$where" ]; then elif where=$(findmnt -fno TARGET "$dev" 2>/dev/null) && [ -n "$where" ]; then
# stage-1's findiso already holds this partition mounted # stage-1's findiso already has this partition mounted (how it
# (that is how it reached the iso) — write into the existing # reached the iso) — reuse that mount instead of a second one.
# mount rather than trying to stack a second one on it.
mount -o remount,rw "$where" 2>/dev/null || true mount -o remount,rw "$where" 2>/dev/null || true
logdir="$where" logdir="$where"
fi fi
@@ -346,12 +364,10 @@
fi fi
do_install() { do_install() {
# The host key scripts/deploy seeds /etc/ssh with (so sops can # The host key (so sops can decrypt on first boot) can't live in
# decrypt on boot #1) cannot live in this ISO: it is built from # this public-repo ISO; local_install_prepare_and_reboot() drops it
# a PUBLIC repo and the private keys are deliberately off-repo. # on the boot partition instead and passes that PARTUUID here — the
# local_install_prepare_and_reboot() therefore drops it on the # copy dies with disko's wipe minutes later.
# boot partition and passes that partition's PARTUUID here.
# That copy dies with the disko wipe a few minutes later.
keypart=$(grep -o 'homelab\.keypart=[^ ]*' /proc/cmdline | cut -d= -f2 || true) keypart=$(grep -o 'homelab\.keypart=[^ ]*' /proc/cmdline | cut -d= -f2 || true)
if [ -n "$keypart" ]; then if [ -n "$keypart" ]; then
mkdir -p /run/homelab-key mkdir -p /run/homelab-key
@@ -372,12 +388,10 @@
fi fi
fi fi
# On a box whose old bootloader had no one-shot (Limine on # On bootloaders with no one-shot (Limine on terra), scripts/deploy
# terra), scripts/deploy got us here via a temporary UEFI # got here via a temporary UEFI entry + BootNext (arm_efi_bootnext);
# entry + BootNext (arm_efi_bootnext). BootNext is already # BootNext is spent but the entry would linger pointing at a
# spent, but the entry itself would linger in NVRAM pointing # partition disko is about to wipe, so remove it now.
# at a partition disko is about to reformat. Drop it now, so
# even an install that fails later leaves NVRAM clean.
for n in $(efibootmgr 2>/dev/null \ for n in $(efibootmgr 2>/dev/null \
| sed -n 's/^Boot\([0-9A-Fa-f]\{4\}\)\*\?[[:space:]]Homelab Installer[[:space:]].*/\1/p'); do | sed -n 's/^Boot\([0-9A-Fa-f]\{4\}\)\*\?[[:space:]]Homelab Installer[[:space:]].*/\1/p'); do
echo "removing temporary UEFI entry Boot$n" echo "removing temporary UEFI entry Boot$n"
@@ -407,20 +421,13 @@
}; };
}; };
# VM test for `./scripts/deploy kexec-local`. Run: # VM test for `./scripts/deploy kexec-local` (nix build .#checks.x86_64-linux.kexec-local -L)
# nix build .#checks.x86_64-linux.kexec-local -L # — the one command that can't be rehearsed on real hardware since it jumps
# # the machine you're on. Regression-tests kexec-run.sh's backgrounded
# Worth having because kexec-local is the one command that cannot be # `sleep 6 && kexec -e`: cleaning up the staging dir on exit would delete
# rehearsed on real hardware: it jumps the machine you are typing at, and # the jump binary and the box would silently stay on the old kernel.
# a failure looks exactly like a slow boot. It regression-tests the checks.${system} = {
# subtle one — kexec-run.sh backgrounds `sleep 6 && kexec -e` and returns, kexec-local =
# so anything that cleans up the staging dir on exit deletes the binary
# that performs the jump and the box silently never leaves the old kernel.
#
# After the jump the test driver's backdoor is gone with the old kernel,
# so the installer is driven over a forwarded ssh port instead (the same
# approach nixos-images uses in its own kexec test).
checks.${system}.kexec-local =
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
tarball = self.nixosConfigurations.kexec.config.system.build.kexecInstallerTarball; tarball = self.nixosConfigurations.kexec.config.system.build.kexecInstallerTarball;
@@ -476,9 +483,9 @@
machine.succeed("install -Dm755 /etc/deploy /root/deploy") machine.succeed("install -Dm755 /etc/deploy /root/deploy")
# systemd-run starts units with a bare PATH that lacks # systemd-run starts units with a bare PATH lacking
# /run/current-system/sw/bin, so `#!/usr/bin/env bash` cannot even # /run/current-system/sw/bin, so bash (and tar/findmnt/nohup)
# resolve bash, let alone tar/findmnt/nohup. Set it explicitly. # can't resolve — set it explicitly.
env = ( env = (
" --setenv=PATH=/run/wrappers/bin:/run/current-system/sw/bin" " --setenv=PATH=/run/wrappers/bin:/run/current-system/sw/bin"
" --setenv=HOMELAB_KEXEC_TARBALL=${tarball}/nixos-kexec-installer-${system}.tar.gz" " --setenv=HOMELAB_KEXEC_TARBALL=${tarball}/nixos-kexec-installer-${system}.tar.gz"
@@ -500,9 +507,9 @@
while ssh(["true"], check=False).returncode != 0: while ssh(["true"], check=False).returncode != 0:
time.sleep(1) time.sleep(1)
# Refuses without --yes when stdin is not a tty (read gets EOF). # Refuses without --yes when stdin isn't a tty; needs the same env to
# Must reach the confirmation prompt, so it needs the same env — # reach the confirmation prompt, else it dies early on the nix build
# otherwise it just dies early on the nix build and proves nothing. # and proves nothing.
out = machine.fail(f"{envsh} /root/deploy kexec-local </dev/null 2>&1") out = machine.fail(f"{envsh} /root/deploy kexec-local </dev/null 2>&1")
assert "using prebuilt kexec installer" in out, \ assert "using prebuilt kexec installer" in out, \
f"never reached the prompt, so the refusal proves nothing:\n{out}" f"never reached the prompt, so the refusal proves nothing:\n{out}"
@@ -552,5 +559,171 @@
machine.crash() machine.crash()
''; '';
}; };
# VM test for hosts/mars/luna-sites.nix (header of luna-sites-test.nix):
# nix build .#checks.x86_64-linux.luna-sites -L
luna-sites = import ./hosts/mars/luna-sites-test.nix {
pkgs = nixpkgs.legacyPackages.${system};
};
# VM test for services/identity/pass-broker.nix, with fake pass-cli
# and Telegram: nix build .#checks.x86_64-linux.pass-broker -L
pass-broker = import ./services/identity/pass-broker-test.nix {
pkgs = nixpkgs.legacyPackages.${system};
};
# Two-node test of the approval gateway (mars) with a broker using it:
# nix build .#checks.x86_64-linux.pass-broker-gateway -L
pass-broker-gateway = import ./services/identity/pass-broker-gateway-test.nix {
pkgs = nixpkgs.legacyPackages.${system};
};
# terra's VPN-confined qBittorrent against a fake Proton peer:
# nix build .#checks.x86_64-linux.qbittorrent-vpn -L
qbittorrent-vpn = import ./services/desktop/qbittorrent-vpn-test.nix {
pkgs = nixpkgs.legacyPackages.${system};
};
# Synapse + MAS on jupiter behind neptun's caddy vhosts:
# nix build .#checks.x86_64-linux.matrix -L
matrix = import ./services/comms/matrix-test.nix {
pkgs = nixpkgs.legacyPackages.${system};
};
};
# `nix develop` — hot-reload loop for dotfiles/quickshell.
#
# home/desktop/default.nix ships the shell as a store copy (`xdg.configFile`),
# which only hot-reloads its own frozen files; pointing at the working
# tree with `qs -p` restores edit-save-see without a rebuild.
#
# quickshell keys instance identity on the config path, so the
# working-tree and store-backed shells are different instances that
# would both claim every output — hence a swap, not a second instance.
# The swap starts dev first and only kills the packaged shell once dev
# is confirmed up, so a QML error leaves you on your normal bar.
#
# Every kill is scoped to one config (`qs kill` = default, `qs kill -p
# <path>` = that path) since a blanket kill would also take out
# unrelated instances like pkgs/rishot.nix.
#
# Deliberately not wired to direnv: programs.direnv is enabled for this
# user, so a `use flake` would swap the desktop shell on every `cd`
# into the checkout, including over ssh.
devShells.${system}.default =
let
pkgs = nixpkgs.legacyPackages.${system};
# Same nixpkgs terra's home.nix takes pkgs.quickshell from, so the dev
# instance is the identical build to the packaged one.
qs = "${nixpkgs.legacyPackages.${system}.quickshell}/bin/qs";
git = "${nixpkgs.legacyPackages.${system}.git}/bin/git";
grep = "${nixpkgs.legacyPackages.${system}.gnugrep}/bin/grep";
# Resolved at RUN time, not build time: the entire point is to run the
# working tree, and `self` here is only a store snapshot of it.
preamble = ''
root="$(${git} rev-parse --show-toplevel 2>/dev/null || pwd)"
cfg="$root/dotfiles/quickshell"
if [ ! -f "$cfg/shell.qml" ]; then
echo "no shell.qml under $cfg — run this from the homelab checkout" >&2
exit 1
fi
# `qs list` exits 0 whether or not it found anything, and only emits
# json when it did — so "json came back" is the liveness test.
running() { ${qs} list -p "$1" -j 2>/dev/null | grep -q '"id"'; }
prod_running() { ${qs} list -j 2>/dev/null | grep -q '"id"'; }
'';
qs-dev = pkgs.writeShellScriptBin "qs-dev" ''
set -uo pipefail
${preamble}
if [ -z "''${WAYLAND_DISPLAY:-}" ]; then
echo "qs-dev: no WAYLAND_DISPLAY — refusing to swap the desktop shell" >&2
exit 1
fi
if running "$cfg"; then
echo "qs-dev: already running from $cfg"
exit 0
fi
${qs} -d -p "$cfg"
# Confirm it came up before touching the packaged shell.
for _ in $(seq 1 50); do
running "$cfg" && break
sleep 0.1
done
if ! running "$cfg"; then
echo "qs-dev: dev shell failed to start — packaged shell left alone" >&2
echo "qs-dev: run 'qs -p $cfg' in the foreground to see the QML error" >&2
exit 1
fi
${qs} kill || true
echo "qs-dev: live on $cfg — edits there now hot-reload"
'';
# qs log -f prints everything the instance logs; WARN/ERROR are what
# mean something is actually wrong with the QML (a binding loop or
# failed binding is a WARN, easy to miss in the reload chatter).
qs-log = pkgs.writeShellScriptBin "qs-log" ''
set -uo pipefail
${preamble}
filter='WARN|ERROR'
case "''${1:-}" in
-a|--all) filter='.' ;;
esac
# -t 1: `qs log -f` otherwise replays the whole backlog on shell entry.
# It also ends when the attached instance exits, and the dev shell
# outlives individual instances (a QML error kills one, qs-dev starts
# another) — so re-attach in a loop instead of going quiet for the session.
while :; do
if running "$cfg"; then
${qs} log -p "$cfg" -t 1 -f 2>/dev/null | ${grep} --line-buffered -E "$filter" >&2
fi
sleep 1
done
'';
qs-prod = pkgs.writeShellScriptBin "qs-prod" ''
set -uo pipefail
${preamble}
running "$cfg" && ${qs} kill -p "$cfg" || true
prod_running || ${qs} -d
echo "qs-prod: back on ~/.config/quickshell"
'';
in
pkgs.mkShell {
packages = [ pkgs.quickshell qs-dev qs-prod qs-log ];
# Swap on entry, swap back on exit. Three guards:
# - interactive only ($- has i). `nix develop --command X` EXECs X,
# replacing the shell that set the trap, so the restore would
# never run and you'd be left on the dev instance. Non-interactive
# use gets the explicit `nix develop -c qs-dev` instead.
# - WAYLAND_DISPLAY, so entering the shell over ssh cannot kill the
# desktop's bar and leave nothing in its place.
# - a sentinel, so a nested `nix develop` does not swap (and then
# restore) a second time.
shellHook = ''
if [[ $- == *i* ]] && [ -n "''${WAYLAND_DISPLAY:-}" ] && [ -z "''${HOMELAB_QS_DEV:-}" ]; then
export HOMELAB_QS_DEV=1
if qs-dev; then
# Stream the dev instance's warnings and errors into this
# terminal, and take the follower down with the shell.
qs-log & HOMELAB_QS_LOG=$!
trap 'kill "$HOMELAB_QS_LOG" 2>/dev/null; qs-prod' EXIT
fi
fi
echo "homelab devshell — qs-dev (working tree) / qs-prod (packaged); exit restores"
echo "homelab devshell — quickshell WARN/ERROR stream here; qs-log -a for everything"
'';
};
}; };
} }
+6 -7
View File
@@ -1,17 +1,16 @@
# Shared home-manager profile for darman, applied on every host via # Shared home-manager profile for darman, applied on every host via
# common.nix. Host-specific extras (terra's desktop/dev tooling) layer on # common.nix. Workstation extras (terra, titan: home/desktop) layer on
# top via their own home-manager.users.darman.imports entry, same pattern # top via their own home-manager.users.darman.imports entry, same pattern
# used here — see hosts/terra/configuration.nix + hosts/terra/home.nix. # used here — see profiles/workstation.nix + home/desktop/default.nix.
{ ... }: { ... }:
{ {
home.stateVersion = "26.05"; home.stateVersion = "26.05";
programs.home-manager.enable = true; programs.home-manager.enable = true;
# Matches terra's baseline (compinit, deduped/shared history, HISTFILE # Matches terra's baseline (compinit, deduped/shared history, HISTFILE
# under $HOME). home-manager owns ~/.zshrc + ~/.zshenv as real files, which # under $HOME). home-manager owning ~/.zshrc + ~/.zshenv as real files also
# also means zsh's built-in zsh-newuser-install wizard never fires on # means zsh's newuser-install wizard never fires (it only triggers when
# first interactive login (it only triggers when none of # none of those dotfiles exist) — previously an issue on every host except
# .zshenv/.zprofile/.zshrc/.zlogin exist) — that used to happen on every # terra.
# host except terra.
programs.zsh.enable = true; programs.zsh.enable = true;
} }
+177
View File
@@ -0,0 +1,177 @@
{ pkgs, unstable, inputs, ... }:
let
tome = pkgs.callPackage ../../pkgs/tome.nix { src = inputs.tome; };
claude-usage = pkgs.callPackage ../../pkgs/claude-usage.nix { };
# SUDO_ASKPASS helper: shows sudo's password prompt in quickshell
# (HyprChrome/Widgets/Askpass) instead of the terminal. sudo doesn't speak
# polkit (setuid + PAM reading the tty), so this reuses the polkit dialog's
# look via the askpass mechanism instead — `run0` is the actual polkit-native
# alternative.
#
# Must be a package, not a dotfiles file: SUDO_ASKPASS needs an executable,
# and xdg.configFile copies keep store-copy permissions.
#
# The secret returns over a 0600 fifo (never argv/env, so not visible in
# /proc); cancelling closes the fifo unwritten so sudo aborts cleanly.
qs-askpass = pkgs.writeShellApplication {
name = "qs-askpass";
runtimeInputs = [ pkgs.quickshell pkgs.coreutils ];
text = ''
runtime="''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
fifo="$(mktemp -u "$runtime/qs-askpass.XXXXXXXX")"
mkfifo -m 600 "$fifo"
trap 'rm -f "$fifo"' EXIT
# Returns immediately; the dialog is asynchronous and we block on the
# fifo, not on the IPC call.
if ! qs ipc call askpass prompt "''${1:-Password:}" "$fifo" >/dev/null 2>&1; then
echo "qs-askpass: quickshell is not running or has no askpass handler" >&2
exit 1
fi
# Bounded, so a prompt nobody answers fails instead of wedging sudo for
# good. On timeout take the dialog down too, or it would sit there with
# nothing listening.
if ! secret="$(timeout 120 cat "$fifo")"; then
qs ipc call askpass cancel >/dev/null 2>&1 || true
echo "qs-askpass: timed out waiting for the prompt" >&2
exit 1
fi
[ -n "$secret" ] || exit 1
printf '%s\n' "$secret"
'';
};
in
{
# Desktop profile shared by terra and titan (profiles/workstation.nix).
# home.stateVersion, programs.home-manager.enable, programs.zsh.enable all
# come from home/common.nix (every host).
imports = [ ./options.nix ./hyprland.nix ./theme.nix ];
home.keyboard.layout = "de";
programs.git = {
enable = true;
settings = {
user.name = "Erik Simon";
user.email = "mail@erik-s.dev";
init.defaultBranch = "master";
};
};
# At home, ssh to gitea goes straight to jupiter instead of out to neptun and
# back over the tailnet; away, the probe fails and the public route applies.
# The alias matches the existing known_hosts entry (same gitea host key).
# LFS rides the same connection via LFS_ALLOW_PURE_SSH (services/dev/gitea.nix).
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks.gitea-lan = {
match = ''host git.mgaction.town exec "${pkgs.netcat}/bin/nc -z -w1 10.0.0.20 2222"'';
hostname = "10.0.0.20";
extraOptions.HostKeyAlias = "[git.mgaction.town]:2222";
};
};
# direnv + nix-direnv: lets per-repo devShells (e.g. /mnt/hdd_01/dev/repos/Tome's
# flake.nix) auto-load in the shell AND in Rider via its "direnv
# integration" plugin, instead of every dev repo needing its own
# jetbrains-toolbox SDK wiring by hand.
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
# Only active under `mangohud %command%`; logs every frame from launch.
programs.mangohud = {
enable = true;
settings = {
output_folder = "/home/darman/mangologs";
log_interval = 0;
autostart_log = 1;
};
};
# Rootless podman runs containers as darman; compose v2 talks to a socket
# rather than the docker CLI shim, so point it at the user podman socket
# instead of the root one.
home.sessionVariables.DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock";
# Only sets WHICH helper sudo uses; it still only calls it when asked with
# `sudo -A` (or when there is no tty at all). Plain `sudo` keeps prompting on
# the terminal, deliberately: aliasing it wholesale would break every sudo in
# a TTY or over ssh, where there is no shell to draw the dialog.
home.sessionVariables.SUDO_ASKPASS = "${qs-askpass}/bin/qs-askpass";
xdg.userDirs = {
enable = true;
};
xdg.mime.enable = true;
xdg.configFile."quickshell".source = ../../dotfiles/quickshell;
xdg.configFile."scripts".source = ../../dotfiles/scripts;
home.packages = [
(pkgs.writeTextDir "share/mime/packages/application-x-ms-sln.xml"
(builtins.readFile ../../dotfiles/mime/application-x-ms-sln.xml))
unstable.claude-code
pkgs.opencode
pkgs.quickshell
qs-askpass
claude-usage
pkgs.github-cli
pkgs.tea
pkgs.docker-compose
pkgs.hyprcursor
pkgs.papirus-icon-theme
tome
];
xdg.desktopEntries.btop = {
name = "btop++";
genericName = "System Monitor";
exec = "btop";
icon = "btop";
terminal = true;
categories = [ "System" "Monitor" ];
noDisplay = true;
};
programs.alacritty = {
enable = true;
settings = {
env.SHELL = "${pkgs.zsh}/bin/zsh";
terminal.shell = {
program = "${pkgs.zsh}/bin/zsh";
args = [ "-l" ];
};
window = {
padding = { x = 10; y = 10; };
opacity = 0.8;
};
font.normal = {
family = "DepartureMono Nerd Font";
style = "Regular";
};
colors.primary = {
background = "#0F1012";
foreground = "#ffd369";
};
# hints.enabled = [
# {
# hyperlinks = true;
# regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\\u0000-\\u001F\\u007F-\\u009F<>\"\\s{-}\\^⟨⟩`]+";
# command = "xdg-open";
# mouse.enabled = true;
# }
# ];
keyboard.bindings = [
# ESC + CR: nix has no literal escape for the ESC control char, so
# fromJSON decodes it from the JSON unicode escape below.
{ key = "Return"; mods = "Shift"; chars = builtins.fromJSON ''"\u001B\r"''; }
];
};
};
}
@@ -1,42 +1,14 @@
{ lib, pkgs, config, inputs, ... }: { lib, pkgs, config, osConfig, inputs, ... }:
# Hyprland config migrated from github.com/darman96/hyprland-dotfiles (the
# hyprlang `hypr/*.conf` files) into the home-manager lua-style `settings`
# (configType defaults to "lua" on stateVersion 26.05). Each top-level
# `settings` attr becomes an `hl.<name>(...)` call in ~/.config/hypr/hyprland.lua;
# `_args` lists become multi-arg calls, `_var` locals become `local x = ...`, and
# `lib.generators.mkLuaInline` values render as raw Lua expressions.
#
# Imported by home.nix. System-level Hyprland enable (session entry, portals)
# lives in ../../services/desktop/desktop-hyprland.nix; this manages the user's
# own hyprland.lua.
#
# Deliberately NOT migrated:
# - hyprbars.conf: config for the third-party `hyprbevelbars` plugin, which
# isn't packaged in nixpkgs. Load it via
# `wayland.windowManager.hyprland.plugins` and re-add its config once
# available. (hyprredsquare.conf's plugin was renamed hypr-chrome and
# rewritten since - it's wired in below via the `hypr-chrome` flake
# input instead, with its own `plugin.hyprchrome` config.)
# - hyprqt6engine.conf + `QT_QPA_PLATFORMTHEME=hyprqt6engine`: terra themes Qt
# through qtct/Dracula in home.nix, so that env var is left off to avoid a conflict.
# - hyprlock.conf: a separate program (use `programs.hyprlock` if wanted).
# - the duplicate pamixer/amixer + `.wob` volume binds: kept only the clean
# pipewire `wpctl`/`playerctl` set (no wob overlay is configured here).
# - `XDG_MENU_PREFIX=arch-` and `VCPKG_ROOT`: Arch-/user-specific.
# Many binds reference apps/scripts not packaged on terra yet (vivaldi-stable,
# dolphin, vicinae, grimblast, waypaper, discord, gitkraken, qbz,
# ~/.config/scripts/start-communications.sh); add them separately.
let let
lua = lib.generators.mkLuaInline; lua = lib.generators.mkLuaInline;
cfg = config.homelab.desktop;
# Wallpaper images aren't checked into this repo (binary blobs) — pulled # Cursor theme+size live in home.pointerCursor (theme.nix) so the name is
# from the existing Wallhaven library on /mnt/hdd_01 instead. Picked once # in one place; hyprland.lua is what actually gets them into the graphical
# here rather than at runtime, since hyprpaper has no built-in "random" # session's environment (hm-session-vars.sh is only sourced by login shells).
# mode; re-pick and rebuild (or swap in real per-monitor selection) when cursorName = config.home.pointerCursor.name;
# this stops being a placeholder. cursorSize = toString config.home.pointerCursor.size;
wallpaper = "/mnt/hdd_01/data/Pictures/Wallhaven/wallhaven-4yjyd4.png";
# Dispatchers → the new hl.dsp.* API (signatures verified against hyprland # Dispatchers → the new hl.dsp.* API (signatures verified against hyprland
# 0.55's src/config/lua/bindings/LuaBindingsDispatchers.cpp). # 0.55's src/config/lua/bindings/LuaBindingsDispatchers.cpp).
@@ -66,6 +38,10 @@ let
bindo = keys: dispatcher: opts: { _args = [ keys dispatcher opts ]; }; bindo = keys: dispatcher: opts: { _args = [ keys dispatcher opts ]; };
# SUPER + 1..9 → workspaces 1..9, SUPER + 0 → workspace 10. # SUPER + 1..9 → workspaces 1..9, SUPER + 0 → workspace 10.
# HyprChrome lock screen (dotfiles/quickshell/lock.qml); -n so a second
# lock request is a no-op.
lockCmd = "${lib.getExe pkgs.quickshell} -n -p ${config.xdg.configHome}/quickshell/lock.qml";
wsKeys = [ wsKeys = [
{ k = "1"; n = 1; } { k = "2"; n = 2; } { k = "3"; n = 3; } { k = "1"; n = 1; } { k = "2"; n = 2; } { k = "3"; n = 3; }
{ k = "4"; n = 4; } { k = "5"; n = 5; } { k = "6"; n = 6; } { k = "4"; n = 4; } { k = "5"; n = 5; } { k = "6"; n = 6; }
@@ -74,35 +50,39 @@ let
]; ];
in in
{ {
services.hyprpaper = { services.hyprpaper = lib.mkIf (cfg.wallpaper != null) {
enable = true; enable = true;
settings = { settings = {
ipc = "on"; ipc = "on";
splash = false; splash = false;
preload = [ wallpaper ]; preload = [ cfg.wallpaper ];
wallpaper = [ wallpaper = map (m: { monitor = m.output; path = cfg.wallpaper; }) cfg.monitors;
{ monitor = "DP-2"; path = wallpaper; } };
{ monitor = "HDMI-A-1"; path = wallpaper; } };
];
# Turns `loginctl lock-session` (SUPER+L, and logind before suspend) into the lock.
services.hypridle = {
enable = true;
settings.general = {
lock_cmd = lockCmd;
before_sleep_cmd = "loginctl lock-session";
}; };
}; };
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
plugins = [ inputs.hypr-chrome.packages.${pkgs.stdenv.hostPlatform.system}.default ]; # Unloaded for now; re-add together with the plugin.hyprchrome settings below.
# plugins = [ inputs.hypr-chrome.packages.${pkgs.stdenv.hostPlatform.system}.default ];
settings = { settings = {
# ---- colours (from colors.conf) ---- # ---- colours (from colors.conf) ----
fg_color = { _var = "rgba(eeeeeeff)"; }; fg_color = { _var = "rgba(eeeeeeff)"; };
fg_accent = { _var = "rgba(ffd063ff)"; }; fg_accent = { _var = "rgba(e8722aff)"; };
fg_accent_alt = { _var = "rgba(ff9d42ff)"; }; fg_accent_alt = { _var = "rgba(ff9d42ff)"; };
bg_color = { _var = "rgba(0f1012ff)"; }; bg_color = { _var = "rgba(0f1012ff)"; };
bg_accent = { _var = "rgba(963c38ff)"; }; bg_accent = { _var = "rgba(963c38ff)"; };
# ---- monitors ---- # ---- monitors ----
monitor = [ monitor = cfg.monitors;
{ output = "DP-2"; mode = "2560x1440@144"; position = "1920x0"; scale = 1; }
{ output = "HDMI-A-1"; mode = "1920x1080@60"; position = "0x360"; scale = 1; }
];
# ---- variables (general/decoration/input/misc/...) ---- # ---- variables (general/decoration/input/misc/...) ----
config = { config = {
@@ -116,7 +96,7 @@ in
debug.disable_logs = false; debug.disable_logs = false;
general = { general = {
border_size = 0; border_size = 1;
col = { col = {
inactive_border = lua "bg_accent"; inactive_border = lua "bg_accent";
active_border = { active_border = {
@@ -131,7 +111,8 @@ in
decoration = { decoration = {
dim_special = 0.3; dim_special = 0.3;
rounding = 10; rounding = 25;
rounding_power = 1.0;
blur = { blur = {
enabled = true; enabled = true;
special = true; # blur behind the special workspace special = true; # blur behind the special workspace
@@ -150,6 +131,9 @@ in
close_special_on_empty = true; close_special_on_empty = true;
disable_hyprland_logo = true; disable_hyprland_logo = true;
disable_splash_rendering = true; disable_splash_rendering = true;
# Lets a crashed lock be retaken by relaunching it instead of
# leaving the "lock app died" screen up.
allow_session_lock_restore = true;
}; };
binds = { binds = {
@@ -158,16 +142,18 @@ in
allow_workspace_cycles = true; allow_workspace_cycles = true;
}; };
plugin.hyprchrome = { # Unloaded for now — Hyprland rejects plugin config for a plugin that is
enabled = true; # not loaded, so this stays commented until it goes back in `plugins` above.
glow_size = 12; # plugin.hyprchrome = {
glow_strength = 0.85; # enabled = true;
shadow_size = 24; # glow_size = 12;
shadow_color = lua "bg_color"; # glow_strength = 0.85;
shadow_offset = lua "{ 4, 8 }"; # shadow_size = 24;
outline_size = lua "2"; # shadow_color = lua "bg_color";
outline_color = lua "fg_color"; # shadow_offset = lua "{ 4, 8 }";
}; # outline_size = lua "2";
# outline_color = lua "fg_color";
# };
}; };
# ---- animations ---- # ---- animations ----
@@ -178,10 +164,10 @@ in
# ---- environment (environment.conf) ---- # ---- environment (environment.conf) ----
env = [ env = [
{ _args = [ "HYPRCURSOR_THEME" "Bibata-Modern-Classic" ]; } { _args = [ "HYPRCURSOR_THEME" cursorName ]; }
{ _args = [ "HYPRCURSOR_SIZE" "24" ]; } { _args = [ "HYPRCURSOR_SIZE" cursorSize ]; }
{ _args = [ "XCURSOR_THEME" "Bibata-Modern-Classic" ]; } { _args = [ "XCURSOR_THEME" cursorName ]; }
{ _args = [ "XCURSOR_SIZE" "24" ]; } { _args = [ "XCURSOR_SIZE" cursorSize ]; }
{ _args = [ "GDK_BACKEND" "wayland,x11" ]; } { _args = [ "GDK_BACKEND" "wayland,x11" ]; }
{ _args = [ "SDL_VIDEODRIVER" "wayland" ]; } { _args = [ "SDL_VIDEODRIVER" "wayland" ]; }
{ _args = [ "CLUTTER_BACKEND" "wayland" ]; } { _args = [ "CLUTTER_BACKEND" "wayland" ]; }
@@ -189,6 +175,9 @@ in
{ _args = [ "XDG_SESSION_DESKTOP" "Hyprland" ]; } { _args = [ "XDG_SESSION_DESKTOP" "Hyprland" ]; }
{ _args = [ "XDG_SESSION_TYPE" "wayland" ]; } { _args = [ "XDG_SESSION_TYPE" "wayland" ]; }
{ _args = [ "QT_QPA_PLATFORMTHEME" "qt6ct" ]; } { _args = [ "QT_QPA_PLATFORMTHEME" "qt6ct" ]; }
# Read by the quickshell bar/OSD/debug stage to pick their monitor.
{ _args = [ "QS_PRIMARY_OUTPUT" cfg.primaryOutput ]; }
{ _args = [ "QS_SECONDARY_OUTPUT" cfg.secondaryOutput ]; }
]; ];
# ---- keybinds (keybinds.conf) ---- # ---- keybinds (keybinds.conf) ----
@@ -198,22 +187,38 @@ in
# quickshell app-launcher variants (evaluating — pick one) # quickshell app-launcher variants (evaluating — pick one)
] ]
++ (map (n: bind "SUPER + CTRL + ${toString n}" (dsp.global "quickshell:launcher${toString n}")) (lib.range 1 7)) ++ (map (n: bind "SUPER + CTRL + ${toString n}" (dsp.global "quickshell:launcher${toString n}")) (lib.range 1 9))
++ [ ++ [
# variant 10 (CTRL+0 is already the quickshell restart binding below)
(bind "SUPER + CTRL + SHIFT + 0" (dsp.global "quickshell:launcher10"))
# variant 11 cyber dock
(bind "SUPER + CTRL + SHIFT + D" (dsp.global "quickshell:launcher11"))
# restart quickshell (also starts it if not running) # restart quickshell (also starts it if not running)
(bind "SUPER + CTRL + 0" (dsp.exec "qs kill; sleep 0.3; qs")) (bind "SUPER + CTRL + 0" (dsp.exec "qs kill; sleep 0.3; qs"))
# toggle the Slant sidebar # toggle the Slant sidebar
(bind "SUPER + CTRL + S" (dsp.global "quickshell:sidebar")) (bind "SUPER + CTRL + S" (dsp.global "quickshell:sidebar"))
# toggle the host vitals HUD # toggle the host vitals HUD
(bind "SUPER + CTRL + V" (dsp.global "quickshell:vitals")) (bind "SUPER + CTRL + V" (dsp.global "quickshell:vitals"))
# toggle the debug widget stage (centred on the secondary monitor)
(bind "SUPER + CTRL + D" (dsp.global "quickshell:debug"))
# expand / collapse the hyprchrome bar as a whole
(bind "SUPER + A" (dsp.global "quickshell:chrome"))
]
# mute / unmute your mic for luna (services/desktop/luna-voice.nix);
# never cuts off a reply she is already giving.
# Runs the CLI rather than a quickshell GlobalShortcut so the mic can
# still be switched off while the shell is reloading.
++ lib.optional (osConfig.homelab.lunaVoice.enable or false)
(bind "SUPER + V" (dsp.exec "luna-voice toggle"))
++ [
(bind "SUPER + B" (dsp.exec "vivaldi")) (bind "SUPER + B" (dsp.exec "vivaldi"))
(bind "SUPER + E" (dsp.exec "cosmic-files")) (bind "SUPER + E" (dsp.exec cfg.fileManager))
(bind "SUPER + SHIFT + G" (dsp.workspaceRef "game")) (bind "SUPER + SHIFT + G" (dsp.workspaceRef "game"))
(bind "SUPER + S" (dsp.exec "grim -o DP-2 ~/screenshot.png")) (bind "SUPER + S" (dsp.exec "grim -o ${cfg.primaryOutput} ~/screenshot.png"))
(bind "SUPER + SHIFT + S" (dsp.exec "grimblast copy area --freeze")) (bind "SUPER + SHIFT + S" (dsp.exec "grimblast copy area --freeze"))
(bind "Print" (dsp.exec "rishot")) (bind "Print" (dsp.exec "rishot"))
(bind "SUPER + L" (dsp.exec "hyprlock")) (bind "SUPER + L" (dsp.exec "loginctl lock-session"))
(bind "SUPER + W" (dsp.exec "waypaper --random")) (bind "SUPER + W" (dsp.exec "waypaper --random"))
# window management # window management
@@ -249,7 +254,7 @@ in
(bind "SUPER + T" (dsp.togglespecial "terminal")) (bind "SUPER + T" (dsp.togglespecial "terminal"))
(bind "SUPER + C" (dsp.togglespecial "communications")) (bind "SUPER + C" (dsp.togglespecial "communications"))
(bind "SUPER + M" (dsp.togglespecial "music")) (bind "SUPER + M" (dsp.togglespecial "music"))
(bind "SUPER + V" (dsp.togglespecial "version_control")) # (bind "SUPER + V" (dsp.togglespecial "version_control"))
# cycle workspaces # cycle workspaces
(bind "SUPER + ALT + up" (dsp.workspaceRef "e+1")) (bind "SUPER + ALT + up" (dsp.workspaceRef "e+1"))
@@ -274,10 +279,12 @@ in
# ---- window rules (windowrules.conf) ---- # ---- window rules (windowrules.conf) ----
window_rule = [ window_rule = [
{ name = "games"; match.class = "gamescope"; workspace = "name:game"; opacity = "1 1 override"; } { name = "games"; match.class = "gamescope"; workspace = "name:game"; opacity = "1 1 override"; }
# wine's wayland driver sets the class to the lowercased exe name
{ name = "star-citizen"; match.class = "starcitizen[.]exe"; workspace = "name:game"; opacity = "1 1 override"; }
{ name = "vivaldi"; match.title = "(.*)(- YouTube - Vivaldi)"; opacity = "1 1 override"; } { name = "vivaldi"; match.title = "(.*)(- YouTube - Vivaldi)"; opacity = "1 1 override"; }
{ name = "jetbrains"; match.class = "(jetbrains-)(.*)"; no_initial_focus = true; float = true; center = true; } { name = "jetbrains"; match.class = "(jetbrains-)(.*)"; no_initial_focus = true; float = true; center = true; }
{ name = "jetbrains-toolbox"; match.class = "jetbrains-toolbox"; move = "1933 21"; } { name = "jetbrains-toolbox"; match.class = "jetbrains-toolbox"; move = "1933 21"; }
{ name = "comms"; match.class = "discord|org.telegram.desktop"; workspace = "special:communications"; } { name = "comms"; match.class = "discord|org.telegram.desktop|teamspeak-client"; workspace = "special:communications"; }
{ name = "music"; match.class = "qbz"; workspace = "special:music"; } { name = "music"; match.class = "qbz"; workspace = "special:music"; }
{ name = "vicinae"; match.class = "vicinae"; stay_focused = true; } { name = "vicinae"; match.class = "vicinae"; stay_focused = true; }
{ name = "gitkraken"; match.class = "gitkraken"; workspace = "special:version_control"; } { name = "gitkraken"; match.class = "gitkraken"; workspace = "special:version_control"; }
@@ -285,7 +292,7 @@ in
# ---- workspace rules (workspacerules.conf) ---- # ---- workspace rules (workspacerules.conf) ----
workspace_rule = [ workspace_rule = [
{ workspace = "name:game"; monitor = "DP-2"; decorate = false; } { workspace = "name:game"; monitor = cfg.primaryOutput; decorate = false; }
{ workspace = "special:terminal"; on_created_empty = "alacritty"; gaps_out = 256; } { workspace = "special:terminal"; on_created_empty = "alacritty"; gaps_out = 256; }
{ workspace = "special:communications"; on_created_empty = "${config.home.homeDirectory}/.config/scripts/start-communications.sh"; gaps_out = 128; } { workspace = "special:communications"; on_created_empty = "${config.home.homeDirectory}/.config/scripts/start-communications.sh"; gaps_out = 128; }
{ workspace = "special:music"; on_created_empty = "com.blitzfc.qbz"; gaps_out = 128; } { workspace = "special:music"; on_created_empty = "com.blitzfc.qbz"; gaps_out = 128; }
@@ -298,7 +305,8 @@ in
"hyprland.start" "hyprland.start"
(lua '' (lua ''
function() function()
hl.exec_cmd("systemctl --user start hyprpolkitagent") -- No polkit agent started here: quickshell registers its own
-- (HyprChrome/Widgets/Polkit), and a session admits only one.
hl.exec_cmd("cosmic-settings-daemon") hl.exec_cmd("cosmic-settings-daemon")
hl.exec_cmd("quickshell") hl.exec_cmd("quickshell")
hl.exec_cmd("alacritty", { workspace = "special:terminal silent" }) hl.exec_cmd("alacritty", { workspace = "special:terminal silent" })
@@ -309,5 +317,8 @@ in
}; };
}; };
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-cosmic ]; # home-manager points the portal at ITS profile (NIX_XDG_DESKTOP_PORTAL_DIR),
# so backends must be listed here too, not only in desktop-hyprland.nix.
# gtk provides AppChooser, without which there is no OpenURI (xdg-open).
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-cosmic pkgs.xdg-desktop-portal-gtk ];
} }
+31
View File
@@ -0,0 +1,31 @@
{ lib, ... }:
# Per-host knobs for the shared desktop; set via
# home-manager.users.darman.homelab.desktop in hosts/<h>/configuration.nix.
{
options.homelab.desktop = {
monitors = lib.mkOption {
type = lib.types.listOf lib.types.attrs;
description = "hl.monitor() tables; the greeter reuses them.";
};
primaryOutput = lib.mkOption {
type = lib.types.str;
description = "Connector that gets the bar, OSDs, the game workspace and the greeter.";
};
secondaryOutput = lib.mkOption {
type = lib.types.str;
default = "";
description = "Connector for the debug widget stage; empty = last screen.";
};
fileManager = lib.mkOption {
type = lib.types.str;
default = "cosmic-files";
description = "Command SUPER+E runs.";
};
wallpaper = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "Image path for hyprpaper; null leaves hyprpaper off.";
};
};
}
+91
View File
@@ -0,0 +1,91 @@
{ pkgs, ... }:
# Global Dracula theming (GTK + Qt)
let
azureGlassyDarkIcons = pkgs.callPackage ../../pkgs/azure-glassy-dark-icons.nix { };
amyDarkIcons = pkgs.callPackage ../../pkgs/amy-dark-icons.nix { };
slotBeautyDarkIcons = pkgs.callPackage ../../pkgs/slot-beauty-dark-icons.nix { };
hyprchromeCursors = pkgs.callPackage ../../pkgs/hyprchrome-cursors.nix { };
# HyprChrome folders on top, Amy for everything else (Inherits=).
# "HyprChrome-Folders-Solid" is the same set in the solid finish.
baseIconTheme = "Amy-Dark-Icons";
baseIconThemePackage = amyDarkIcons;
iconTheme = "HyprChrome-Folders";
iconThemePackage = pkgs.callPackage ../../pkgs/hyprchrome-folders.nix {
baseTheme = baseIconTheme;
};
in
{
gtk = {
enable = true;
theme = {
name = "Dracula";
package = pkgs.dracula-theme;
};
iconTheme = {
name = iconTheme;
package = iconThemePackage;
};
};
# XCURSOR_THEME alone isn't enough for Steam: steamwebhelper runs inside a
# pressure-vessel container with its own /etc, so XCURSOR_PATH doesn't
# resolve there and it falls back to the core X11 cursor. $HOME and /nix are
# bind-mounted in though, so the ~/.icons symlink `dotIcons` drops still
# resolves — same fix as the flatpak workaround below.
home.pointerCursor = {
name = "HyprChrome";
package = hyprchromeCursors;
size = 36;
gtk.enable = true;
hyprcursor.enable = true;
};
# Flatpak apps can't see XDG_DATA_DIRS/nix-store theme paths, so the
# portal-reported theme names resolve to nothing and fall back to Adwaita;
# Flatpak auto-exposes ~/.themes and ~/.icons read-only as the workaround.
home.file.".themes/Dracula".source =
"${pkgs.dracula-theme}/share/themes/Dracula";
home.file.".icons/${iconTheme}".source =
"${iconThemePackage}/share/icons/${iconTheme}";
home.file.".icons/${baseIconTheme}".source =
"${baseIconThemePackage}/share/icons/${baseIconTheme}";
home.packages = [ baseIconThemePackage ];
dconf.settings."org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "Dracula";
icon-theme = iconTheme;
};
# "qtct" (qt5ct/qt6ct) instead of "kde" avoids pulling in
# kdePackages.systemsettings just for the platform-theme plugin — kvantum
# itself carries the Dracula colors, qt5ct/qt6ct just need to be told to
# use it as the style.
qt = {
enable = true;
platformTheme.name = "qtct";
style.name = "kvantum";
};
xdg.configFile."Kvantum/kvantum.kvconfig".text = ''
[General]
theme=Dracula
'';
xdg.configFile."Kvantum/Dracula".source =
"${pkgs.dracula-theme}/share/Kvantum/Dracula";
# Quickshell's IconImage/Quickshell.iconPath() resolves icons through the
# Qt platform theme, not GTK — so the app-launcher grid needs the icon
# theme set HERE (qt5ct/qt6ct), separately from the GTK dconf key above.
xdg.configFile."qt5ct/qt5ct.conf".text = ''
[Appearance]
style=kvantum
icon_theme=${iconTheme}
'';
xdg.configFile."qt6ct/qt6ct.conf".text = ''
[Appearance]
style=kvantum
icon_theme=${iconTheme}
'';
}
+61 -88
View File
@@ -14,6 +14,7 @@
../../services/network/caddy.nix ../../services/network/caddy.nix
../../services/vpn/tailscale.nix ../../services/vpn/tailscale.nix
../../services/monitoring/node-exporter.nix ../../services/monitoring/node-exporter.nix
../../services/monitoring/victoriametrics.nix
../../services/media/jellyfin.nix ../../services/media/jellyfin.nix
../../services/media/sabnzbd.nix ../../services/media/sabnzbd.nix
../../services/media/prowlarr.nix ../../services/media/prowlarr.nix
@@ -23,6 +24,9 @@
../../services/media/seerr.nix ../../services/media/seerr.nix
../../services/media/immich.nix ../../services/media/immich.nix
../../services/dev/gitea.nix ../../services/dev/gitea.nix
../../services/dev/gitea-mcp.nix
../../services/dev/obsidian-livesync.nix
../../services/comms/matrix.nix
]; ];
# sabnzbd's unrar dependency is unfree; scope the allowance to just that # sabnzbd's unrar dependency is unfree; scope the allowance to just that
@@ -38,16 +42,11 @@
# systemd-boot for UEFI. If ZimaBlade boots legacy/BIOS, switch to grub. # systemd-boot for UEFI. If ZimaBlade boots legacy/BIOS, switch to grub.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# common.nix's cap of 5 comes from this box's own 34-generation incident, # common.nix's default of 5 is still too many boot entries for a 29G eMMC — override down to 2.
# but at ~5G free on a 29G eMMC even 5 is too many — override down to 2.
boot.loader.systemd-boot.configurationLimit = lib.mkForce 2; boot.loader.systemd-boot.configurationLimit = lib.mkForce 2;
# A `switch` pins the old generation as a GC root until the box reboots onto # A `switch` pins the old generation as a GC root until reboot; common.nix's weekly
# the new one (booted-system vs current-system) — common.nix's nix.gc is # nix.gc is too slow for a 29G eMMC, so collect garbage on every boot instead.
# weekly, far too slow to catch that on a 29G eMMC. 2026-08-19: one switch
# alone took 14G -> 19G used; only reboot (releases the old root) + this GC
# brought it back to 14G. Run a full collect right after every boot instead
# of waiting on the weekly timer.
systemd.services.gc-on-boot = { systemd.services.gc-on-boot = {
description = "Full nix-collect-garbage on every boot"; description = "Full nix-collect-garbage on every boot";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@@ -67,47 +66,42 @@
# next value: acpi -> bios -> cold -> efi. # next value: acpi -> bios -> cold -> efi.
boot.kernelParams = [ "reboot=pci" ]; boot.kernelParams = [ "reboot=pci" ];
# ---- Closure size (29G eMMC holds two generations during a switch) ----
# Only the firmware this board loads (i915 DMC + r8169), not all ~850M of linux-firmware.
hardware.enableRedistributableFirmware = false;
hardware.cpu.intel.updateMicrocode = true;
hardware.firmware = [
(pkgs.runCommand "jupiter-firmware" { } ''
mkdir -p $out/lib/firmware/i915
cp -r ${pkgs.linux-firmware}/lib/firmware/rtl_nic $out/lib/firmware/
cp ${pkgs.linux-firmware}/lib/firmware/i915/bxt_* $out/lib/firmware/i915/
'')
];
# Pins a ~200M nixpkgs source; the box is only ever deployed to, never built on.
nixpkgs.flake.setFlakeRegistry = false;
nixpkgs.flake.setNixPath = false;
nix.settings.auto-optimise-store = true;
# ---- GPU (jellyfin hardware transcoding) ---- # ---- GPU (jellyfin hardware transcoding) ----
# Apollo Lake N3450 / HD Graphics 500 (Gen9, pci 8086:5A85). The i915 KERNEL # Apollo Lake N3450 / HD Graphics 500 (Gen9). VAAPI needs the iHD userspace driver
# driver binds on its own — /dev/dri/{card1,renderD128} exist without this — # (Gen9; i965 is Gen8-only) or jellyfin-ffmpeg exits 251 on every transcode with no
# but the libva USERSPACE driver only ships when hardware.graphics is on, and # clearer error than "FFmpeg exited with code 251" in the log. Pointed at directly
# nothing else here pulled it in. Without it VAAPI init fails with "unknown # instead of via hardware.graphics, which drags in mesa + llvm (~850M) for nothing.
# libva error" and jellyfin-ffmpeg exits 251 on EVERY transcode, which the systemd.services.jellyfin.environment = {
# client shows as generic playback failure: the server log only says "FFmpeg LIBVA_DRIVER_NAME = "iHD";
# exited with code 251", never that a driver is missing. Verified on the box: LIBVA_DRIVERS_PATH = "${pkgs.intel-media-driver}/lib/dri";
# the same h264_vaapi encode goes 251 -> 0 once iHD is on LIBVA_DRIVERS_PATH.
#
# iHD (intel-media-driver) is the right one for Gen9; i965 is for Gen8 and
# older. Note the render node is 0666 but card1 is 0660 root:video, so the
# group membership in services/media/jellyfin.nix matters for the card node.
hardware.graphics = {
enable = true;
extraPackages = [ pkgs.intel-media-driver ];
}; };
# ⚠️ This buys VAAPI only — jellyfin must be set to VAAPI, NOT QSV, in its # ⚠️ Use VAAPI, not QSV, in jellyfin's UI — QSV needs an MFX runtime not safely
# web UI (Dashboard -> Playback -> Transcoding). QSV needs an MFX runtime on # available for this Gen9 chip (only insecure/EOL options) and fails with exit 171.
# top of the libva driver: ffmpeg's `-init_hw_device qsv=qs@va` dies with # 4K HDR remuxes also can't be tone-mapped here (needs OpenCL or Gen11+); keep those
# "Error creating a MFX session: -9" -> exit 171, the SECOND failure hiding # as 1080p SDR or let them direct-play.
# behind the first (fixing the missing driver only moved 251 -> 171).
# There is no good way to provide it here: vpl-gpu-rt is Gen12+, and the
# Gen9 runtime `intel-media-sdk` is marked INSECURE in nixpkgs (EOL, 5 CVEs
# incl. local privilege escalation) — not worth it when VAAPI does the same
# job on this chip at ~3.5x realtime for 1080p->720p.
#
# Also: 4K HDR (the 2160p HEVC/DV remuxes) can NOT be tone-mapped here.
# tonemap_opencl needs OpenCL, which has no platform on this box, and
# tonemap_vaapi is Gen11+ — both fail. Only a plain scale_vaapi=format=nv12
# succeeds, which drops HDR without tone-mapping (washed-out picture).
# Those files need to direct-play, or be kept as 1080p SDR versions.
# ---- NAS data array ---- # ---- NAS data array ----
# Existing ext4 on the mdadm RAID0 over sda+sdb (md0, 29.1T). # Existing ext4 on mdadm RAID0 (sda+sdb, md0, 29.1T) — mounted, not formatted, kept
# Mounted, NOT formatted; kept out of disko so it is never wiped. # out of disko. ⚠️ RAID0 has no redundancy: either disk failing loses ALL data.
# ⚠️ RAID0 = no redundancy: either 16TB disk failing loses ALL data. boot.swraid.enable = true;
boot.swraid.enable = true; # assemble the mdadm array at boot # Silences the "mdmon service will crash" eval warning — mdmon never actually runs
# Silences "mdmon service will crash" eval warning. RAID0 here uses native # here (native superblocks, not external-metadata) but the module warns regardless.
# superblocks so mdmon (external-metadata arrays only) never actually runs,
# but the module warns unconditionally without SOME MAILADDR/PROGRAM set.
boot.swraid.mdadmConf = "MAILADDR root"; boot.swraid.mdadmConf = "MAILADDR root";
fileSystems."/mnt/data" = { fileSystems."/mnt/data" = {
# fs UUID (stable) — the array may enumerate as /dev/md127, so avoid /dev/md0. # fs UUID (stable) — the array may enumerate as /dev/md127, so avoid /dev/md0.
@@ -116,69 +110,48 @@
options = [ "nofail" ]; # don't block boot if the array is degraded/absent options = [ "nofail" ]; # don't block boot if the array is degraded/absent
}; };
# `nofail` above is necessary but NOT sufficient — any mount layered on the # `nofail` alone isn't enough — mounts layered on the array (the prowlarr bind)
# array (prowlarr/seerr binds) is RequiredBy local-fs.target and will fail it # are RequiredBy local-fs.target and can still trip Emergency Mode, which is a dead
# regardless, and emergency mode on this box is a dead end: root is locked, so # end here (root locked, no ssh). Boot as far as possible instead; the array-backed
# sulogin drops you at a prompt you cannot answer, with no ssh. 2026-08-06: a # services carry RequiresMountsFor=/mnt/data so they still won't write to the eMMC.
# drive that failed to enumerate after the rack move did exactly this —
# "Timed out waiting for device /dev/disk/by-uuid/dadbff6f-…" -> Dependency
# failed for Local File Systems -> Reached target Emergency Mode, twice.
# Boot as far as possible instead and leave the failed units to be read over
# ssh. The array-backed services carry RequiresMountsFor=/mnt/data so they
# still refuse to start rather than writing to the eMMC.
systemd.enableEmergencyMode = false; systemd.enableEmergencyMode = false;
# ---- Heavy state moved off the eMMC ---- # ---- Heavy state moved off the eMMC ----
# A deploy holds TWO full closures (~9G each) on a 29G disk at once, so the # A deploy holds two full closures (~4G each) on this 29G disk at once, so state
# OS disk has no room for state that grows on its own. 2026-08-09: it hit 0 # that grows on its own can't live there — moved under /mnt/data/AppData like every
# bytes free with both gen 39 and gen 40 resident, and postgres died on # other service's state. Settings below are jupiter-only; services/containers.nix
# "No space left on device" — note ext4 reserves 5% for root, so non-root # stays engine/host-agnostic (mercury runs podman with no array).
# services see zero while df still shows ~300M free.
#
# Paths live under /mnt/data/AppData like every other service's state. Both
# settings below are jupiter-only on purpose: services/containers.nix stays
# engine- and host-agnostic (mercury runs pihole on podman with no array).
# podman: CI images dominate and keep growing — the gitea runner's # runroot stays on /run (per-boot tmpfs, doesn't grow); graphroot moves to the array
# act-latest is 1.7G, and the act-22.04 label in services/dev/gitea.nix # since the gitea runner's CI images alone run several GB.
# pulls another ~1.7G the first time a job requests it.
# runroot stays on /run: it is per-boot tmpfs state, not a growing store.
virtualisation.containers.storage.settings.storage = { virtualisation.containers.storage.settings.storage = {
driver = "overlay"; driver = "overlay";
graphroot = "/mnt/data/AppData/containers/storage"; graphroot = "/mnt/data/AppData/containers/storage";
runroot = "/run/containers/storage"; runroot = "/run/containers/storage";
}; };
# immich's postgres cluster. Version component mirrors the upstream default # immich's postgres cluster. Version-qualified path (matches upstream default) so a
# (`/var/lib/postgresql/${psqlSchema}`) so a major bump gets its own dir # major bump gets a fresh dir instead of reusing the old cluster's files.
# instead of silently reusing the old cluster's files. # ⚠️ Puts the DB in the same RAID0 failure domain as the photos it indexes —
# ⚠️ This puts the DB in the SAME failure domain as the photos it indexes: # deliberate (the two are useless apart) but neither is backed up.
# /mnt/data is RAID0, so either 16TB disk now loses both, where before an
# eMMC failure and an array failure each took only one. Chosen deliberately
# — the two are useless apart — but neither is backed up.
services.postgresql.dataDir = services.postgresql.dataDir =
"/mnt/data/AppData/postgresql/${config.services.postgresql.package.psqlSchema}"; "/mnt/data/AppData/postgresql/${config.services.postgresql.package.psqlSchema}";
# /mnt/data/AppData is drwx--x--- darman:users, so postgres needs group # /mnt/data/AppData is drwx--x--- darman:users, so postgres needs the "users" group
# "users" just to TRAVERSE into its own dataDir — exactly the reason immich # just to traverse into its dataDir (same reason immich needs it) — postgres itself
# has the same line. The cluster dir itself keeps the mode it was initdb'd # refuses to start unless the cluster dir is 0700 or 0750.
# with (0750 postgres:postgres) — postgres only accepts 0700, or 0750 when
# the cluster was created with group access, and refuses to start otherwise.
users.users.postgres.extraGroups = [ "users" ]; users.users.postgres.extraGroups = [ "users" ];
# Neither path is under /var/lib, so no module creates it: the postgresql # Neither path is under /var/lib, so no module creates it automatically — same
# module's own tmpfiles entry only adjusts a dataDir that already exists, # reason immich needs its own mediaLocation tmpfiles rule.
# the same way immich's mediaLocation rule does.
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /mnt/data/AppData/postgresql 0750 postgres postgres -" "d /mnt/data/AppData/postgresql 0750 postgres postgres -"
"d /mnt/data/AppData/containers 0700 root root -" "d /mnt/data/AppData/containers 0700 root root -"
]; ];
# graphroot is not a systemd path dependency the way dataDir is, so nothing # Without this, podman would recreate an empty store on the eMMC if the array mounts
# derives a mount ordering from it. Without these, podman would recreate an # late or is absent, and the runner would re-pull every image.
# empty store on the eMMC under the mountpoint when the array is late or # (the media containers set this in their own modules.)
# absent, and the runner would re-pull every image into it.
# (podman-clonarr already carries this from services/media/clonarr.nix.)
systemd.services.podman.unitConfig.RequiresMountsFor = [ "/mnt/data" ]; systemd.services.podman.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
systemd.services.gitea-runner-jupiter.unitConfig.RequiresMountsFor = [ "/mnt/data" ]; systemd.services.gitea-runner-jupiter.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
+55 -28
View File
@@ -1,14 +1,8 @@
{ config, ... }: { config, ... }:
# sops-nix secret wiring (real host only; not imported by vm.nix). # sops-nix secret wiring (real host only; not imported by vm.nix). Decrypts with the
# Encrypted values live in ../../secrets/jupiter.yaml, decrypted at activation to # host's own SSH host key (ssh-to-age), shipped once at install via nixos-anywhere
# /run/secrets/<name>. # --extra-files, so there's no separate sops-only key to manage.
#
# The host decrypts with its OWN SSH host key (age identity derived via
# ssh-to-age, recipient listed in ../../.sops.yaml). The key is pre-generated on
# the laptop and shipped once at install as /etc/ssh/ssh_host_ed25519_key
# (nixos-anywhere --extra-files) — so decryption works on boot #1 and there is
# no separate sops-only key to manage.
{ {
sops.defaultSopsFile = ../../secrets/jupiter.yaml; sops.defaultSopsFile = ../../secrets/jupiter.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
@@ -26,18 +20,14 @@
# Headscale pre-auth key for tailscale auto-registration (see configuration.nix). # Headscale pre-auth key for tailscale auto-registration (see configuration.nix).
sops.secrets.tailscale_authkey = { }; sops.secrets.tailscale_authkey = { };
# Immich's OIDC client secret, from its Authentik application (a SEPARATE # Immich's OIDC client secret (separate Authentik app from headscale/headplane, see
# app from headscale's and headplane's — see hosts/neptun/secrets.nix). # hosts/neptun/secrets.nix). Only rendered into the immich-owned
# Referenced as settings.oauth.clientSecret._secret in # `immich-config.json` template (services/media/immich.nix), so it stays root:root.
# services/media/immich.nix; the module resolves it through systemd
# LoadCredential, which reads as root before dropping privileges, so the
# sops default of root:root 0400 is correct — do NOT set `owner`.
sops.secrets.immich_oauth_client_secret = { }; sops.secrets.immich_oauth_client_secret = { };
# Gitea Actions runner registration token (services/dev/gitea.nix). Gitea # Gitea Actions runner registration token — gitea generates this itself once Actions
# generates this itself once Actions is enabled — it is not a password # is enabled. Rendered into an env file since gitea-actions-runner takes an
# chosen up front. Rendered into a `TOKEN=...` env file because # EnvironmentFile, not a raw secret path.
# gitea-actions-runner takes an EnvironmentFile, not a raw secret path.
sops.secrets.gitea_runner_token = { }; sops.secrets.gitea_runner_token = { };
sops.templates."gitea-runner.env".content = sops.templates."gitea-runner.env".content =
"TOKEN=${config.sops.placeholder.gitea_runner_token}"; "TOKEN=${config.sops.placeholder.gitea_runner_token}";
@@ -48,15 +38,16 @@
# ci-bot access token to allow the ci-bot user to push to repos # ci-bot access token to allow the ci-bot user to push to repos
sops.secrets.gitea_ci_bot_token.owner = "gitea"; sops.secrets.gitea_ci_bot_token.owner = "gitea";
# SABnzbd credentials (web UI login, API keys, eweka.nl usenet server) — # Add the same value to secrets/jupiter.yaml before deploying Jupiter.
# migrated off the reused ini in services/media/sabnzbd.nix into sops.secrets.gitea_hermes_webhook_secret = {
# services.sabnzbd.settings + secretValues. sabnzbd_api_key predates this owner = "gitea";
# migration (provisioned for mediamanager's future use, services/experimental/ };
# mediamanager.nix — not currently imported by any host); reused here as the
# same single source of truth rather than duplicating it. # SABnzbd credentials (web UI login, API keys, eweka.nl usenet server) for
# owner = sabnzbd: the module's preStart (replace-secret) runs as the # services/media/sabnzbd.nix; sabnzbd_api_key is shared with
# service's own User=/Group=, and sops secrets default to root:root 0400 — # services/experimental/mediamanager.nix rather than duplicated.
# without this, replace-secret gets Permission denied reading /run/secrets. # owner = sabnzbd because the module's preStart runs as that user, and sops secrets
# default to root:root 0400.
sops.secrets.sabnzbd_web_username.owner = "sabnzbd"; sops.secrets.sabnzbd_web_username.owner = "sabnzbd";
sops.secrets.sabnzbd_web_password.owner = "sabnzbd"; sops.secrets.sabnzbd_web_password.owner = "sabnzbd";
sops.secrets.sabnzbd_api_key.owner = "sabnzbd"; sops.secrets.sabnzbd_api_key.owner = "sabnzbd";
@@ -64,4 +55,40 @@
sops.secrets.sabnzbd_eweka_username.owner = "sabnzbd"; sops.secrets.sabnzbd_eweka_username.owner = "sabnzbd";
sops.secrets.sabnzbd_eweka_password.owner = "sabnzbd"; sops.secrets.sabnzbd_eweka_password.owner = "sabnzbd";
# Matrix (services/comms/matrix.nix). The synapse signing key lives here rather than
# being generated on first start, so losing the RAID0 array doesn't lose the
# server's federation identity. mas_shared_secret is read by synapse and MAS
# (MAS is in group matrix-synapse). matrix_oidc_client_secret is the Authentik
# `matrix` provider's.
sops.secrets.synapse_signing_key.owner = "matrix-synapse";
sops.secrets.synapse_macaroon_secret_key.owner = "matrix-synapse";
sops.secrets.synapse_form_secret.owner = "matrix-synapse";
sops.secrets.mas_shared_secret = { owner = "matrix-synapse"; group = "matrix-synapse"; mode = "0440"; };
sops.secrets.mas_encryption_secret.owner = "matrix-authentication-service";
sops.secrets.mas_signing_key.owner = "matrix-authentication-service";
sops.secrets.matrix_oidc_client_secret.owner = "matrix-authentication-service";
homelab.matrix = {
signingKeyFile = config.sops.secrets.synapse_signing_key.path;
macaroonSecretFile = config.sops.secrets.synapse_macaroon_secret_key.path;
formSecretFile = config.sops.secrets.synapse_form_secret.path;
masSecretFile = config.sops.secrets.mas_shared_secret.path;
masEncryptionFile = config.sops.secrets.mas_encryption_secret.path;
masSigningKeyFile = config.sops.secrets.mas_signing_key.path;
oidcClientSecretFile = config.sops.secrets.matrix_oidc_client_secret.path;
};
# CouchDB admin account for Obsidian LiveSync — rendered into an [admins] ini
# fragment instead of services.couchdb.adminPass, which would put the plaintext in
# the world-readable store.
# owner = couchdb on both: couchdb re-reads the ini as its own user after privilege
# drop, and without this sops's default root:root 0400 leaves it with no admin
# configured (every request 401s).
sops.secrets.couchdb_admin_password.owner = "couchdb";
sops.templates."couchdb-admins.ini" = {
owner = "couchdb";
content = ''
[admins]
obsidian = ${config.sops.placeholder.couchdb_admin_password}
'';
};
} }

Some files were not shown because too many files have changed in this diff Show More