Compare commits

..

3 Commits

Author SHA1 Message Date
Amir Alexander Abdelbaki fc929d4747 fix(hyprlua): flatten presence-detect's check cycle to 20s
Replace the three-tier load-adaptive polling (20s/120s/600s based on CPU-or-
RAM usage) with a flat 20s interval — fido2-token -L is cheap enough that
backing off under load isn't worth the added complexity or the latency in
noticing a key was removed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 20:03:48 +02:00
Amir Alexander Abdelbaki 3b6cdb8dbd fix(greetd): give hyprlua its own plain greeter skin, separate from hyprdrive
There was only one ReGreet skin in the whole repo (etc-greetd/), hand-styled
to match hyprdrive's glowy "Cosmonaut Shell" look (translucent glass, box-
shadow glow, scanlines). sysupdate.sh's _ensure_plymouth_regreet() offers to
deploy it on any machine that migrates to greetd, with no DE-awareness — so
it landed on a hyprlua box too.

Move the existing skin to desktopenvs/hyprdrive/greetd-regreet/ and add a
plain hyprlua variant at desktopenvs/hyprlua/greetd-regreet/ (flat @bg cards,
2px @violet border, @accent on hover/focus/active — no glow, matching
mnotifd/audio-panel/astal-menu's established look). config.toml and
regreet-session.sh have no DE-specific styling, so they stay shared at
etc-greetd/.

sysupdate.sh's _deploy_greetd() and the greetd-regreet.sh setup module now
resolve the active DE (reusing the same config-updater SOURCE_BASE detection
_de_source_dir() already uses elsewhere) and deploy the matching skin,
falling back to hyprdrive's for DEs without their own variant yet.
apply-theme.sh needed no functional change since it recolors whatever's
already deployed rather than reading the source path — just relabeled its
SYS_FILES entry for accuracy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 20:03:43 +02:00
Amir Alexander Abdelbaki 37da84422a fix(hyprlua): match notif/audio-panel theming to eww's violet/magenta look
mnotifd, mnotifhist, and audio-panel filled cards/pills with solid @violet
(border indistinguishable from fill), unlike the hollow @bg-fill +
@violet-border pills used everywhere else (eww bar, astal-menu). Flip
default-state fills to @bg, keep @accent for hover/checked/active states,
and drop the audio-panel default-device button's hardcoded green in favour
of @accent.

Also give the eww bar's drawer/notif/caffeine buttons the same circular
.icon-btn treatment as the screen-rotation buttons (touch variant only —
the laptop bar's 20px height has no room for a 40px circle), and make the
notif bell light up @accent whenever mnotifd's history cache has entries
(new notif-active-status.sh poll), rather than only matching hover.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 20:03:18 +02:00
19 changed files with 480 additions and 98 deletions

View File

@ -79,7 +79,12 @@ USER_FILES=(
# System-owned paths — sed is run via sudo # System-owned paths — sed is run via sudo
SYS_FILES=( SYS_FILES=(
"etc-ly-config.ini|/etc/ly/config.ini" "etc-ly-config.ini|/etc/ly/config.ini"
"etc-greetd/regreet.css|/etc/greetd/regreet.css" # /etc/greetd/regreet.css is deployed from whichever DE's own
# desktopenvs/<de>/greetd-regreet/regreet.css is active (see
# sysupdate.sh's _deploy_greetd()) — this just re-colours whatever hex
# values are actually sitting in the deployed file, so the source label
# here is informational only, not read by this script.
"desktopenvs/<de>/greetd-regreet/regreet.css|/etc/greetd/regreet.css"
"gtk-themes/cyberqueer/gtk-3.0/gtk.css|/usr/share/themes/cyberqueer/gtk-3.0/gtk.css" "gtk-themes/cyberqueer/gtk-3.0/gtk.css|/usr/share/themes/cyberqueer/gtk-3.0/gtk.css"
"gtk-themes/cyberqueer/gtk-4.0/gtk.css|/usr/share/themes/cyberqueer/gtk-4.0/gtk.css" "gtk-themes/cyberqueer/gtk-4.0/gtk.css|/usr/share/themes/cyberqueer/gtk-4.0/gtk.css"
) )

View File

@ -1,8 +1,12 @@
/* regreet.css Cosmonaut Shell login theme for ReGreet (greetd, Wayland-native) /* regreet.css Cosmonaut Shell 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, which picks THIS file
* via `regreet -s` at STYLE_PROVIDER_PRIORITY_APPLICATION (600) i.e. ON TOP of * (vs. desktopenvs/hyprlua/greetd-regreet/regreet.css's plain skin) based on
* which desktop environment is active on the machine see that script and
* sysupdate.sh's _deploy_greetd() for the resolution logic.
*
* 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 * 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 * 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:

View File

@ -1,7 +1,11 @@
# regreet.toml — cyberqueer-themed ReGreet greeter for greetd (Wayland-native) # regreet.toml — hyprdrive's "Cosmonaut Shell"-themed ReGreet greeter for
# greetd (Wayland-native)
# #
# Deployed to /etc/greetd/regreet.toml by # Deployed to /etc/greetd/regreet.toml by
# setup/modules/optional-Modules/apps/greetd-regreet.sh. # setup/modules/optional-Modules/apps/greetd-regreet.sh, which picks THIS file
# (vs. desktopenvs/hyprlua/greetd-regreet/regreet.toml's plain skin) based on
# which desktop environment is active on the machine — see that script and
# sysupdate.sh's _deploy_greetd() for the resolution logic.
# #
# The cyberqueer look is applied by /etc/greetd/regreet.css (loaded via # The cyberqueer look is applied by /etc/greetd/regreet.css (loaded via
# `regreet -s` at APPLICATION priority, above the base theme). That stylesheet # `regreet -s` at APPLICATION priority, above the base theme). That stylesheet

View File

@ -30,7 +30,7 @@ drawingarea {
} }
.sb-panel { .sb-panel {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 14px 16px; padding: 14px 16px;
@ -50,7 +50,7 @@ drawingarea {
.sb-tabbar { margin-bottom: 4px; margin-right: 64px; } .sb-tabbar { margin-bottom: 4px; margin-right: 64px; }
.sb-tab { .sb-tab {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 16px; border-radius: 16px;
padding: 4px 14px; padding: 4px 14px;
@ -154,7 +154,7 @@ drawingarea {
.sb-lr-toggle, .sb-lr-toggle,
.sb-default-btn { .sb-default-btn {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 14px; border-radius: 14px;
padding: 2px 10px; padding: 2px 10px;
@ -178,8 +178,8 @@ drawingarea {
color: @bg; color: @bg;
} }
.sb-default-btn:checked { .sb-default-btn:checked {
background-color: #34E27A; background-color: @accent;
border-color: #34E27A; border-color: @accent;
color: @bg; color: @bg;
} }
.sb-default-btn:disabled { opacity: 0.85; } .sb-default-btn:disabled { opacity: 0.85; }

View File

@ -30,7 +30,7 @@ drawingarea {
} }
.sb-panel { .sb-panel {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 14px 16px; padding: 14px 16px;
@ -50,7 +50,7 @@ drawingarea {
.sb-tabbar { margin-bottom: 4px; margin-right: 64px; } .sb-tabbar { margin-bottom: 4px; margin-right: 64px; }
.sb-tab { .sb-tab {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 16px; border-radius: 16px;
padding: 4px 14px; padding: 4px 14px;
@ -154,7 +154,7 @@ drawingarea {
.sb-lr-toggle, .sb-lr-toggle,
.sb-default-btn { .sb-default-btn {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 14px; border-radius: 14px;
padding: 2px 10px; padding: 2px 10px;
@ -178,8 +178,8 @@ drawingarea {
color: @bg; color: @bg;
} }
.sb-default-btn:checked { .sb-default-btn:checked {
background-color: #34E27A; background-color: @accent;
border-color: #34E27A; border-color: @accent;
color: @bg; color: @bg;
} }
.sb-default-btn:disabled { opacity: 0.85; } .sb-default-btn:disabled { opacity: 0.85; }

View File

@ -89,22 +89,24 @@ tooltip {
color: #E40046; color: #E40046;
} }
// astal-menu launcher button accent-coloured icon, highlight on hover // astal-menu launcher button purple by default, hot-pink accent on hover
.menu-launcher { .menu-launcher {
color: #E40046; color: #5018dd;
font-size: 15pt; font-size: 15pt;
} }
.menu-launcher:hover { .menu-launcher:hover {
color: #5018dd; color: #E40046;
} }
// notification-history launcher button (mnotifhist) magenta, matches // notification-history launcher button (mnotifhist) purple by default,
// beacon/transmitter-panel's own notification-card accent colour // hot-pink accent on hover or while any notification is cached in history
// (.notif-launcher-active, set in eww.yuck from the notif-active poll)
.notif-launcher { .notif-launcher {
color: #EB00A6; color: #5018dd;
font-size: 15pt; font-size: 15pt;
} }
.notif-launcher:hover { .notif-launcher:hover,
.notif-launcher.notif-launcher-active {
color: #E40046; color: #E40046;
} }

View File

@ -14,6 +14,12 @@
(defpoll battery :interval "2s" (defpoll battery :interval "2s"
"~/.config/scripts/batteryperc") "~/.config/scripts/batteryperc")
; notif-active poll — true while mnotifd's history cache holds any entries
; (survives past whatever's currently on screen). Drives the
; .notif-launcher-active accent highlight above.
(defpoll notif-active :interval "2s"
"~/Dotfiles/desktopenvs/hyprlua/scripts/notif-active-status.sh")
(defwidget bar [monitor_] (defwidget bar [monitor_]
@ -26,9 +32,14 @@
(box :orientation "h" :space-evenly false :halign "start" (box :orientation "h" :space-evenly false :halign "start"
(osk) (osk)
(box :class "music" {"${battery}"}) (box :class "music" {"${battery}"})
(button :class "music menu-launcher" :onclick "~/.config/scripts/menu-toggle.sh toggle top" {""}) (button :class "icon-btn menu-launcher" :valign "center" :width 26 :height 26
; notification-history launcher :orientation "h" :space-evenly false :halign "center"
(button :class "music notif-launcher" :onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"}) :onclick "~/.config/scripts/menu-toggle.sh toggle top" {""})
; notification-history launcher — accent-coloured while any
; notification is cached (notif-active poll below)
(button :class {notif-active == "true" ? "icon-btn notif-launcher notif-launcher-active" : "icon-btn notif-launcher"}
:valign "center" :width 26 :height 26 :orientation "h" :space-evenly false :halign "center"
:onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"})
; Volume slider — 󰓃 icon, drag to adjust, tap to open audio-panel ; Volume slider — 󰓃 icon, drag to adjust, tap to open audio-panel
; (the PipeWire mixer panel — Applications/Output/Input/General tabs) ; (the PipeWire mixer panel — Applications/Output/Input/General tabs)
(metric :label "󰓃 " (metric :label "󰓃 "
@ -184,7 +195,8 @@
; Colour tracks presence (pink accent); the glyph is coffee whenever manually ; Colour tracks presence (pink accent); the glyph is coffee whenever manually
; inhibiting, else the eye when only presence holds it, else the sleep glyph. ; inhibiting, else the eye when only presence holds it, else the sleep glyph.
(defwidget caffeine [] (defwidget caffeine []
(button :class {presence-active == "true" ? "music caffeine-presence" : "music"} (button :class {presence-active == "true" ? "icon-btn caffeine-presence" : "icon-btn"}
:valign "center" :width 26 :height 26 :orientation "h" :space-evenly false :halign "center"
:onclick "~/Dotfiles/desktopenvs/hyprlua/scripts/caffeine.sh" :onclick "~/Dotfiles/desktopenvs/hyprlua/scripts/caffeine.sh"
:tooltip {caffeine-manual == "true" :tooltip {caffeine-manual == "true"
? (presence-active == "true" ? "Caffeine: ON (manual + presence)" : "Caffeine: ON (manual)") ? (presence-active == "true" ? "Caffeine: ON (manual + presence)" : "Caffeine: ON (manual)")

View File

@ -109,21 +109,23 @@ menuitem:hover {
color: #E40046; color: #E40046;
} }
// astal-menu launcher button accent-coloured icon, highlight on hover // astal-menu launcher button purple by default, hot-pink accent on hover
.menu-launcher { .menu-launcher {
color: #E40046; color: #5018dd;
font-size: 15pt; font-size: 15pt;
} }
.menu-launcher:hover { .menu-launcher:hover {
color: #5018dd; color: #E40046;
} }
// notification-history launcher button (mnotifhist) magenta, matches // notification-history launcher button (mnotifhist) purple by default,
// beacon/transmitter-panel's own notification-card accent colour // hot-pink accent on hover or while any notification is cached in history
.notif-launcher { // (.notif-launcher-active, set in eww.yuck from the notif-active poll)
color: #EB00A6; .notif-launcher {
font-size: 15pt; color: #5018dd;
} font-size: 15pt;
.notif-launcher:hover { }
.notif-launcher:hover,
.notif-launcher.notif-launcher-active {
color: #E40046; color: #E40046;
} }

View File

@ -37,6 +37,12 @@
(defpoll battery :interval "2s" (defpoll battery :interval "2s"
"~/Dotfiles/desktopenvs/hyprland/scripts/batteryperc") "~/Dotfiles/desktopenvs/hyprland/scripts/batteryperc")
; notif-active poll — true while mnotifd's history cache holds any entries
; (survives past whatever's currently on screen). Drives the
; .notif-launcher-active accent highlight below.
(defpoll notif-active :interval "2s"
"~/Dotfiles/desktopenvs/hyprlua/scripts/notif-active-status.sh")
; defwidget bar — root bar widget. Uses centerbox to split into three zones: ; defwidget bar — root bar widget. Uses centerbox to split into three zones:
@ -56,8 +62,10 @@
(box :orientation "h" :space-evenly false :halign "start" (box :orientation "h" :space-evenly false :halign "start"
; astal-menu launcher — opens the popup control centre / app drawer ; astal-menu launcher — opens the popup control centre / app drawer
(button :class "music menu-launcher" :onclick "~/.config/scripts/menu-toggle.sh toggle top" {""}) (button :class "music menu-launcher" :onclick "~/.config/scripts/menu-toggle.sh toggle top" {""})
; notification-history launcher — opens mnotifhist ; notification-history launcher — opens mnotifhist; accent-coloured
(button :class "music notif-launcher" :onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"}) ; while any notification is cached (notif-active poll above)
(button :class {notif-active == "true" ? "music notif-launcher notif-launcher-active" : "music notif-launcher"}
:onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"})
; Battery percentage badge — styled as a pill with class "music" ; Battery percentage badge — styled as a pill with class "music"
(box :class "music" {"${battery}"}) (box :class "music" {"${battery}"})
; Workspace dots — one button per active workspace on this monitor ; Workspace dots — one button per active workspace on this monitor

View File

@ -0,0 +1,259 @@
/* regreet.css hyprlua's plain CyberQueer login theme for ReGreet (greetd,
* Wayland-native): flat @bg-filled cards with a @violet border, no
* hologram/glow treatment. Mirrors the rest of hyprlua's "plain" theme set
* (mnotifd-theme, mnotifhist-theme, audio-panel-theme, astal-menu) solid
* fills instead of translucent glass, no box-shadow glow, no scanline/gradient
* overlays, no hardcoded "Cosmonaut" magenta/cyan just the five shared
* palette colours, @accent on hover/focus/active.
*
* Deployed to /etc/greetd/regreet.css by
* setup/modules/optional-Modules/apps/greetd-regreet.sh, which picks THIS
* file (vs. desktopenvs/hyprdrive/greetd-regreet/regreet.css's "Cosmonaut
* Shell" skin) based on which desktop environment is active on the machine
* see that script and sysupdate.sh's _deploy_greetd() for the resolution
* logic.
*
* 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.
*
* The five PALETTE hexes below (bg/text/accent/violet/danger) 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.
*
* 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_accent #E40046; /* hot-pink accent (apply-theme) */
@define-color cq_violet #5018DD; /* electric violet (apply-theme) */
@define-color cq_danger #F50505; /* hi-vis danger red (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_text;
font-family: "Agave Nerd Font Mono", "JetBrains Mono", monospace;
}
/* Cards: the login frame and the clock frame both carry `.background`
* Flat fill, no glass/glow a solid card with a 2px violet border, same
* idiom as astal-menu's .quad-settings / mnotifd's .mnotifd-card. */
frame.background {
background-color: @cq_bg;
color: @cq_text;
border: 2px solid @cq_violet;
border-radius: 16px;
padding: 12px 18px;
}
/* The clock card sits flush on the top edge (ReGreet flattens its top corners
* via inline_css at priority 800, which wins over this). Plain HUD readout,
* no text-shadow glow. */
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_text;
}
/* ── Text & labels inside the login card ─────────────────────────────────── */
frame.background > grid > label {
color: @cq_text;
margin: 0 6px;
}
/* ── Entries: username / session / password ──────────────────────────────── */
entry,
entry.password {
background-color: @cq_bg;
color: @cq_text;
caret-color: @cq_accent;
border: 2px solid @cq_violet;
border-radius: 11px;
padding: 8px 12px;
min-height: 34px;
}
entry image,
entry.password image { /* the peek-password / clear icons */
color: @cq_text;
}
entry:focus-within,
entry.password:focus-within {
border-color: @cq_accent;
}
entry selection {
background-color: @cq_accent;
color: @cq_bg;
}
/* ── Combo boxes: user + session pickers render as `combobox > button` ───── */
combobox > button.combo {
background-color: @cq_bg;
color: @cq_text;
border: 2px solid @cq_violet;
border-radius: 11px;
padding: 6px 12px;
min-height: 34px;
}
combobox > button.combo:hover {
border-color: @cq_accent;
color: @cq_accent;
}
combobox arrow {
color: @cq_text;
min-height: 16px;
min-width: 16px;
}
combobox popover contents {
background-color: @cq_bg;
border: 2px solid @cq_violet;
border-radius: 11px;
}
combobox popover contents :selected {
background-color: @cq_accent;
color: @cq_bg;
}
/* ── Buttons ─────────────────────────────────────────────────────────────── */
button {
color: @cq_text;
background-color: @cq_bg;
border: 2px solid @cq_violet;
border-radius: 11px;
padding: 8px 18px;
min-height: 34px;
}
button:hover {
border-color: @cq_accent;
color: @cq_accent;
}
button:active {
background-color: @cq_violet;
color: @cq_bg;
}
/* Manual-entry toggles (pencil icons) — quieter, icon-only */
button.toggle {
background-color: transparent;
border-color: @cq_violet;
padding: 6px;
}
button.toggle:checked {
background-color: @cq_bg;
border-color: @cq_accent;
color: @cq_accent;
}
/* Primary action: Login. The `window` prefix (specificity 0,1,2) and
* `background-image: none` beat Adwaita's own accent styling. Solid accent
* fill the same "pressed pill" idiom as astal-menu's
* .quad-action:active / mnotifd-toggle:checked, no glow. */
window button.suggested-action {
background-image: none;
background-color: @cq_accent;
color: @cq_bg;
border: 2px solid @cq_accent;
font-weight: 700;
}
window button.suggested-action:hover {
background-color: @cq_violet;
border-color: @cq_violet;
color: @cq_bg;
}
window button.suggested-action:active {
background-color: @cq_bg;
color: @cq_accent;
border-color: @cq_accent;
}
/* Destructive actions: Reboot / Power Off — quiet red outline, filled on hover */
window button.destructive-action {
background-image: none;
background-color: transparent;
color: @cq_text;
border: 2px solid @cq_danger;
}
window button.destructive-action:hover {
background-color: @cq_danger;
color: @cq_bg;
}
/* ── PAM notification bar ────────────────────────────────────────────────── */
infobar {
background: transparent;
border: none;
box-shadow: none;
}
infobar > revealer > box {
background-color: @cq_bg;
color: @cq_text;
border: 2px solid @cq_violet;
border-radius: 11px;
}
infobar.error > revealer > box {
border-color: @cq_danger;
}
infobar label {
color: @cq_text;
padding: 6px 12px;
}
/* ── Tooltips (hover hints on the toggle buttons) ────────────────────────── */
tooltip {
background-color: @cq_bg;
color: @cq_text;
border: 2px solid @cq_violet;
border-radius: 9px;
padding: 4px 8px;
}

View File

@ -0,0 +1,52 @@
# regreet.toml — hyprlua's plain CyberQueer ReGreet greeter for greetd
# (Wayland-native)
#
# Deployed to /etc/greetd/regreet.toml by
# setup/modules/optional-Modules/apps/greetd-regreet.sh, which picks THIS file
# (vs. desktopenvs/hyprdrive/greetd-regreet/regreet.toml's "Cosmonaut Shell"
# skin) based on which desktop environment is active on the machine — see
# that script and sysupdate.sh's _deploy_greetd() for the resolution logic.
#
# The look is applied by /etc/greetd/regreet.css (loaded via `regreet -s` at
# APPLICATION priority, above the base theme). That stylesheet is the
# greeter's own self-contained CyberQueer skin — we do NOT reuse the desktop
# `cyberqueer` GTK theme, whose `* { all: unset }` reset is tuned for
# waybar/eww/Thunar and would strip a login card's layout. `theme_name` below
# is therefore just a clean, predictable widget base (Adwaita-dark) for the
# CSS to paint on. Being a wlroots/Wayland greeter, ReGreet drives every
# monitor natively (no blank outputs) and hands input straight to the Wayland
# session with no Xorg→Wayland VT handover.
# Remember the last user + session and skip the pickers.
skip_selection = false
[background]
# Tracks the user's current desktop wallpaper: the picker writes
# ~/.config/hypr/usr/wallpaper.conf and the lightdm-greeter-wallpaper.path unit
# copies the chosen image here (a path the unprivileged greeter can read).
path = "/usr/share/backgrounds/lightdm-greeter-bg.png"
fit = "Cover"
[GTK]
application_prefer_dark_theme = true
cursor_theme_name = "Adwaita"
cursor_blink = true
# 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.
font_name = "Agave Nerd Font Mono 15"
icon_theme_name = "Adwaita"
# Clean base for regreet.css to paint on (see header). The CyberQueer colours
# live in /etc/greetd/regreet.css, not in this theme.
theme_name = "Adwaita"
[commands]
reboot = ["systemctl", "reboot"]
poweroff = ["systemctl", "poweroff"]
[appearance]
greeting_msg = "Sign in"
[widget.clock]
format = "%H:%M"
resolution = "1s"
label_width = 150

View File

@ -34,7 +34,7 @@ drawingarea {
/* the card */ /* the card */
.mnotifd-card { .mnotifd-card {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 12px 14px; padding: 12px 14px;
@ -71,7 +71,7 @@ drawingarea {
/* action pills */ /* action pills */
.mnotifd-action { .mnotifd-action {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
padding: 2px 12px; padding: 2px 12px;
@ -92,7 +92,7 @@ drawingarea {
} }
.mnotifd-toggle { .mnotifd-toggle {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
min-width: 40px; min-width: 40px;
@ -108,7 +108,7 @@ drawingarea {
} }
.mnotifd-slider trough { .mnotifd-slider trough {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
min-height: 8px; min-height: 8px;
@ -127,7 +127,7 @@ drawingarea {
.mnotifd-entry { .mnotifd-entry {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 2px 10px; padding: 2px 10px;

View File

@ -34,7 +34,7 @@ drawingarea {
/* the card */ /* the card */
.mnotifd-card { .mnotifd-card {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 12px 14px; padding: 12px 14px;
@ -71,7 +71,7 @@ drawingarea {
/* action pills */ /* action pills */
.mnotifd-action { .mnotifd-action {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
padding: 2px 12px; padding: 2px 12px;
@ -92,7 +92,7 @@ drawingarea {
} }
.mnotifd-toggle { .mnotifd-toggle {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
min-width: 40px; min-width: 40px;
@ -108,7 +108,7 @@ drawingarea {
} }
.mnotifd-slider trough { .mnotifd-slider trough {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
min-height: 8px; min-height: 8px;
@ -127,7 +127,7 @@ drawingarea {
.mnotifd-entry { .mnotifd-entry {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 2px 10px; padding: 2px 10px;

View File

@ -29,7 +29,7 @@ drawingarea {
} }
.tx-panel { .tx-panel {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 14px 16px; padding: 14px 16px;
@ -46,7 +46,7 @@ drawingarea {
.tx-clear-all { .tx-clear-all {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
padding: 4px 14px; padding: 4px 14px;

View File

@ -29,7 +29,7 @@ drawingarea {
} }
.tx-panel { .tx-panel {
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 12px; border-radius: 12px;
padding: 14px 16px; padding: 14px 16px;
@ -46,7 +46,7 @@ drawingarea {
.tx-clear-all { .tx-clear-all {
color: @text; color: @text;
background-color: @violet; background-color: @bg;
border: 2px solid @violet; border: 2px solid @violet;
border-radius: 20px; border-radius: 20px;
padding: 4px 14px; padding: 4px 14px;

View File

@ -0,0 +1,14 @@
#!/bin/bash
# Reports whether mnotifd's notification history currently holds any cached
# entries (persists across dismissed/expired cards — see mnotifd/history.py's
# HISTORY_FILE), not just whatever's live on screen right now.
#
# Prints "true" while at least one entry is cached, else "false".
HISTORY_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/mnotifd/history.json"
if [[ -s "$HISTORY_FILE" ]] && jq -e 'length > 0' "$HISTORY_FILE" >/dev/null 2>&1; then
echo "true"
else
echo "false"
fi

View File

@ -1,9 +1,8 @@
#!/bin/bash #!/bin/bash
# FIDO key presence detection daemon. # FIDO key presence detection daemon.
# Checks whether a FIDO2/U2F security key is plugged in, at an adaptive # Checks whether a FIDO2/U2F security key is plugged in, every 20s flat, and
# interval (20s under light load, 120s under moderate load, 600s under heavy # shares caffeine's systemd-inhibit idle lock while a key is present, so
# load), and shares caffeine's systemd-inhibit idle lock while a key is # hypridle never fires during an active session.
# present, so hypridle never fires during an active session.
# #
# Detection: `fido2-token -L` (libfido2) enumerates connected FIDO CTAP # Detection: `fido2-token -L` (libfido2) enumerates connected FIDO CTAP
# devices by USB HID usage page — no touch/tap required, so this is a pure # devices by USB HID usage page — no touch/tap required, so this is a pure
@ -25,12 +24,7 @@ OWNED_FLAG="/tmp/presence-inhibit-owned"
# stays live even then — only the inhibit ownership differs. # stays live even then — only the inhibit ownership differs.
PRESENCE_FLAG="/tmp/presence-detected" PRESENCE_FLAG="/tmp/presence-detected"
INTERVAL_LIGHT=20 # seconds between checks when CPU-or-RAM usage < LOAD_LIGHT INTERVAL=20 # seconds between checks, flat regardless of system load
INTERVAL_MID=120 # seconds between checks when usage is between the two thresholds
INTERVAL_HEAVY=600 # seconds between checks when usage >= LOAD_HEAVY
LOAD_LIGHT=0.20 # CPU-or-RAM fraction below which we poll at INTERVAL_LIGHT
LOAD_HEAVY=0.50 # CPU-or-RAM fraction at/above which we back off to INTERVAL_HEAVY
NPROC="$(nproc)"
# True if any FIDO2/U2F authenticator is currently enumerable over USB. # True if any FIDO2/U2F authenticator is currently enumerable over USB.
# fido2-token -L lists one line per connected device and needs no PIN, touch, # fido2-token -L lists one line per connected device and needs no PIN, touch,
@ -39,29 +33,6 @@ _fido_key_present() {
[[ -n "$(fido2-token -L 2>/dev/null)" ]] [[ -n "$(fido2-token -L 2>/dev/null)" ]]
} }
# Prints current CPU-or-RAM usage as a fraction (0..1): the higher of the
# core-count-normalized 1-minute load average and the used-RAM fraction. Load
# average is a cheap, sampling-free proxy for "CPU busy" — no extra measurement
# delay per tick.
_resource_usage() {
local load1 cpu_frac mem_frac
load1="$(awk '{print $1}' /proc/loadavg)"
cpu_frac="$(awk -v l="$load1" -v n="$NPROC" 'BEGIN{print l/n}')"
mem_frac="$(free | awk '/^Mem:/ {print $3/$2}')"
awk -v c="$cpu_frac" -v m="$mem_frac" 'BEGIN{print (c>m)?c:m}'
}
# Three-tier poll interval based on current resource usage:
# >= LOAD_HEAVY -> INTERVAL_HEAVY (heavy load: back off, stay out of the way)
# < LOAD_LIGHT -> INTERVAL_LIGHT (near-idle: poll fast, cheap and responsive)
# otherwise -> INTERVAL_MID (moderate load)
_next_interval() {
local u; u="$(_resource_usage)"
awk -v u="$u" -v heavy="$LOAD_HEAVY" -v light="$LOAD_LIGHT" \
-v fh="$INTERVAL_HEAVY" -v fl="$INTERVAL_LIGHT" -v fm="$INTERVAL_MID" \
'BEGIN{ if (u >= heavy) print fh; else if (u < light) print fl; else print fm }'
}
# Returns true if the inhibitor sentinel process is still alive. # Returns true if the inhibitor sentinel process is still alive.
_inhibit_running() { _inhibit_running() {
[[ -f "$PID_FILE" ]] && kill -0 "$(cat "$PID_FILE")" 2>/dev/null [[ -f "$PID_FILE" ]] && kill -0 "$(cat "$PID_FILE")" 2>/dev/null
@ -122,5 +93,5 @@ while true; do
_stop_inhibit _stop_inhibit
fi fi
sleep "$(_next_interval)" sleep "$INTERVAL"
done done

View File

@ -8,10 +8,13 @@
# wlroots (inside a cage kiosk), so it drives every output natively and hands # wlroots (inside a cage kiosk), so it drives every output natively and hands
# input straight to the Wayland session — none of those failure modes. # input straight to the Wayland session — none of those failure modes.
# #
# The CyberQueer login look is a self-contained stylesheet (etc-greetd/regreet.css, # The CyberQueer login look is a self-contained stylesheet (regreet.css, loaded
# loaded by ReGreet over an Adwaita-dark base). The greeter background tracks the # by ReGreet over an Adwaita-dark base) — picked per-DE from
# wallpaper picker's choice, mirrored to a greeter-readable path by the # desktopenvs/<de>/greetd-regreet/ (see resolve_de_dir below), so hyprdrive's
# lightdm-greeter-wallpaper.path unit (shared, greeter-agnostic despite the name). # glowy "Cosmonaut Shell" skin doesn't get applied on a hyprlua machine (or
# vice versa). The greeter background tracks the wallpaper picker's choice,
# mirrored to a greeter-readable path by the lightdm-greeter-wallpaper.path
# unit (shared, greeter-agnostic despite the name).
# #
# Mutually exclusive with the lightdm and ly greeter modules: enabling greetd # Mutually exclusive with the lightdm and ly greeter modules: enabling greetd
# here disables the others and the tty1 getty so exactly one greeter runs. # here disables the others and the tty1 getty so exactly one greeter runs.
@ -21,9 +24,42 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
# apps/ → optional-Modules → modules → setup → repo root (four levels up). # apps/ → optional-Modules → modules → setup → repo root (four levels up).
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)" DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
ETC_GREETD="$DOTFILES_DIR/etc-greetd" ETC_GREETD="$DOTFILES_DIR/etc-greetd" # shared infra: config.toml, session script
ETC_LIGHTDM="$DOTFILES_DIR/etc-lightdm" # shared wallpaper-sync helper + units ETC_LIGHTDM="$DOTFILES_DIR/etc-lightdm" # shared wallpaper-sync helper + units
# The greeter's VISUAL skin (regreet.toml + regreet.css) is per-DE — hyprdrive's
# "Cosmonaut Shell" (translucent glass, glow, scanlines) and hyprlua's plain
# flat skin are different files under desktopenvs/<de>/greetd-regreet/. Resolve
# which DE this machine is actually running the same way sysupdate.sh's
# _de_source_dir() does: the installed config-updater's SOURCE_BASE is the
# authoritative marker (set by each DE's installer), with a running-session
# fallback for a machine that hasn't installed config-updater yet.
resolve_de_dir() {
local conf="${XDG_CONFIG_HOME:-$HOME/.config}/config-updater/updater.conf"
if [[ -f "$conf" ]]; then
local src
src=$(awk -F'[[:space:]]*=[[:space:]]*' '/^SOURCE_BASE/{print $2; exit}' "$conf")
src="${src/#\~/$HOME}"
[[ -d "${src:-}" ]] && { printf '%s' "$src"; return; }
fi
if [[ -n "${HYPRLAND_INSTANCE_SIGNATURE:-}" ]] && pgrep -x niri &>/dev/null; then
printf '%s' "$DOTFILES_DIR/desktopenvs/niri"
elif pgrep -x Hyprland &>/dev/null || [[ -n "${HYPRLAND_INSTANCE_SIGNATURE:-}" ]]; then
printf '%s' "$DOTFILES_DIR/desktopenvs/hyprlua"
fi
}
DE_DIR="$(resolve_de_dir)"
if [[ -n "$DE_DIR" && -d "$DE_DIR/greetd-regreet" ]]; then
GREETER_SKIN="$DE_DIR/greetd-regreet"
log "Using ${GREETER_SKIN#$DOTFILES_DIR/} for the greeter skin (detected DE: $(basename "$DE_DIR"))."
else
# No DE-specific skin (niri/sway/legacy hyprland) — fall back to
# hyprdrive's, the original/default look this module has always shipped.
GREETER_SKIN="$DOTFILES_DIR/desktopenvs/hyprdrive/greetd-regreet"
warn "No greeter skin for detected DE (${DE_DIR:-unknown}) — falling back to hyprdrive's."
fi
log "Installing greetd + ReGreet + cage..." log "Installing greetd + ReGreet + cage..."
sudo pacman -S --noconfirm --needed greetd greetd-regreet cage sudo pacman -S --noconfirm --needed greetd greetd-regreet cage
@ -53,8 +89,8 @@ fi
# ── Deploy greetd + ReGreet configuration ───────────────────────────────────── # ── Deploy greetd + ReGreet configuration ─────────────────────────────────────
log "Deploying greetd config, ReGreet config, and session launcher..." log "Deploying greetd config, ReGreet config, and session launcher..."
sudo install -Dm644 "$ETC_GREETD/config.toml" /etc/greetd/config.toml sudo install -Dm644 "$ETC_GREETD/config.toml" /etc/greetd/config.toml
sudo install -Dm644 "$ETC_GREETD/regreet.toml" /etc/greetd/regreet.toml sudo install -Dm644 "$GREETER_SKIN/regreet.toml" /etc/greetd/regreet.toml
sudo install -Dm644 "$ETC_GREETD/regreet.css" /etc/greetd/regreet.css sudo install -Dm644 "$GREETER_SKIN/regreet.css" /etc/greetd/regreet.css
sudo install -Dm755 "$ETC_GREETD/regreet-session.sh" /etc/greetd/regreet-session.sh sudo install -Dm755 "$ETC_GREETD/regreet-session.sh" /etc/greetd/regreet-session.sh
# ── PAM: password (system-login) + required FIDO/U2F touch ──────────────────── # ── PAM: password (system-login) + required FIDO/U2F touch ────────────────────

View File

@ -670,14 +670,27 @@ _redeploy_usr_configs() {
# Only when greetd is the active greeter on this machine. Uses the sudo credential # Only when greetd is the active greeter on this machine. Uses the sudo credential
# primed once at startup, so it doesn't re-prompt. PAM is intentionally left to the # primed once at startup, so it doesn't re-prompt. PAM is intentionally left to the
# setup module — a bad PAM file could lock out login. # setup module — a bad PAM file could lock out login.
#
# regreet.toml/regreet.css (the VISUAL skin) are per-DE — hyprdrive's glowy
# "Cosmonaut Shell" and hyprlua's plain flat skin are different files under
# desktopenvs/<de>/greetd-regreet/. Resolve via _de_source_dir() (same helper
# _ensure_astal_menu_deps() etc. use) so this machine's actual DE keeps its own
# skin instead of always being overwritten with whichever one used to be the
# only option. config.toml/regreet-session.sh have no DE-specific styling, so
# they stay shared at etc-greetd/.
_deploy_greetd() { _deploy_greetd() {
local src="$DOTFILES/etc-greetd" local src="$DOTFILES/etc-greetd"
[[ -d "$src" ]] || return 0 [[ -d "$src" ]] || return 0
systemctl is-enabled greetd.service &>/dev/null || return 0 systemctl is-enabled greetd.service &>/dev/null || return 0
log "Deploying greetd / ReGreet config to ${BO}/etc/greetd${RS}..."
local de_dir; de_dir=$(_de_source_dir)
local skin="$DOTFILES/desktopenvs/hyprdrive/greetd-regreet" # default/fallback
[[ -n "${de_dir:-}" && -d "$de_dir/greetd-regreet" ]] && skin="$de_dir/greetd-regreet"
log "Deploying greetd / ReGreet config to ${BO}/etc/greetd${RS} (skin: ${skin#"$DOTFILES"/})..."
sudo install -Dm644 "$src/config.toml" /etc/greetd/config.toml && \ sudo install -Dm644 "$src/config.toml" /etc/greetd/config.toml && \
sudo install -Dm644 "$src/regreet.toml" /etc/greetd/regreet.toml && \ sudo install -Dm644 "$skin/regreet.toml" /etc/greetd/regreet.toml && \
sudo install -Dm644 "$src/regreet.css" /etc/greetd/regreet.css && \ sudo install -Dm644 "$skin/regreet.css" /etc/greetd/regreet.css && \
sudo install -Dm755 "$src/regreet-session.sh" /etc/greetd/regreet-session.sh && \ sudo install -Dm755 "$src/regreet-session.sh" /etc/greetd/regreet-session.sh && \
ok "greetd config deployed" || warn "greetd config deploy had errors" ok "greetd config deployed" || warn "greetd config deploy had errors"
} }