Dotfiles/desktopenvs/hyprdrive/astro-menu
Amir Alexander Abdelbaki f48c70273a fix(hyprdrive): holographic Cosmonaut Shell fixes + per-monitor station bar
Daily-driving pass over the Cosmonaut Shell suite: transparency, holographic
effects, and layout/geometry fixes across every component built for the DE.

Global holographic layer (astro-menu/horizon-dock/station-bar lib/hologram.py):
- edge-fade mask (A8 DEST_OUT) so scanlines fade out at panel borders
- magenta particle field; "materialize from static" noise-mask intro animation
- optional clip_func so the mask follows non-rectangular / animated content
- universal `* { background-color: transparent }` at USER+1 to defeat the
  CyberQueer theme painting opaque bg on plain containers; blur layer_rules

astro-menu: magenta text (alt red) for readability; thinner, glowier borders;
rounded map-texture corners; fixed transparency stacking + square corners.

orbit-menu: scanline mask now follows the zoom transition into a submenu.

horizon-dock: reworked into an orbit-menu node ~1/3 on-screen (<=2/3 width) with
horizon perspective (arched orbit rows), a non-functional center clock-sphere,
orbit glyph decorations, graceful edge fade-out, and centered/filled orbits;
tray removed; giant-surface clip fixed.

station-bar: redesigned as an extra Horizon Dock orbit — bare glowing color-coded
glyphs (no pills), width-adaptive, one bar per monitor, Super+Z toggles the
focused monitor's bar. Clickable HUD trapezoid around the title opens Astro Menu.
Workspaces are now per-monitor: each bar shows only its own monitor's workspaces
and highlights that monitor's active workspace. Populated workspaces show the
station glyph, empty ones the bare spaceship + number; the focused one is framed
by a `-< >-` reticle with the rocket prepended when there's a station to dock at.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 10:34:40 +02:00
..
backend feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
lib fix(hyprdrive): holographic Cosmonaut Shell fixes + per-monitor station bar 2026-07-18 10:34:40 +02:00
modules fix(hyprdrive): holographic Cosmonaut Shell fixes + per-monitor station bar 2026-07-18 10:34:40 +02:00
services feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
style fix(hyprdrive): holographic Cosmonaut Shell fixes + per-monitor station bar 2026-07-18 10:34:40 +02:00
ui feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
.gitignore feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
README.md feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
appservices.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
config.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
main.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
module_base.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
paths.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
registry.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
settings.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
theme.py feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite 2026-07-17 15:28:07 +02:00
window.py fix(hyprdrive): holographic Cosmonaut Shell fixes + per-monitor station bar 2026-07-18 10:34:40 +02:00

README.md

astro-menu

A touch-friendly GTK4 popup control centre for the hyprlua desktop, replacing nwg-dock and nwg-drawer. Triggered from the EWW top bar (or Super+D).

Layout: a 2×2 quad grid of feature modules over a full-width application drawer. Any quad can expand to overlay the other three; the drawer can expand to the bottom of the screen. A single margined root box letterboxes the menu identically in every state.

Stack

  • Frontend: Python + PyGObject + GTK4, as a wlr-layer-shell surface (gtk4-layer-shell). Chosen over Lua because lgi/Astal-Lua only support GTK3.
  • Location map: a static OSM image stitched from tiles (backend/staticmap.py, Pillow). libshumate does not paint tiles in this environment (the official shumate-demo shows the same blank map), though tile downloads work — hence the static fallback.
  • Services: Astal GObject libraries via introspection — AstalNetwork, AstalBluetooth, AstalApps — plus our own IP-geolocation singleton.
  • Backends: Python/Bash scripts in backend/ (JSON on stdout), run async via Gio.Subprocess so nothing blocks the UI.
  • Theme: style/_colors.css (@define-color, generated from ~/Dotfiles/colors.conf by apply-theme.sh) + style/style.css.

Running

main.py is single-instance. The autostart launches a hidden resident daemon; verbs are forwarded over D-Bus:

scripts/astro-menu-start.sh          # resident daemon (hidden); sets LD_PRELOAD
scripts/menu-toggle.sh               # --toggle
scripts/menu-toggle.sh appdrawer     # open with the app drawer expanded

astro-menu-start.sh must LD_PRELOAD libgtk4-layer-shell (it loads after libwayland under PyGObject otherwise).

Adding a module

  1. Create modules/<name>.py exposing a top-level SPEC = ModuleSpec(...) whose build(ctx) returns a ModuleInstance(compact=…, expanded=…, …).
    • compact shows in the 2×2 cell; a distinct expanded widget enables the expand button (they must be separate instances — GTK widgets have one parent).
    • Declare per-feature toggles via features=[Feature("id", "Label", default)]; read them with ctx.feature("id"). A disabled quad never calls build().
    • Shared state (network, bluetooth, location) is on ctx.services.
  2. Append its SPEC to ALL_SPECS in registry.py. Nothing else changes.

Files

main.py          app + single-instance IPC        window.py    layer-shell + letterbox
registry.py      module list (extension seam)      settings.py  JSON toggles/order
module_base.py   ModuleSpec / ModuleInstance / ModuleContext
appservices.py   shared Astal services + location
ui/              quadcard, quadgrid, appdrawer
modules/         location, weather, bluetooth, network
services/        location (geolocation singleton)
lib/             ansi (SGR→TextTag), proc (async subprocess)
backend/         geolocate.py, weather.sh, network.sh
style/           _colors.css, style.css