Commit Graph

155 Commits (3b6cdb8dbd74ad8d2464ad868f1a992413fd7b27)

Author SHA1 Message Date
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
Amir Alexander Abdelbaki c16a17f10b feat(hyprlua,hyprdrive,niri): switch presence detection from webcam motion to FIDO key
Replace the OpenCV motion-detection daemon with a fido2-token -L check —
presence now means "a FIDO2/U2F key is plugged in", queried without any
touch/tap. Adaptive poll: 20s under light load, 120s under moderate,
600s under heavy. Drops the old motion "grace window" since key presence
doesn't flicker like camera motion did.

Removes presence_detect.py, the presence camera config/test flow from
enroll-biometrics.sh, and the python-opencv dependency (kept v4l-utils,
still used by howdy's camera setup). Adds a standalone presence-test.sh
instead of folding the FIDO check into enroll-biometrics.sh's dialog TUI —
there's nothing to enroll, so it doesn't belong in that flow.
2026-07-30 13:22:38 +02:00
Amir Alexander Abdelbaki 72e0fa8edc fix(hyprdrive,hyprlua): keep the last tab clear of the floating close button
.sb-tabbar now reserves 64px on the right, the same way .sb-header already
does for the title: the ✕ is a Gtk.Overlay child, so it claims no layout
space and the tab row grew straight under it once the row got wide enough
(the "General Settings" pill was overlapping the button's circle).

Also documents, next to `config vicinae` in hyprdrive's updater.conf, that
the cosmonaut.toml this deploys to ~/.config/vicinae/ is inert — vicinae only
reads named themes from ~/.local/share/vicinae/themes/, and silently falls
back to its default grey theme when the file isn't there. That is exactly
what happened on this machine: the theme was added after hyprdrive.sh last
ran, so the launcher had been rendering the stock grey palette.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 18:41:56 +02:00
Amir Alexander Abdelbaki f500dd550e feat(hyprdrive,hyprlua): vertical mixer meters with the live peak column inside the fill
The per-channel volume meters are now vertical faders (Gtk.Scale, inverted so
loud is up) instead of horizontal sliders, and the live peak indicator moved
out of its own bar above the card into the meter itself: a narrow violet
column Cairo-drawn inside the trough, so one glance reads both "what the
volume is set to" (the fill) and "what is actually reaching the mix" (the
column inside it).

  - ui/peakbar.py is a DrawingArea rather than a Gtk.LevelBar: it has to grow
    bottom-to-top over the same span as the scale's highlight, minus the
    half-slider inset, and it sits in a Gtk.Overlay with can_target=False so
    the scale underneath still gets every click and drag.
  - ui/meter.py draws the value as its own label and drops the 100% mark;
    either one would push the trough off-centre under the overlaid column.
    The channel label is always appended (empty for mono) so a lone meter and
    a split L/R pair keep the same trough height inside the card's stack.
  - ui/card_base.py fans one peak monitor out to every meter of the card —
    parec reports one mixed level per target, not a per-channel one.
  - The trough's empty portion is transparent now (an idle meter and a silent
    monitor both read as "nothing here"), and supersonic-booster's fill gets
    the suite's emitted-magenta glow. Both stylesheets re-assert the
    transparent background at class specificity: the CyberQueer theme's
    `* { background-color: #1a1a1a }` was otherwise painting a dark stripe
    straight through the fill where the peak column sits.

hyprlua's audio-panel is regenerated via regen-audio-panel.sh; its plain
stylesheet stays flat and glow-free by design, with @accent as the fill.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 18:22:52 +02:00
Amir Alexander Abdelbaki 55d443ecdb feat(hyprdrive,hyprlua): add a Cards tab, move profile switching off device cards
Adds a fifth mixer tab, Cards: one row per pactl card (onboard audio, USB
headsets, HDMI, Bluetooth) with just its profile dropdown (Analog Stereo
Duplex, Pro Audio, Off, etc.).

Profile is a card-level setting, not a per-device one — a single card can
back a device in both Output and Input Devices at once, and switching its
profile can make either side appear or disappear entirely. It used to live
on individual DeviceCards in both tabs, which was confusing (same card,
edited from two places) and is exactly what pavucontrol avoids by giving
profiles their own "Configuration" tab. Pulled it out of DeviceCard/
OutputTab/InputTab (which also drops their now-unneeded list_cards() fetch)
and into a new ui/profile_card.py + ui/cards_tab.py.

hyprlua's audio-panel picks this up via regen-audio-panel.sh, unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TkkH9eiCBfpWysUXAD9bDG
2026-07-29 16:55:29 +02:00
Amir Alexander Abdelbaki ed43cd2ac7 feat(hyprdrive,hyprlua): mirror output-device dropdown with input-device on Applications tab
Each app card in the mixer panel's Applications tab now also shows an Input
dropdown next to Output, letting you re-route that app's own microphone
stream (pactl move-source-output) the same way Output already re-routes its
playback stream. Matches an app's sink-input to its source-output via
application.process.binary (falling back to name) — the same client tags
both when an app plays and records, e.g. Discord. Apps with no matching
recording stream get the dropdown disabled rather than hidden, so card
layout stays consistent across the row.

hyprlua's audio-panel picks this up via regen-audio-panel.sh, unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TkkH9eiCBfpWysUXAD9bDG
2026-07-29 16:42:07 +02:00
Amir Alexander Abdelbaki 516adeb5ae fix(hyprdrive,hyprlua): anchor the audio mixer panel top-right and shrink it
Layer-shell surfaces can only anchor to a screen edge with a margin, not to
another process's widget, so this can't truly follow the invoking volume
button — but every bar variant in this repo (station-bar, eww/eww-touch/
eww-nobattery) keeps its volume control in the top-right zone, so anchoring
there approximates "under the control that opened it" well enough. Also
shrunk the panel (900px -> 460px, smaller cards/meters/tab height) so it
reads as a compact popover instead of a full-width mixer.

hyprlua's audio-panel is regenerated via regen-audio-panel.sh; its
hand-maintained plain theme seed (audio-panel-theme/style.css) got the same
sizing tweaks by hand since the regen script doesn't touch it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TkkH9eiCBfpWysUXAD9bDG
2026-07-29 16:04:41 +02:00
Amir Alexander Abdelbaki bda4640b54 feat(hyprdrive,hyprlua): add supersonic-booster/audio-panel PipeWire mixer panel
A new layer-shell mixer panel with four tabs (Applications / Input Devices /
Output Devices / General Settings): per-app and per-device volume meters with
an independent left/right toggle, mute, live parec-based amplitude bars (so a
silent stream is visually distinct from a quiet one), output-device routing,
card profile switching (pro-audio vs stereo duplex etc.), and default-device
pickers. Backed by pactl -f json + pactl subscribe over pipewire-pulse
(verified against this box's real pactl; wpctl was dropped for lacking
per-channel volume and profile verbs).

hyprdrive gets the hologram-styled original (supersonic-booster); hyprlua's
plain-themed audio-panel is generated by a new
desktopenvs/hyprlua/scripts/regen-audio-panel.sh, extending the existing
regen-beacon.sh derivation pattern rather than hand-duplicating the app.

Wired into both DEs: Super+Shift+S keybind, autostart, config-updater,
apply-theme.sh, and the respective bars (station-bar's volume badge now opens
the panel; eww/eww-touch/eww-nobattery's volume slider does too, replacing
the old pavucontrol launch).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TkkH9eiCBfpWysUXAD9bDG
2026-07-29 15:41:57 +02:00
Amir Alexander Abdelbaki b92a43c8ea fix(hyprlua,hyprdrive): float/center the xdg-desktop-portal-hyprland share picker
Discord's screen-share source picker wasn't matching the modal-dialog
windowrules and tiled instead of floating. It's the Qt "hyprland-share-picker"
binary, which sets its app_id/class via
QCoreApplication::setApplicationName("org.hyprland.xdg-desktop-portal-hyprland")
— neither the GTK portal-dialog rule (different class) nor the title-based
dialog-float rule (title doesn't match) catches it. Added a dedicated rule
matching that class with the same float+center-on-monitor treatment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 08:40:20 +02:00
Amir Alexander Abdelbaki 3f05f64281 feat(hyprdrive,hyprlua): trap pointer to focused window in monocle (super+ctrl+f)
Monocle now also confines the cursor to the focused full-size window so it
can't slip onto another monitor. Hyprland has no cursor-confine dispatcher, so
this drives the confine_pointer window rule: one lazily-created rule per
workspace, matched by workspace id (follows focus), enabled/disabled in
lock-step with the monocle toggle and refreshed immediately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 17:35:00 +02:00
Amir Alexander Abdelbaki 967af1c0f2 feat(hyprlua): configurable/live-polled workspace layout picker in astal-menu
Ports hyprdrive's astro-menu update to astal-menu (hand-maintained separately,
no regen script for this pair): a new config.py with a "layouts" key to
narrow/reorder which hypr/layouts-discovered layouts are offered and override
their per-layout options, plus 1s polling of the taskbar's workspace/layout
panel while the menu is open so it doesn't go stale across workspace
switches. No hologram code path here since astal-menu doesn't have one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 15:14:30 +02:00
Amir Alexander Abdelbaki 008e4d980c feat(hyprdrive,hyprlua): notification action buttons for timer/screenrec
timer-run now offers Dismiss/Snooze 2m/Snooze 5m buttons via notify-send -A
(beacon/mnotifd both implement the freedesktop Actions spec) and rings the
alarm on a loop until the notification resolves, instead of playing once and
going silent.

screenrec.sh gets a real "Stop Recording" button in the same vein, replacing
a broken anonymous --action= and a `$nid=` assignment bug that never actually
captured the notification id; also fixes hyprlua's stale `dunstctl close`
call left over from the mnotifd migration (dunst is no longer running).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 15:06:55 +02:00
Amir Alexander Abdelbaki 9640e09677 feat(hyprlua): migrate to mnotifd/mnotifhist, generated from hyprdrive's beacon
Adds regen-beacon.sh, a by-hand generator that produces hyprlua's plain-themed
notification daemon (mnotifd) and history viewer (mnotifhist) from hyprdrive's
beacon/transmitter-panel sources — stripping the Cosmonaut Shell hologram/
squiggle sci-fi treatment (now config-toggleable on beacon itself) and
renaming every beacon/transmitter-panel reference throughout, so future edits
to the hyprdrive originals propagate with one script run instead of two
hand-diverging copies. Wires mnotifd/mnotifhist into hyprlua in place of
dunst (autostart, keybinds, config-updater, install script incl. the D-Bus
activation shadow file).

Also adds a notification-history launcher button (verified bell glyph) to
station-bar and all three hyprlua EWW bar variants.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 12:34:19 +02:00
Amir Alexander Abdelbaki ba12c31e3e feat(hypr): rework Super+E/F binds, add magnifier zoom and monocle toggle
Super+E now toggles cursor "glass magnifier" zoom (wiki trick); Thunar
moves to Super+Shift+E and the pcmanfm-qt alt bind is dropped. Super+Alt+F
drops the calculator launch in favor of a real fullscreen toggle, and
Super+Ctrl+F is added to toggle the workspace's "monocle" layout via the
existing layouts registry. Also inlines unified-rotate.sh cw/ccw directly
in the Super+Ctrl+E/D rotation binds instead of going through the
confusingly-named (and reversed) screenrotationwcw/acw.sh wrapper scripts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 10:49:59 +02:00
Amir Alexander Abdelbaki f040cac729 feat(hypr): float dialog-like windows at cursor, minimum size
Add a `dialog-float` window rule to both hyprdrive and hyprlua: float any
window whose title looks like a dialog (Rename/Save/Open/Opening/Confirm/
Delete/Move/Copy/Replace/Properties/Preferences — covers file-manager rename
dialogs and Firefox "Opening <file>" download prompts), centred on the cursor
at its natural (minimum) size. Catches dialogs that carry no xdg/X11 dialog
hint and would otherwise tile; Hyprland still auto-floats the ones that do.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 20:49:04 +02:00
Amir Alexander Abdelbaki dce26b2dcf feat(terminals): deploy CyberQueer palette across kitty/alacritty everywhere
hyprland's kitty theme was still the stock template (only 5 colors set,
ANSI colors commented out); brought it in line with hyprdrive/hyprlua's
full neon 16-color palette and dropped the now-redundant inline cursor
overrides in kitty.conf. Alacritty had no color scheme at all in any DE,
so added matching [colors] blocks to hyprdrive/hyprlua/hyprland so it
renders identically to kitty/ghostty. Registered alacritty.toml and
ghostty/config in apply-theme.sh so future colors.conf edits propagate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-20 10:01:35 +02:00
Amir Alexander Abdelbaki 2d7336c593 feat(hyprlua/kitty): finish the CyberQueer kitty theme
Same fix as hyprdrive's kitty (6c07c10): the 16 ANSI colors were still
stock template defaults clashing with the violet/crimson palette used
everywhere else in the suite. Fill them in from colors.conf plus a
few new neon tints in the same hue family, set background to the
real #1A1A1A instead of pure black, add matching border/bell/mark
colors, and drop the stale cursor-color pair in kitty.conf that the
theme include was silently overriding anyway.
2026-07-20 08:56:52 +02:00
Amir Alexander Abdelbaki 9d59565469 revert(hyprlua): remove Cosmonaut Shell components, restore pre-Friday state
orbit-menu and horizon-dock (and their eww-bar launcher buttons, autostart
hooks, and O-bind wrapping) were built inside hyprlua before hyprdrive
existed as a separate DE. hyprdrive is now the home for the full Cosmonaut
Shell suite, so hyprlua drops back to eww bars + vicinae launcher + the
astal-menu pop-open menu, unchanged, matching last Thursday's state.
hyprdrive itself is untouched.
2026-07-20 08:37:12 +02:00
Amir Alexander Abdelbaki 90375a5733 feat(hyprdrive): add hyprdrive DE with full Cosmonaut Shell suite
New leaner Hyprland DE (setup/modules/Desktop-Environments/hyprdrive.sh),
a sibling of hyprlua that drops the older EWW/nwg-shell/wofi/walker/
ulauncher stack in favor of a purpose-built, GTK4 layer-shell component
suite sharing one CyberQueer hologram visual language:

- orbit-menu    radial power/utility menu (focal-point zoom nav, holographic
                overlay, cosmetic satellites)
- horizon-dock  hover-scrollable orbital app dock (open windows/favorites/
                all apps orbits, SNI tray satellite)
- astro-menu    astal-menu re-themed as a hologram info display (Location/
                Weather/Bluetooth/Network quads, taskbar, app drawer)
- station-bar   the EWW top bar's replacement ("Voidstation Status Bar"):
                a thin curved layer-shell bar tracking Hyprland workspaces/
                active window natively over .socket2.sock, no polling

Every component now shares one consistent hologram treatment: translucent
violet panel/node fills (replacing solid gray), a config-toggleable
scanline+sweep+noise overlay (lib/hologram.py, ported to horizon-dock and
station-bar to match orbit-menu/astro-menu), and glow-on-hover throughout.

Also adds horizon-dock to hyprlua (built there first, before hyprdrive
existed) and wires dependency checks, config-updater entries, and
apply-theme.sh color sync for every new component across both DEs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nu8JkQ95hPAT8vADeGDAmL
2026-07-17 15:28:07 +02:00
Amir Alexander Abdelbaki 4fbffee5a0 feat(hyprlua/orbit-menu): sci-fi zoom navigation + holographic overlay + opening intro
Replaces the plain Gtk.Stack crossfade with a focal-point zoom (Gtk.Fixed +
Gsk.Transform): the clicked node's screen position becomes a pivot the parent
page zooms into while the child page slides in from that exact spot and grows
to become the new center — like a moon becoming the planet you now orbit.
Going back reverses the same motion around the same remembered point
(_stack_origins tracks it per depth).

Adds a holographic overlay (config.json "hologram" toggle, default on):
violet scanlines + a looping sweep band + magenta/red noise specs with real
per-particle lifetimes (fade in/out, not single-frame flicker), all composited
through a radial mask so it reads as one soft-edged glow over the menu rather
than tinting the whole square canvas.

Adds an opening-only intro (never plays between nodes): each button starts
invisible and fades in on a staggered cascade — center first, then ring nodes
in order — with a bright noise burst flashing at each node's position the
instant it starts appearing, like it's condensing out of the static.

Also fixes a transparency regression: the new hologram DrawingArea sits above
everything via Gtk.Overlay, and the cyberqueer theme's aggressive `*` selector
was painting it an opaque background, hiding the whole menu — forced
transparent via CSS, same fix pattern as the earlier orbit-node label bug.
2026-07-17 11:29:51 +02:00
Amir Alexander Abdelbaki 779e365cb8 feat(hyprlua/orbit-menu): cosmetic mouse-reactive satellites around ring nodes
Adds a decorative layer to the radial menu: small nerd-font glyphs orbit the
ring nodes (and occasionally the center) at a fixed radial "height" per
satellite, only their angle changes — easing toward the cursor plus a slight
idle wobble. Faint dashed/dotted/solid orbit-path circles trace each one.

Per page build (not per frame, so it never flickers):
- total count is 2 + random(1, (3 % node-amount) + 2), clamped to node
  capacity, spread across at least 3 distinct nodes when there are that many
- a node can get up to 2 satellites; since each has its own fixed height they
  never overlap, and the gap between a doubled pair is widened further
- a doubled pair splits its motion — one tracks only the cursor's X, the
  other only Y, each with its own random phase offset so multiple doubled
  nodes on one page don't move in lockstep
- every satellite gets independent horizontal/vertical response multipliers,
  so it can read as more reactive to one direction than the other
- some satellites get tangential bracket flourishes (-<, -[, -(, -{, -|)
  rotated to the orbit's local tangent

Toggleable via ~/.local/state/orbit-menu/config.json ({"satellites": false})
since config-updater wipes ~/.config/orbit-menu on every sync.
2026-07-17 10:45:24 +02:00
Amir Alexander Abdelbaki 2fa3414e31 feat(hyprlua): add orbit-menu radial power/utility menu
New GTK4 layer-shell radial menu (desktopenvs/hyprlua/orbit-menu/), following
astal-menu's single-instance D-Bus daemon conventions. Super+Shift+O opens
straight into a Power ring (sleep/reboot/poweroff/soft-reboot via hyprshutdown);
Super+Ctrl+O opens the full 5-category root (Power, Tools, Scripts sourced live
from ~/Documents/Scripts, Management, and a live open-Windows list with
go-to/bring-here/close/force-kill/get-pid/send-to-workspace actions). Adds a
round launcher button to all 3 eww bar variants with matching glow/hover CSS.

Also retunes hypridle (lock 30s, sleep 1min) and adds a HibernateDelaySec
systemd-sleep.conf.d fragment (deployed by sysupdate.sh) so the machine
hibernates ~80 minutes after going idle instead of drifting to sleep indefinitely.
2026-07-17 09:51:02 +02:00
Amir Alexander Abdelbaki 2fd7b510ef feat(hyprlua): size a fresh workspace's initial column count to monitor width
A workspace with no seeded/published column count used to always start
at a hardcoded 2, regardless of monitor size. Now it picks
floor(usable_width / 700), so ~700px per column — 1080p still lands on
2, wider monitors start with more instead of one cramped column.
2026-07-16 09:08:23 +02:00
Amir Alexander Abdelbaki c313f0694c fix(hyprlua): columns layout breaks on fresh workspaces, wrap focus u/d
hypr-nav fell back to the raw "lua:columns" backend string on any
workspace that had never been explicitly switched via the menu (i.e.
every fresh workspace, since columns is the global default), which
didn't match the "columns" layout name it checks against — so focus/
move/resize silently took the generic dwindle-style path instead of
being forwarded to the custom layout. Strip the "lua:" prefix in the
fallback.

Also make focus/scroll u/d within a column wrap around instead of
stopping at the ends.
2026-07-16 09:01:21 +02:00
Amir Alexander Abdelbaki bdecba0cf3 feat(hyprlua): float xdg portal dialogs above their parent
Portal-backed file/app choosers (xdg-desktop-portal-gtk) — e.g. Steam's
"select library folder" picker, plus Chromium/Electron/Flatpak dialogs —
run in a separate process and open as parentless top-levels with no
xdg-dialog or X11-dialog hint. Hyprland can't tell they're dialogs and
tiles them, unlike in-process xdg dialogs which it auto-floats. Match the
portal backend's class and float + centre it so it lands above its parent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 04:28:42 +02:00
Amir Alexander Abdelbaki 05693a71b7 chore(presence-detect): remove now-unused v4l2loopback provisioning
presence-detect.sh no longer mirrors the camera through a v4l2loopback device,
so the module setup is dead weight. Remove it:

- delete etc-v4l2loopback/ (modprobe.d + modules-load.d configs)
- drop the deploy blocks and linux-headers/v4l2loopback-dkms/v4l2loopback-utils
  package installs from the niri and hyprlua DE installers
- remove _ensure_v4l2loopback() and its call from sysupdate.sh
- reword enroll-biometrics.sh's loopback filter comment (kept as a harmless
  defensive exclusion) so it no longer points at the deleted config

Live system cleanup (module unload + /etc configs) is separate and needs root.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 04:11:16 +02:00
Amir Alexander Abdelbaki c2fa8d3e75 feat(presence-detect): back off while another app holds the camera
Before each tick, check whether another process already has the real camera
open (fuser, which sees same-user holders without root — every camera app runs
as us). If so, skip the read entirely for that tick: attempting would be
pointless (we'd get EBUSY) and a simultaneous open could make the other app
fail. A camera in use is proof the user is present, so mark presence and wait
it out, touching the camera zero times for the whole duration another app holds
it — instead of poking it every tick and racing the app for access.

V4L2 has no way to be notified that another app wants the device, so this
can't preempt an in-progress read; it just guarantees we never contend while
another app is already streaming. Falls through to a normal read (and the
Python helper's exit-3 busy path) if fuser isn't installed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 04:11:16 +02:00
Amir Alexander Abdelbaki 83687764d8 feat(presence-detect): skip the camera entirely during a manual caffeine session
When idle is inhibited manually (a caffeine toggle, not this daemon), the lock
is held regardless of presence, so polling the camera is pointless. Guard the
loop: if the shared idle lock is alive but we don't own it (same test as
caffeine-manual-status.sh), skip the read and leave the camera free for other
apps for the whole manual session. PRESENCE_FLAG is cleared while skipping,
since we're no longer watching — so the widget's presence input reads false
during a manual session instead of showing a stale "camera sees you".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 04:01:16 +02:00
Amir Alexander Abdelbaki bc544898c1 fix(presence-detect): read camera directly instead of v4l2loopback mirror
The loopback feeder (defa69f) held /dev/video0 open 24/7, so real apps —
video calls, howdy — could never open the camera, and the single loopback
device only ever served one reader at a time (a second consumer got
VIDIOC_REQBUFS -EBUSY). Net effect: the camera was permanently blocked and
nothing could access it.

Drop the ffmpeg mirror and read the physical camera directly, only for the
~0.5s per tick it takes to grab frames, then release it — so the camera is
free for other apps the rest of the time. When another app is already holding
the camera, the Python detector now distinguishes "busy/in use" (device node
present but unreadable → exit 3) from "unavailable" (node gone → exit 2), and
the daemon treats busy as presence: a camera in use is itself proof the user
is here, so a video call keeps the session awake.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 03:51:44 +02:00
Amir Alexander Abdelbaki 1fa5ebee70 feat(presence-detect): 4-state caffeine widget + steadier, faster detection
Rework the Eww caffeine widget into two independent inputs — manual inhibit
and presence detected — yielding four states across all three bars:
  neither            → 󰒲 sleep,  purple
  manual only        →  coffee, purple
  presence only      → 󰈈 eye,    pink
  manual + presence  →  coffee, pink
Colour tracks presence; the coffee cup shows only while manually inhibiting.

To make the two inputs independent, the daemon now writes a standalone
/tmp/presence-detected flag each tick (decoupled from lock ownership, so it's
true even during a manual session). presence-status.sh reports that flag
(presence input); new caffeine-manual-status.sh reports lock-held-and-not-
presence-owned (manual input).

Make detection less finnicky: space the detector's frame grabs (0.06s) so slow
movement registers and loopback reads never diff a stale duplicate frame, and
lower the thresholds (delta 25→18, area 2%→0.8%). Add a 90s grace window so
brief stillness never flickers presence off; any motion resets the clock.

Add a third poll tier — INTERVAL_FAST=2s when CPU-or-RAM usage is below 30%
(LOAD_LIGHT) — alongside the existing 20s normal and 120s busy tiers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 03:07:22 +02:00
Amir Alexander Abdelbaki dc9cf6d830 feat(presence-detect): tint caffeine eww widget hot pink while presence holds the lock
Add presence-status.sh reporting true only when the daemon (not a manual
caffeine toggle) owns the shared idle lock, via the existing OWNED_FLAG.
Wire it into all three eww bars: the caffeine button gains a
.caffeine-presence class → the #E40046 Active accent used elsewhere, so
camera-driven auto-awake is visually distinct from a manual session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 02:09:44 +02:00
Amir Alexander Abdelbaki defa69faab feat(presence-detect): mirror camera via v4l2loopback so the daemon never blocks it
presence-detect.sh now feeds the real webcam into a v4l2loopback virtual
device (/dev/video42) via a self-healing ffmpeg background process, and reads
motion off that mirror instead of opening the physical camera directly. This
means the daemon's 20s-interval checks never contend with other apps (video
calls, howdy) for exclusive camera access. Falls back to direct camera access
if the loopback isn't set up yet, so the feature degrades gracefully rather
than breaking.

New etc-v4l2loopback/ ships the modules-load.d/modprobe.d config (fixed
video_nr=42, exclusive_caps=1) following the repo's existing etc-greetd/
etc-lightdm/ convention. Deliberately no runtime sudo/modprobe calls inside
the daemon itself — the module loads declaratively at boot instead, matching
this repo's existing caution around unattended sudo.

hyprlua.sh and niri.sh installers now pull in linux-headers,
v4l2loopback-dkms, and v4l2loopback-utils and deploy the module config
immediately. sysupdate.sh gained _ensure_v4l2loopback(), wired into
sync_configs(), so existing machines pick up the new packages and /etc
config on their next --config or --both run without needing a fresh install.

enroll-biometrics.sh's camera picker now excludes the loopback device itself
(by card_label) so configuring the real camera can't accidentally target the
mirror it feeds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 16:39:11 +02:00
Amir Alexander Abdelbaki f90dbdae8b feat(presence-detect): switch to motion detection, adaptive interval, shared caffeine lock
Replace the Haar-cascade face detector with lightweight frame-differencing
motion detection so the daemon can poll every 20s (backing off to 120s under
heavy CPU/RAM load) without adding noticeable overhead.

Presence detection now shares caffeine's systemd-inhibit lock instead of
holding its own, so the caffeine status widget reflects either source. A new
ownership flag ensures the daemon only ever releases a lock it acquired
itself, so a manually-started caffeine session is never interrupted by the
user stepping away. Also re-enables the daemon in hyprlua's autostart (was
previously only wired up for niri).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 16:23:49 +02:00
Amir Alexander Abdelbaki 9d4cdc35bd fix(hyprlua): spatial (transform-aware) monitor-jump fallback
Root cause of "can jump one way across monitors but not back" on a
desk with a rotated monitor: both columns.lua's own edge-crossing and
the fallback this adds go through Hyprland's focusmonitor/movewindow
mon: -1/+1, which cycle through Hyprland's internal monitor *list
order* — not actual spatial position. A monitor's transform swaps its
logical width/height (same math as monitor-manager's logical_width/
logical_height) but doesn't reorder that list, so list order and
physical left-to-right order can silently diverge once one monitor is
rotated — confirmed with the reported layout (main 3840x2160 normal +
rotated 1920x1080 to its right): jumping right resolved correctly,
jumping back left did not.

scripts/monitor-adjacent replaces the index cycling with real spatial
adjacency: it sorts monitors by logical bounding-box center each time
and dispatches focusmonitor/movewindow to the actual next/prev monitor
in the requested screen direction. Verified against the exact reported
monitor layout (simulated, transform=1 on the right monitor) — both
directions now resolve to the correct monitor.

Wired in two places (Super+,/. is untouched, still index-cycling, by
request):
  - columns.lua's edge-crossing (off the left/right edge of the column
    strip already flowed onto the next monitor; now via spatial lookup)
  - hypr-nav's scrolling-layout perpendicular "no neighbour" case, as a
    new fallback: regular directional movement (Super+hjkl) that
    previously just stopped at the edge of a monitor now spills onto
    whichever monitor is spatially in that direction, same as columns.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6
2026-07-09 16:49:18 +02:00
Amir Alexander Abdelbaki dc0436136b fix(astal-menu): fix layout-tab sync race across workspace switches
_sync_layout_controls() fires 3 concurrent hyprctl calls, and refresh()
can trigger it twice per open (once from the clients query, once from
the activeworkspace one) — each rebuilding a fresh set of layout
widgets. Two bugs followed:

1. The 3 callbacks each toggled the shared self._syncing flag
   independently (True at start, False at end). Whichever resolved
   first dropped the guard while the others — notably the tab-
   selection one, which programmatically flips the visible stack
   child — were still in flight. That let _on_tab_switch/_on_opt_change
   misfire as if the user had clicked, re-applying stale layout data
   via layouts.set() to whatever workspace was active by the time the
   callback landed.

2. A second _sync_layout_controls() call (from the redundant rebuild)
   could land mid-flight of the first, so a stale callback from sync
   #1 could decrement sync #2's guard or write sync #1's data into
   sync #2's freshly built widgets.

Fixed with a generation token: any sync superseded by a newer one is
invalidated outright, and self._syncing only lifts once the *current*
generation's 3 calls have all resolved. This is what "query the
current workspace's layout when opened, so it doesn't break switching
workspaces" needed — refresh() already re-queried on open, the gap was
in trusting stale in-flight results.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6
2026-07-09 16:48:42 +02:00
Amir Alexander Abdelbaki 052611abf5 feat(hyprlua): default to columns, special:magic to scrolling
Session default flips from scrolling to columns; special:magic keeps
a downward scrolling layout of its own. layouts.restore() still wins
if the user has since picked something else for it via the astal-menu.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6
2026-07-09 16:48:12 +02:00
Amir Alexander Abdelbaki 7a5c715da3 feat(hyprlua): open opendeck on special:magic workspace
Matches the existing kitty autostart rule so opendeck launches hidden
on the scratchpad workspace instead of the active one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6
2026-07-09 15:59:32 +02:00
Amir Alexander Abdelbaki 6194b5c271 fix(hyprlua): drop racy cw+ccw autostart rotation workaround
The double-rotate on every Hyprland start existed to fix monitor scale
getting corrupted by rotation. Verified live (Hyprland 0.55.4): scale
stays exactly pinned across a transform change as long as it's set
explicitly (monitors.lua already does scale=1.0, not "auto"), so the
workaround is no longer needed upstream.

It was also a source of a real race: unified-rotate.sh reads current
transform via `hyprctl monitors -j`, and the fixed 0.3s gap between the
two invocations isn't guaranteed long enough for the first rotate to
commit before the second reads state — especially with a dozen other
autostart commands firing concurrently in the same block. A lost race
leaves the monitor (and touchscreen, which unified-rotate.sh also
retargets) transform mismatched after boot. Root-caused this while
investigating why a QEMU test VM's monitor stayed stuck at transform:1
after every fresh boot.

unified-rotate.sh itself is untouched — still used by the manual
rotate buttons on the touch bar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6
2026-07-09 15:48:23 +02:00
Amir Alexander Abdelbaki 716902f8e1 perf(astal-menu): use gdbus Activate fast path in menu-toggle.sh
menu-toggle.sh always cold-started a second python3+PyGObject+GTK4
process to forward one verb to the already-running daemon, per
GApplication's command-line-forwarding mechanism. That's ~0.5s
baseline and spikes past 5s under load, easily read as an
unresponsive/broken menu button on repeat taps.

main.py's own do_command_line comment already describes the intended
fix: call the registered org.gtk.Actions directly over D-Bus for an
already-running instance. Wire that up (gdbus call, ~20-100ms) and
keep the python3 spawn only as the cold-bootstrap path when no
instance is registered yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6
2026-07-09 09:18:34 +02:00
Amir Alexander Abdelbaki 0541177974 fix(eww-touch): use nobattery bar's astal-menu launcher button
The touch bar's menu button used a bare icon-btn with no explicit
toggle side, unlike the nobattery bar's accent-coloured launcher.
Mirror the nobattery implementation (class + explicit "toggle top"
args + .menu-launcher styling) for visual and behavioral consistency
between bar variants.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6
2026-07-09 08:34:41 +02:00
Amir Alexander Abdelbaki 84420733bb adjustments for astal+ewwbar 2026-07-08 21:56:51 +02:00
Amir Alexander Abdelbaki ed44b84afa feat(hyprlua/columns): center-focused toggle, mirroring scrolling's fit method
Adds a "center-focused" switch to the Columns layout's menu tab: when a column
overflows and scrolls, it can now center the focused window in the column
instead of only nudging the pan the minimum amount to keep it in view. Off by
default so existing behavior is unchanged unless explicitly enabled.

The astal-menu switch widget already existed generically (built for scrolling's
native focus_fit_method) but was hard-wired to that one Hyprland option; it's
now layout-aware and reads/writes columns.lua's own persisted state instead.
2026-07-08 13:35:47 +02:00
Amir Alexander Abdelbaki 964ce103a0 feat(hyprlua/columns): resizable+scrolling columns, window parking, reload-safe
Overhaul the custom "columns" Lua layout and its navigation wiring:

- Flexible sizing: per-column width weights + per-window height weights
  (Super+Alt resize), scale-to-fill when a column is underfull, scroll/pan
  when overfull. Drops the old fixed viewport/rows window heights.
- Window parking: move u/d within a column parks two windows side by side in
  one slot (persistent, split across the column axis with a divider parallel
  to the scroll direction; the column closes up so there is no gap); moving a
  parked window again pops it out past its partner.
- New windows stack into the working column (with a balance guard) instead of
  scattering, so two windows share a column/height by default.
- Cross-monitor focus/move at the column edges (relative +1/-1 selectors).
- hypr-nav: adds resize + scroll kinds; Super+wheel travels along the focused
  strip (column / tape) and falls back to workspace switch elsewhere.
- Super+Alt arrows/hjkl route resize through the layout; Super+rightclick
  auto-floats then resizes ONLY in columns (no pointer-resize hook for custom
  layouts) and is a plain resize everywhere else.
- Reload-safety: hyprctl reload dropped per-ws layout rules + Lua state,
  silently reverting columns workspaces to scrolling. init.lua now replays
  layouts-state.json (M.restore) and columns.lua re-seeds cols/rows/orient.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 19:49:28 +02:00
Amir Alexander Abdelbaki 4c747221f2 style(astal-menu): unfullscreen glyphs, animated takeover, CyberQueer TUIs
- Expand/collapse controls now use consistent fullscreen ()/unfullscreen ()
  glyphs: the quad "Back" and the taskbar-panel "Back" became  buttons (matching
  the appdrawer's - toggle).
- The taskbar panel takeover now plays the same bouncy quad-pop scale as the quads
  when it expands, so every expansion in the menu is animated.
- monitor-manager (curses) and timer-pick (bash TUI) now use the CyberQueer accent
  palette (red #E40046 + violet #5018dd, true-colour with ANSI fallback) instead of
  cyan/green, matching the rest of the config.
- Added a .stepper-value style for the Columns count stepper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SUN7gg6GGfnToghMijLm5Y
2026-07-07 13:43:11 +02:00
Amir Alexander Abdelbaki de666acac7 feat(astal-menu): Columns count stepper + expanded taskbar is one module
- Columns layout publishes per-workspace column/row counts to columns-state.json
  and handles a direct "cols +1/-1/N" message. The menu's Columns page now shows a
  "Columns  (−)[N](+)" stepper that reads the live count and drives it.
- Expanding the taskbar now fully collapses the strip (header included) via its
  revealer, so the panel that covers the quads reads as a single module instead of a
  thin strip plus a detached card below it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SUN7gg6GGfnToghMijLm5Y
2026-07-07 13:31:45 +02:00
Amir Alexander Abdelbaki 9d1ec69a11 feat: hyprshutdown power binds, 76% scrolling windows, single-sudo sysupdate
- hyprshutdown wired into the graceful power flow (Super+Shift+O logout,
  Super+Ctrl+O power off, Super+Ctrl+Shift+O reboot) so apps close cleanly with a
  UI before Hyprland exits, instead of a hard systemctl call. Added to the hyprlua
  package list.
- Scrolling layout: default window is now 76% of the monitor along the scroll axis
  (column_width 0.5 -> 0.76).
- sysupdate.sh: primes sudo once at startup and keeps the credential alive for the
  whole run, so no later step re-prompts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SUN7gg6GGfnToghMijLm5Y
2026-07-07 13:26:48 +02:00
Amir Alexander Abdelbaki 48505a5726 feat(hyprlua): real independent-pan "columns" layout (custom Lua layout)
Replaces the scrolling-preset "columns" with a genuine custom tiling layout
(hl.layout.register "lua:columns"): a row of columns where each column is an
INDEPENDENTLY panning vertical strip. Moving focus up/down inside a column pans
only that column to keep the focus in view; the other columns stay frozen — the
combination-lock behaviour that the built-in scrolling engine (single shared tape
offset) structurally can't do.

- columns.lua: recalculate places every window box; per-workspace state holds each
  window's column assignment and each column's pan offset. layout_msg handles the
  focus/move/count/orient commands. New windows fill the least-populated column;
  changing the column count reflows evenly.
- init.lua: for Lua layouts (lua = true), orientation is sent via layout_msg
  ("orient h|v") instead of the global scrolling:direction option.
- hypr-nav: forwards focus/move/count for the columns layout to hl.dsp.layout(...);
  the built-in scrolling path is unchanged.
- binds.lua: Super+Ctrl+Alt+H/J/K/L manage the column / windows-per-view count
  (axes follow the workspace's horizontal/vertical orientation).

Menu dropdown for "Columns" now selects orientation (Horizontal / Vertical).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SUN7gg6GGfnToghMijLm5Y
2026-07-07 10:08:34 +02:00
Amir Alexander Abdelbaki 6631405570 feat(hyprlua): taskbar quad-takeover, columns layout, screen-absolute nav
astal-menu: the taskbar ⤢ toggle now collapses the compact strip and mounts
its workspace/window panel as a takeover overlay covering the 2x2 quads (with
a Back button), instead of a popover/inline reveal. QuadGrid gains a generic
takeover overlay; the menu window coordinates show/hide and resets on close.

hypr: new "Columns" layout (scrolling backend presented as independent columns)
with a menu dropdown to pick orientation — "Left / Right" or "Up / Down" — via a
new dir_labels manifest field. The layout menu now tracks direction dropdowns and
fit switches per-layout, so a second directional layout no longer clobbers the
first.

binds/scripts: focus & window-move keys (hjkl + arrows) route through a new
hypr-nav helper so they stay screen-absolute in the scrolling/columns layouts
(the layout otherwise resolves a perpendicular direction onto "scroll the tape",
rotating the keys with scrolling:direction). Adds explicit cross-monitor binds:
Super+,/. focus prev/next monitor, Super+Shift+,/. move the window there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SUN7gg6GGfnToghMijLm5Y
2026-07-07 09:28:41 +02:00
Amir Alexander Abdelbaki 4196b84ad3 feat(astal-menu): tabbed workspace-layout selector
Replace the layout dropdown with a tab bar (one tab per layout — Dwindle · Master ·
Monocle · Scrolling, from the manifest) over a Gtk.Stack of per-layout options that
switches with the tab. Selecting a tab applies that layout to the currently focused
workspace; the scrolling page carries its options — a "direction" dropdown and a
"center-focused" switch (focus_fit_method). The active tab reflects the workspace's
real (per-ws) layout via the layouts state file.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XUWCXM4KhjRkwheaA3X7bP
2026-07-06 11:59:47 +02:00