Skip to content

feat(wayland): replace session-locker, wallpaper, and menu with portable alternatives#879

Merged
flexiondotorg merged 6 commits into
mainfrom
wayland
Jun 11, 2026
Merged

feat(wayland): replace session-locker, wallpaper, and menu with portable alternatives#879
flexiondotorg merged 6 commits into
mainfrom
wayland

Conversation

@flexiondotorg

Copy link
Copy Markdown
Member

Migrate from Hyprland-specific session components (hyprlock, hyprpaper,
wlogout) to portable, standard-Wayland-protocol equivalents to enable
future compositor swaps (Sway, niri, river, etc.) without losing the
lock/wallpaper/session-menu experience.

  • Screen locker: hyprlock → Veila
    Add veila flake input (pinning nixpkgs). Enable the NixOS programs.veila
    module and configure the PAM service. Write ~/.config/veila/config.toml
    with Catppuccin bundled theme, per-monitor backgrounds, password input,
    avatar from ~/.face, MPRIS now-playing (Sidra), Open-Meteo weather,
    battery/caps-lock indicators, and 305s screen-off timeout. Start
    veilad.service and veila-idle.service (replacing hypridle); update
    Hyprland keybinds ($mod,L and CTRL ALT,L) to call veila lock.

  • Wallpaper: hyprpaper → wpaperd
    Per-output wallpapers via wlr-layer-shell, configured from noughty
    display metadata.

  • Session menu: wlogout → wleave
    GTK4 menu with Catppuccin-accented icons and wlr-layer-shell;
    shared wleave-session wrapper for waybar and fuzzel; remove wlogout
    PNG assets.

  • Lock keybind chain
    Update hypr-session script to call veila lock instead of hyprlock;
    the single change propagates through wlogout, waybar, and wayfire
    session UIs.

  • Security hardening
    Tighten home directory permissions to 0700 (NixOS secure default);
    bump avatar resolution to 512×512.

Resolves compositor portability goal; visual and feature parity with
previous hyprlock setup preserved throughout.

- Add Veila 0.4.2 flake input (Catppuccin theme, native fprintd, MPRIS)
- Replace NixOS hyprlock PAM service with programs.veila.enable
- Remove hypridle service; idle/lock now handled by Veila's idle daemon
- Rewrite Home Manager hyprlock mixin as Veila TOML config + user
  services
- Update keybinds and session scripts (hyprlock → veila lock)

Veila uses neutral Wayland standards (ext-idle-notify-v1) instead of
Hyprland IPC, supporting future compositor portability. Grace-period
unlock (5s no-auth) is intentionally removed; all unlocks now require
authentication.

Signed-off-by: Martin Wimpress <code@wimpress.io>
Replace the Hyprland-specific hyprpaper daemon with the portable wpaperd
wallpaper setter, which uses wlr-layer-shell and works identically
across wlroots-based compositors (Sway, Wayfire, niri, river, COSMIC).
Preserves per-output image selection (Catppuccin primary, Colorway
others), resolution-suffixed assets, and multi-monitor layout.
Complements the earlier Veila screen-locker migration. wpaperd natively
supports future timed directory rotation without additional
configuration.

Signed-off-by: Martin Wimpress <code@wimpress.io>
Replace wlogout (GTK3, Hyprland-specific IPC) with wleave (GTK4,
standard wlr-layer-shell) to improve portability across Wayland
compositors (Sway, niri, Wayfire, COSMIC). Consolidate session
invocation into a single `wleave-session` wrapper script.

- New wleave mixin with bundled SVG icons, Catppuccin-tinted per-button
  colours (lock blue, suspend sky, logout yellow, reboot peach, shutdown
  red) and ascending danger ordering.
- XDG_CONFIG_HOME redirection to pkgs.emptyDirectory drops catppuccin
  gtk.css PRIORITY_USER cascade so wleave's own CSS
  (PRIORITY_APPLICATION) wins, allowing transparent background with
  compositor blur.
- Wrapper script centralises full invocation: display-aware margins
  (portrait/ultrawide centering), 5 buttons-per-row, explicit config
  paths. Reused by waybar session button and fuzzel session menu.
- Delete wlogout module and all 12 PNG icon assets.
- Update hyprland and wayfire imports to wleave; update waybar and
  fuzzel session-menu calls to wleave-session.

Signed-off-by: Martin Wimpress <code@wimpress.io>
- Make cursor visible and usable (hide_cursor = false) so the user can
  navigate the lock screen UI while locked; Hyprland provides the
  pointer via the cursor-shape protocol.
- Add per-display wallpaper backgrounds using the same
  resolution-matched PNG mappings as wpaperd: primary display uses
  Catppuccin, secondary displays use Colorway. Each
  [[background.outputs]] block maps an output name to its
  path; a global fallback covers unregistered outputs.
- Set avatar_path in [lock] (the correct LockConfig field, not
  [visuals.avatar] image_path) so Veila loads ~/.face and caches it;
  [visuals.avatar] enabled=true then renders it with the theme's
  positioning and size.

These refinements close the usability and visual parity gaps between the
original hyprlock and the Veila port.

Signed-off-by: Martin Wimpress <code@wimpress.io>
…o-restart

- Extract veilaConfig let binding to enable X-Restart-Triggers on config
  hash
- Style password input with FiraCode monospace, blue outline, yellow
  glyph
- Fix avatar image path detection by using store path instead of ~/.face
  symlink
- Add Weather section (Basingstoke, Open-Meteo, Celsius, visuals
  enbled)
- Add Clock font (FiraCode Nerd Font Mono, prevents minute-tick width
  shift)
- Add Date section with "short" format and Work Sans font
- Add Now Playing section with Work Sans for artist and title
- Gate Battery widget to laptops via host.is.laptop
- Enable Caps Lock indicator and disable Eye (show-password toggle)
- Pass HOME and XDG_CACHE_HOME to veilad environment for avatar cache
  resolution

Signed-off-by: Martin Wimpress <code@wimpress.io>
…esolution

- Set homeMode to 0700 (NixOS secure default) instead of 0755
  Greeter (ReGreet 0.3.0) does not read avatar; Veila reads via
  world-readable store path, so no functional impact on existing
  consumers.
- Update face.png from 96×96 to 512×512 (systemd recommended
  resolution for avatar assets, no alpha channel)

Signed-off-by: Martin Wimpress <code@wimpress.io>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 32 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: This PR involves a major refactor of core desktop session components (screen locker, wallpaper manager, session menu) across 32 files with 1003 lines changed, replacing hyprlock, hyprpaper, and wlogout with alternative tools (veila, wpaperd, wleave) and updating systemd services, keybinds,...

Re-trigger cubic

@flexiondotorg flexiondotorg merged commit 40f46dd into main Jun 11, 2026
38 of 42 checks passed
@flexiondotorg flexiondotorg deleted the wayland branch June 11, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant