Dotfiles/etc-greetd/regreet.css

275 lines
9.8 KiB
CSS

/* regreet.css — Cosmonaut Shell login theme for ReGreet (greetd, Wayland-native)
*
* Deployed to /etc/greetd/regreet.css by
* setup/modules/optional-Modules/apps/greetd-regreet.sh and loaded by ReGreet
* via `regreet -s` at STYLE_PROVIDER_PRIORITY_APPLICATION (600) — i.e. ON TOP of
* the base GTK theme (priority 200). So this file owns the login-screen look
* outright; the base theme (regreet.toml `theme_name`) only supplies sane widget
* 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
* login card's layout. This is the greeter's own, self-contained skin — styled to
* 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
* rewrites in lock-step with colors.conf — keep them as bare 6-digit hex so its
* case-insensitive sed keeps matching. cq_magenta / cq_cyan are NOT in that map,
* 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
* css classes + node types are selectable):
* frame.background → login card AND clock card
* frame.background > grid → the login card's contents
* frame.background > label→ the clock label (clock card's only child)
* entry / entry.password → username / session / secret fields
* combobox → user + session pickers
* button.suggested-action → Login
* button.destructive-action → Reboot / Power Off
* button.toggle → manual user/session entry toggles
* infobar → PAM notification bar
*/
@define-color cq_bg #1A1A1A; /* near-black base surface (apply-theme) */
@define-color cq_text #D6ABAB; /* warm quasi-white foreground (apply-theme)*/
@define-color cq_pink #E40046; /* hot accent red (apply-theme) */
@define-color cq_violet #5018DD; /* electric violet (apply-theme) */
@define-color cq_red #F50505; /* hi-vis danger red (fixed) */
@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
* .suggested-action / selections from these, so overriding them here is what
* actually recolours those widgets. Kept in bare hex so apply-theme.sh rewrites
* the palette ones too. */
@define-color accent_color #E40046;
@define-color accent_bg_color #E40046;
@define-color accent_fg_color #1A1A1A;
@define-color theme_selected_bg_color #E40046;
@define-color theme_selected_fg_color #1A1A1A;
@define-color destructive_color #F50505;
@define-color destructive_bg_color #F50505;
@define-color destructive_fg_color #1A1A1A;
/* ── Backdrop ─────────────────────────────────────────────────────────────
* Solid near-black behind the wallpaper Picture, so the greeter never flashes
* white and stays legible if no wallpaper has been synced yet. Monospace
* everywhere, matching the shell. */
window,
overlay {
background-color: @cq_bg;
color: @cq_magenta;
font-family: "Agave Nerd Font Mono", "JetBrains Mono", monospace;
}
/* ── 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 {
background-color: alpha(@cq_bg, 0.62);
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;
border: 1.5px solid alpha(@cq_magenta, 0.85);
border-radius: 18px;
padding: 12px 18px;
box-shadow: 0 0 34px 2px alpha(@cq_magenta, 0.34),
0 0 12px 1px alpha(@cq_violet, 0.30),
inset 0 0 60px alpha(@cq_violet, 0.14);
}
/* 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. */
frame.background > label {
font-family: "Agave Nerd Font Mono", "JetBrains Mono", monospace;
font-size: 30pt;
font-weight: 700;
letter-spacing: 5px;
padding: 4px 28px;
color: @cq_magenta;
text-shadow: 0 0 14px alpha(@cq_magenta, 0.80),
0 0 26px alpha(@cq_violet, 0.55);
}
/* ── Text & labels inside the login card ─────────────────────────────────── */
frame.background > grid > label {
color: @cq_magenta;
text-shadow: 0 0 10px alpha(@cq_magenta, 0.45);
margin: 0 6px;
}
/* ── Entries: username / session / password ──────────────────────────────── */
entry,
entry.password {
background-color: alpha(#000000, 0.42);
color: @cq_text;
caret-color: @cq_magenta;
border: 1.5px solid alpha(@cq_violet, 0.85);
border-radius: 11px;
padding: 8px 12px;
min-height: 34px;
transition: border-color 160ms ease, box-shadow 160ms ease;
}
entry image,
entry.password image { /* the peek-password / clear icons */
color: @cq_magenta;
}
entry:focus-within,
entry.password:focus-within {
border-color: @cq_magenta;
box-shadow: 0 0 16px 1px alpha(@cq_magenta, 0.55),
inset 0 0 10px alpha(@cq_magenta, 0.12);
}
entry selection {
background-color: @cq_magenta;
color: @cq_bg;
}
/* ── Combo boxes: user + session pickers render as `combobox > button` ───── */
combobox > button.combo {
background-color: alpha(#000000, 0.42);
color: @cq_text;
border: 1.5px solid alpha(@cq_violet, 0.85);
border-radius: 11px;
padding: 6px 12px;
min-height: 34px;
}
combobox > button.combo:hover {
border-color: @cq_magenta;
box-shadow: 0 0 12px alpha(@cq_magenta, 0.40);
}
combobox arrow {
color: @cq_magenta;
min-height: 16px;
min-width: 16px;
}
combobox popover contents {
background-color: alpha(@cq_bg, 0.96);
border: 1.5px solid @cq_violet;
border-radius: 11px;
box-shadow: 0 0 18px alpha(@cq_violet, 0.40);
}
combobox popover contents :selected {
background-color: @cq_magenta;
color: @cq_bg;
}
/* ── Buttons ─────────────────────────────────────────────────────────────── */
button {
color: @cq_text;
background-color: alpha(@cq_violet, 0.16);
border: 1.5px solid alpha(@cq_violet, 0.85);
border-radius: 11px;
padding: 8px 18px;
min-height: 34px;
transition: all 160ms ease;
}
button:hover {
background-color: alpha(@cq_violet, 0.30);
border-color: @cq_magenta;
color: #FFFFFF;
box-shadow: 0 0 14px alpha(@cq_magenta, 0.40);
}
button:active {
background-color: @cq_violet;
color: @cq_bg;
}
/* Manual-entry toggles (pencil icons) — quieter, icon-only */
button.toggle {
background-color: transparent;
border-color: alpha(@cq_violet, 0.55);
padding: 6px;
}
button.toggle:checked {
background-color: alpha(@cq_magenta, 0.20);
border-color: @cq_magenta;
color: @cq_magenta;
}
/* Primary action: Login. The `window` prefix (specificity 0,1,2) and
* `background-image: none` beat Adwaita's own accent styling. Solid Cosmonaut
* 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 {
background-image: none;
background-color: @cq_magenta;
color: @cq_bg;
border: 1.5px solid @cq_magenta;
font-weight: 700;
box-shadow: 0 0 18px alpha(@cq_magenta, 0.55);
}
window button.suggested-action:hover {
background-color: #FF2ABF;
border-color: #FF2ABF;
color: @cq_bg;
box-shadow: 0 0 26px alpha(@cq_magenta, 0.85);
}
window button.suggested-action:active {
background-color: @cq_violet;
border-color: @cq_violet;
}
/* Destructive actions: Reboot / Power Off — quiet red outline, red glow on hover */
window button.destructive-action {
background-image: none;
background-color: transparent;
color: @cq_text;
border: 1.5px solid alpha(@cq_red, 0.60);
}
window button.destructive-action:hover {
background-color: alpha(@cq_red, 0.18);
border-color: @cq_red;
color: @cq_red;
box-shadow: 0 0 16px alpha(@cq_red, 0.45);
}
/* ── PAM notification bar ────────────────────────────────────────────────── */
infobar {
background: transparent;
border: none;
box-shadow: none;
}
infobar > revealer > box {
background-color: alpha(@cq_bg, 0.90);
color: @cq_text;
border: 1.5px solid @cq_violet;
border-radius: 11px;
box-shadow: 0 0 18px alpha(@cq_violet, 0.40);
}
infobar.error > revealer > box {
border-color: @cq_red;
box-shadow: 0 0 18px alpha(@cq_red, 0.45);
}
infobar label {
color: @cq_text;
padding: 6px 12px;
}
/* ── Tooltips (hover hints on the toggle buttons) ────────────────────────── */
tooltip {
background-color: @cq_violet;
color: @cq_bg;
border-radius: 9px;
padding: 4px 8px;
}