feat: swayosd on-screen display for volume/brightness/mute

The media keys called wpctl/brightnessctl directly with no visual
feedback — changing volume showed nothing on screen. Now they drive
swayosd-client, which performs the action AND shows a themed OSD.

- modules/home/osd.nix: services.swayosd, style.css generated from the
  palette (base bg, accent progress/border); nomarchy.osd.enable.
- hyprland media binds → swayosd-client (--output-volume raise/lower/
  mute-toggle, --input-volume mute-toggle, --brightness raise/lower).
- modules/nixos: services.udev.packages = [ swayosd ] installs the
  backlight rule (chgrp video + g+w) so brightness works for video-group
  users without root (the installer/live user is in video).

swaync is unaffected (it was already running — this was purely the
missing OSD). Verified: flake check green, swayosd.service bound to
graphical-session.target, hyprland config verifies, swayosd in the live
ISO closure. On-screen rendering needs a real session to confirm.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-06-13 16:04:55 +01:00
parent 084b2a0500
commit 520c878bb3
6 changed files with 76 additions and 11 deletions

View File

@@ -60,7 +60,8 @@ Flat on purpose. Two module trees, one options file each, no hidden layers.
│ ├── rofi.nix # launcher + nomarchy-menu (power, clip)
│ ├── swaync.nix # notifications, same JSON
│ ├── idle.nix # hyprlock + hypridle, same JSON
── yazi.nix # flagship TUI file manager + plugins
── yazi.nix # flagship TUI file manager + plugins
│ └── osd.nix # swayosd volume/brightness OSD
├── hosts/
│ ├── default/ # reference machine (thin: boot, user, hostname)
│ └── live.nix # bootable live ISO (try the distro, no install)
@@ -176,6 +177,7 @@ examples: **[docs/OVERRIDES.md](docs/OVERRIDES.md)**.
| `nomarchy.swaync.enable` | `true` | swaync notifications, themed |
| `nomarchy.idle.enable` | `true` | hyprlock + hypridle (idle lock 5 min, display off 10, suspend 30) |
| `nomarchy.yazi.enable` | `true` | yazi TUI file manager, themed + curated plugins |
| `nomarchy.osd.enable` | `true` | swayosd on-screen display for volume/brightness/mute |
| `nomarchy.ghostty.enable` | `true` | Nomarchy's Ghostty |
| `nomarchy.btop.enable` | `true` | btop with per-theme colors |
| `nomarchy.stylix.enable` | `true` | GTK/Qt/cursor theming |
@@ -302,7 +304,8 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot.
v1: `nomarchy.system.plymouth.*`, background tinted from the state file)
- Installer round 2: multi-disk BTRFS RAID, impermanence, BIOS/legacy
boot (v1 `nomarchy-install` is single-disk UEFI — see `pkgs/nomarchy-install`)
- swayosd (volume/brightness OSD), launch-or-focus UX scripts
- launch-or-focus UX scripts (swayosd volume/brightness OSD ships since v1:
`nomarchy.osd.*`, media keys drive `swayosd-client`, themed from the JSON)
- **Distro branding, round 2:** `distroName = "Nomarchy"` ships
(os-release `PRETTY_NAME`, systemd-boot entries, ISO menu label).
Remaining: `isoImage.splashImage`/`grubTheme` art for the ISO boot