Compare commits

..

No commits in common. "2a1113018d7c1907dfd5bad8e6e6e6cd67dcb00b" and "4da704cb5d01dfc7a9c9636e408e815cb99c9f1f" have entirely different histories.

4 changed files with 85 additions and 110 deletions

View File

@ -35,20 +35,11 @@ class TrayHost:
self._on_watcher_appeared, self._on_watcher_vanished) self._on_watcher_appeared, self._on_watcher_vanished)
def _on_watcher_appeared(self, _conn, _name, _owner) -> None: def _on_watcher_appeared(self, _conn, _name, _owner) -> None:
# MUST be async: this bar hosts the StatusNotifierWatcher itself (see
# sni_watcher.py), so a *_sync proxy here would block the main loop
# waiting on a reply only that same loop can produce — a self-deadlock
# that freezes the whole bar (its clock, its holo intro — everything)
# until the 25s D-Bus timeout finally lets it go.
Gio.DBusProxy.new_for_bus(
Gio.BusType.SESSION, Gio.DBusProxyFlags.NONE, None,
_WATCHER_BUS, _WATCHER_PATH, _WATCHER_IFACE, None,
self._on_watcher_ready, None,
)
def _on_watcher_ready(self, _source, result, _user_data) -> None:
try: try:
self._watcher = Gio.DBusProxy.new_for_bus_finish(result) self._watcher = Gio.DBusProxy.new_for_bus_sync(
Gio.BusType.SESSION, Gio.DBusProxyFlags.NONE, None,
_WATCHER_BUS, _WATCHER_PATH, _WATCHER_IFACE, None,
)
except GLib.Error: except GLib.Error:
self._watcher = None self._watcher = None
return return
@ -65,13 +56,14 @@ class TrayHost:
def _ensure_host_registered(self) -> None: def _ensure_host_registered(self) -> None:
if self._registered_host or self._watcher is None: if self._registered_host or self._watcher is None:
return return
# Async for the same self-deadlock reason as _on_watcher_appeared: this try:
# call targets our own in-process watcher. Fire-and-forget. self._watcher.call_sync(
"RegisterStatusNotifierHost", GLib.Variant("(s)", (_HOST_NAME,)),
Gio.DBusCallFlags.NONE, 500, None,
)
except GLib.Error:
pass
self._registered_host = True self._registered_host = True
self._watcher.call(
"RegisterStatusNotifierHost", GLib.Variant("(s)", (_HOST_NAME,)),
Gio.DBusCallFlags.NONE, 2000, None, None,
)
def available(self) -> bool: def available(self) -> bool:
return self._watcher is not None return self._watcher is not None

View File

@ -1,4 +1,4 @@
/* regreet.css Cosmonaut Shell login theme for ReGreet (greetd, Wayland-native) /* regreet.css CyberQueer login theme for ReGreet (greetd, Wayland-native)
* *
* Deployed to /etc/greetd/regreet.css by * Deployed to /etc/greetd/regreet.css by
* setup/modules/optional-Modules/apps/greetd-regreet.sh and loaded by ReGreet * setup/modules/optional-Modules/apps/greetd-regreet.sh and loaded by ReGreet
@ -7,14 +7,11 @@
* outright; the base theme (regreet.toml `theme_name`) only supplies sane widget * outright; the base theme (regreet.toml `theme_name`) only supplies sane widget
* defaults. We deliberately do NOT reuse the desktop `cyberqueer` GTK theme here: * defaults. We deliberately do NOT reuse the desktop `cyberqueer` GTK theme here:
* its `* { all: unset }` reset is meant for waybar/eww/Thunar and would strip a * its `* { all: unset }` reset is meant for waybar/eww/Thunar and would strip a
* login card's layout. This is the greeter's own, self-contained skin styled to * login card's layout. This is the greeter's own, self-contained cyberqueer skin.
* match hyprdrive's "Cosmonaut Shell": translucent holographic glass cards with
* scanlines, thin glowing magenta/violet borders, and glowing monospace text.
* *
* The four PALETTE hexes below (bg/text/pink/violet) are the ones apply-theme.sh * Colours mirror colors.conf (the CyberQueer palette). apply-theme.sh rewrites
* rewrites in lock-step with colors.conf keep them as bare 6-digit hex so its * the hex values below in lock-step with the rest of the system keep them as
* case-insensitive sed keeps matching. cq_magenta / cq_cyan are NOT in that map, * bare 6-digit hex so its case-insensitive sed substitution keeps matching.
* so they stay fixed: the Cosmonaut magenta the shell is built around.
* *
* ReGreet widget map (relm4 `#[name]` sets Rust fields, NOT CSS ids so only * ReGreet widget map (relm4 `#[name]` sets Rust fields, NOT CSS ids so only
* css classes + node types are selectable): * css classes + node types are selectable):
@ -29,18 +26,17 @@
* infobar PAM notification bar * infobar PAM notification bar
*/ */
@define-color cq_bg #1A1A1A; /* near-black base surface (apply-theme) */ @define-color cq_bg #1A1A1A; /* near-black base surface */
@define-color cq_text #D6ABAB; /* warm quasi-white foreground (apply-theme)*/ @define-color cq_text #D6ABAB; /* warm quasi-white foreground */
@define-color cq_pink #E40046; /* hot accent red (apply-theme) */ @define-color cq_pink #E40046; /* hot-pink primary accent */
@define-color cq_violet #5018DD; /* electric violet (apply-theme) */ @define-color cq_violet #5018DD; /* electric-violet secondary */
@define-color cq_red #F50505; /* hi-vis danger red (fixed) */ @define-color cq_red #F50505; /* hi-vis danger red */
@define-color cq_magenta #EB00A6; /* Cosmonaut Shell primary magenta (fixed) */
@define-color cq_cyan #22D3EE; /* cool readout accent (fixed) */
/* Re-tint the base (Adwaita) theme's semantic named colours. Adwaita paints /* Re-tint the base (Adwaita) theme's semantic named colours to CyberQueer.
* .suggested-action / selections from these, so overriding them here is what * Adwaita paints .suggested-action / .destructive-action / selections from
* actually recolours those widgets. Kept in bare hex so apply-theme.sh rewrites * these named colours, so overriding them here is what actually recolours the
* the palette ones too. */ * Login and Reboot/Power-Off buttons (a plain `.suggested-action` rule loses to
* Adwaita's own). Kept in bare hex so apply-theme.sh rewrites them too. */
@define-color accent_color #E40046; @define-color accent_color #E40046;
@define-color accent_bg_color #E40046; @define-color accent_bg_color #E40046;
@define-color accent_fg_color #1A1A1A; @define-color accent_fg_color #1A1A1A;
@ -52,63 +48,52 @@
/* Backdrop /* Backdrop
* Solid near-black behind the wallpaper Picture, so the greeter never flashes * Solid near-black behind the wallpaper Picture, so the greeter never flashes
* white and stays legible if no wallpaper has been synced yet. Monospace * white and stays legible if no wallpaper has been synced yet. */
* everywhere, matching the shell. */
window, window,
overlay { overlay {
background-color: @cq_bg; background-color: @cq_bg;
color: @cq_magenta; color: @cq_text;
font-family: "Agave Nerd Font Mono", "JetBrains Mono", monospace;
} }
/* Cards: the login frame and the clock frame both carry `.background` /* ── Cards: the login frame and the clock frame both carry `.background` ──── */
* Translucent holographic glass: a faint magenta scanline field + a soft violet
* top-glow layered over a dark translucent fill, ringed by a thin glowing
* magenta border projected light, not an opaque slab. */
frame.background { frame.background {
background-color: alpha(@cq_bg, 0.62); background-color: alpha(@cq_bg, 0.86);
background-image:
repeating-linear-gradient(0deg,
alpha(@cq_magenta, 0.05) 0px, alpha(@cq_magenta, 0.05) 1px,
transparent 1px, transparent 4px),
radial-gradient(circle at 50% -10%, alpha(@cq_violet, 0.30), transparent 72%);
color: @cq_text; color: @cq_text;
border: 1.5px solid alpha(@cq_magenta, 0.85); border: 2px solid @cq_pink;
border-radius: 18px; border-radius: 20px;
padding: 12px 18px; padding: 10px 16px;
box-shadow: 0 0 34px 2px alpha(@cq_magenta, 0.34), box-shadow: 0 0 26px 2px alpha(@cq_pink, 0.40),
0 0 12px 1px alpha(@cq_violet, 0.30),
inset 0 0 60px alpha(@cq_violet, 0.14); inset 0 0 60px alpha(@cq_violet, 0.14);
} }
/* The clock card sits flush on the top edge (ReGreet flattens its top corners /* The clock card sits flush on the top edge (ReGreet flattens its top corners
* via inline_css at priority 800, which wins over this). Big glowing HUD readout. */ * via inline_css at priority 800, which wins over this so we only need to
* style the glow + fill, not fight the border geometry). */
frame.background > label { frame.background > label {
font-family: "Agave Nerd Font Mono", "JetBrains Mono", monospace; font-family: "JetBrains Mono", monospace;
font-size: 30pt; font-size: 30pt;
font-weight: 700; font-weight: 700;
letter-spacing: 5px; letter-spacing: 4px;
padding: 4px 28px; padding: 4px 26px;
color: @cq_magenta; color: @cq_text;
text-shadow: 0 0 14px alpha(@cq_magenta, 0.80), text-shadow: 0 0 12px alpha(@cq_pink, 0.75),
0 0 26px alpha(@cq_violet, 0.55); 0 0 22px alpha(@cq_violet, 0.55);
} }
/* ── Text & labels inside the login card ─────────────────────────────────── */ /* ── Text & labels inside the login card ─────────────────────────────────── */
frame.background > grid > label { frame.background > grid > label {
color: @cq_magenta; color: @cq_text;
text-shadow: 0 0 10px alpha(@cq_magenta, 0.45);
margin: 0 6px; margin: 0 6px;
} }
/* ── Entries: username / session / password ──────────────────────────────── */ /* ── Entries: username / session / password ──────────────────────────────── */
entry, entry,
entry.password { entry.password {
background-color: alpha(#000000, 0.42); background-color: alpha(#000000, 0.45);
color: @cq_text; color: @cq_text;
caret-color: @cq_magenta; caret-color: @cq_pink;
border: 1.5px solid alpha(@cq_violet, 0.85); border: 2px solid alpha(@cq_violet, 0.85);
border-radius: 11px; border-radius: 12px;
padding: 8px 12px; padding: 8px 12px;
min-height: 34px; min-height: 34px;
transition: border-color 160ms ease, box-shadow 160ms ease; transition: border-color 160ms ease, box-shadow 160ms ease;
@ -116,51 +101,49 @@ entry.password {
entry image, entry image,
entry.password image { /* the peek-password / clear icons */ entry.password image { /* the peek-password / clear icons */
color: @cq_magenta; color: @cq_violet;
} }
entry:focus-within, entry:focus-within,
entry.password:focus-within { entry.password:focus-within {
border-color: @cq_magenta; border-color: @cq_pink;
box-shadow: 0 0 16px 1px alpha(@cq_magenta, 0.55), box-shadow: 0 0 14px 1px alpha(@cq_pink, 0.55);
inset 0 0 10px alpha(@cq_magenta, 0.12);
} }
entry selection { entry selection {
background-color: @cq_magenta; background-color: @cq_pink;
color: @cq_bg; color: @cq_bg;
} }
/* ── Combo boxes: user + session pickers render as `combobox > button` ───── */ /* ── Combo boxes: user + session pickers render as `combobox > button` ───── */
combobox > button.combo { combobox > button.combo {
background-color: alpha(#000000, 0.42); background-color: alpha(#000000, 0.45);
color: @cq_text; color: @cq_text;
border: 1.5px solid alpha(@cq_violet, 0.85); border: 2px solid alpha(@cq_violet, 0.85);
border-radius: 11px; border-radius: 12px;
padding: 6px 12px; padding: 6px 12px;
min-height: 34px; min-height: 34px;
} }
combobox > button.combo:hover { combobox > button.combo:hover {
border-color: @cq_magenta; border-color: @cq_pink;
box-shadow: 0 0 12px alpha(@cq_magenta, 0.40);
} }
combobox arrow { combobox arrow {
color: @cq_magenta; color: @cq_pink;
min-height: 16px; min-height: 16px;
min-width: 16px; min-width: 16px;
} }
/* The drop-down popover list */
combobox popover contents { combobox popover contents {
background-color: alpha(@cq_bg, 0.96); background-color: @cq_bg;
border: 1.5px solid @cq_violet; border: 1px solid @cq_violet;
border-radius: 11px; border-radius: 12px;
box-shadow: 0 0 18px alpha(@cq_violet, 0.40);
} }
combobox popover contents :selected { combobox popover contents :selected {
background-color: @cq_magenta; background-color: @cq_pink;
color: @cq_bg; color: @cq_bg;
} }
@ -168,18 +151,17 @@ combobox popover contents :selected {
button { button {
color: @cq_text; color: @cq_text;
background-color: alpha(@cq_violet, 0.16); background-color: alpha(@cq_violet, 0.16);
border: 1.5px solid alpha(@cq_violet, 0.85); border: 2px solid alpha(@cq_violet, 0.85);
border-radius: 11px; border-radius: 12px;
padding: 8px 18px; padding: 8px 18px;
min-height: 34px; min-height: 34px;
transition: all 160ms ease; transition: all 160ms ease;
} }
button:hover { button:hover {
background-color: alpha(@cq_violet, 0.30); background-color: alpha(@cq_violet, 0.32);
border-color: @cq_magenta; border-color: @cq_pink;
color: #FFFFFF; color: #FFFFFF;
box-shadow: 0 0 14px alpha(@cq_magenta, 0.40);
} }
button:active { button:active {
@ -195,29 +177,27 @@ button.toggle {
} }
button.toggle:checked { button.toggle:checked {
background-color: alpha(@cq_magenta, 0.20); background-color: alpha(@cq_pink, 0.20);
border-color: @cq_magenta; border-color: @cq_pink;
color: @cq_magenta; color: @cq_pink;
} }
/* Primary action: Login. The `window` prefix (specificity 0,1,2) and /* Primary action: Login. The `window` prefix (specificity 0,1,2) and
* `background-image: none` beat Adwaita's own accent styling. Solid Cosmonaut * `background-image: none` are needed to beat Adwaita's own accent styling. */
* magenta with a strong glow the one always-magenta control (cq_magenta is
* outside apply-theme's palette map, so Login stays magenta across themes). */
window button.suggested-action { window button.suggested-action {
background-image: none; background-image: none;
background-color: @cq_magenta; background-color: @cq_pink;
color: @cq_bg; color: @cq_bg;
border: 1.5px solid @cq_magenta; border: 2px solid @cq_pink;
font-weight: 700; font-weight: 700;
box-shadow: 0 0 18px alpha(@cq_magenta, 0.55); box-shadow: 0 0 16px alpha(@cq_pink, 0.45);
} }
window button.suggested-action:hover { window button.suggested-action:hover {
background-color: #FF2ABF; background-color: #FF1A5E;
border-color: #FF2ABF; border-color: #FF1A5E;
color: @cq_bg; color: @cq_bg;
box-shadow: 0 0 26px alpha(@cq_magenta, 0.85); box-shadow: 0 0 22px alpha(@cq_pink, 0.75);
} }
window button.suggested-action:active { window button.suggested-action:active {
@ -225,12 +205,13 @@ window button.suggested-action:active {
border-color: @cq_violet; border-color: @cq_violet;
} }
/* Destructive actions: Reboot / Power Off — quiet red outline, red glow on hover */ /* Destructive actions: Reboot / Power Off quiet red outline, red glow on
* hover (overrides Adwaita's solid-red fill; same specificity trick). */
window button.destructive-action { window button.destructive-action {
background-image: none; background-image: none;
background-color: transparent; background-color: transparent;
color: @cq_text; color: @cq_text;
border: 1.5px solid alpha(@cq_red, 0.60); border: 2px solid alpha(@cq_red, 0.65);
} }
window button.destructive-action:hover { window button.destructive-action:hover {
@ -241,6 +222,8 @@ window button.destructive-action:hover {
} }
/* ── PAM notification bar ────────────────────────────────────────────────── */ /* ── PAM notification bar ────────────────────────────────────────────────── */
/* Style only the inner message box so a collapsed/unrevealed infobar draws
* nothing (no stray border line above the power buttons). */
infobar { infobar {
background: transparent; background: transparent;
border: none; border: none;
@ -250,8 +233,8 @@ infobar {
infobar > revealer > box { infobar > revealer > box {
background-color: alpha(@cq_bg, 0.90); background-color: alpha(@cq_bg, 0.90);
color: @cq_text; color: @cq_text;
border: 1.5px solid @cq_violet; border: 2px solid @cq_violet;
border-radius: 11px; border-radius: 12px;
box-shadow: 0 0 18px alpha(@cq_violet, 0.40); box-shadow: 0 0 18px alpha(@cq_violet, 0.40);
} }
@ -269,6 +252,6 @@ infobar label {
tooltip { tooltip {
background-color: @cq_violet; background-color: @cq_violet;
color: @cq_bg; color: @cq_bg;
border-radius: 9px; border-radius: 10px;
padding: 4px 8px; padding: 4px 8px;
} }

View File

@ -29,7 +29,7 @@ cursor_theme_name = "Adwaita"
cursor_blink = true cursor_blink = true
# Bumped well above the 11pt the old greeter used, so the greeter reads large on # Bumped well above the 11pt the old greeter used, so the greeter reads large on
# the 4K panel. Tune here (or via GDK_SCALE in regreet-session.sh) to taste. # the 4K panel. Tune here (or via GDK_SCALE in regreet-session.sh) to taste.
font_name = "Agave Nerd Font Mono 15" font_name = "JetBrains Mono 16"
icon_theme_name = "Adwaita" icon_theme_name = "Adwaita"
# Clean base for regreet.css to paint on (see header). The CyberQueer colours # Clean base for regreet.css to paint on (see header). The CyberQueer colours
# live in /etc/greetd/regreet.css, not in this theme. # live in /etc/greetd/regreet.css, not in this theme.
@ -40,7 +40,7 @@ reboot = ["systemctl", "reboot"]
poweroff = ["systemctl", "poweroff"] poweroff = ["systemctl", "poweroff"]
[appearance] [appearance]
greeting_msg = "-< CREW AUTHENTICATION >-" greeting_msg = "Welcome back"
[widget.clock] [widget.clock]
format = "%H:%M" format = "%H:%M"

0
setup/modules/Desktop-Environments/sway.sh Executable file → Normal file
View File