feat: gtklock lock screen and Mod+Q power menu #51

Merged
marti merged 2 commits from feature/lockscreen into main 2026-10-18 12:45:01 +02:00
Owner

Summary

A gtklock lock screen (clock + password field, themed from m4rti.theme) on every host, a Mod+Q power menu on every host, and idle/sleep locking on laptops only.

 modules/
 ├── desktop/
+│   ├── lock.nix        # gtklock: trimmed layout, theme CSS, PAM via programs.gtklock
 │   └── niri.nix        # Mod+Q -> powermenu
 └── hardware/
     └── laptop.nix      # swayidle: lock after 300s idle, before-sleep, on lock-session
 packages/scripts/
+└── src/powermenu.sh    # fuzzel: lock screen / logout / shut down / reboot
laptops:  idle 5 min | lid close | loginctl lock-session  -> gtklock -d
all:      Mod+Q -> powermenu -> gtklock -d | niri quit | poweroff | reboot

gtklock -d returns only once the session is locked, so with swayidle's -w suspend waits for the lock.

Evidence

  • Before: no locker, no idle daemon; Mod+Q unbound.
    After: cumpad and cumputer toplevels evaluate; powermenu builds (shellcheck passes). Generated /etc/xdg/gtklock/config.ini:
    [main]
    layout=/nix/store/...-gtklock-layout.ui
    style=/nix/store/...-style.css
    time-format=%H:%M
    
    swayidle on cumpad: swayidle -w timeout 300 'gtklock -d' before-sleep 'gtklock -d' lock 'gtklock -d'; services.swayidle.enable = false on cumputer.
    Not yet tested by actually locking a live session.

Merge Danger

Door: two-way

Revert the two commits to remove it.

Blast Radius: session

A broken locker could leave a session locked; recovery is another VT (Ctrl+Alt+F2). Lid-close now waits for the lock before suspending.

🤖 Generated with Claude Code

## Summary A gtklock lock screen (clock + password field, themed from `m4rti.theme`) on every host, a Mod+Q power menu on every host, and idle/sleep locking on laptops only. ```diff modules/ ├── desktop/ +│ ├── lock.nix # gtklock: trimmed layout, theme CSS, PAM via programs.gtklock │ └── niri.nix # Mod+Q -> powermenu └── hardware/ └── laptop.nix # swayidle: lock after 300s idle, before-sleep, on lock-session packages/scripts/ +└── src/powermenu.sh # fuzzel: lock screen / logout / shut down / reboot ``` ```text laptops: idle 5 min | lid close | loginctl lock-session -> gtklock -d all: Mod+Q -> powermenu -> gtklock -d | niri quit | poweroff | reboot ``` `gtklock -d` returns only once the session is locked, so with swayidle's `-w` suspend waits for the lock. ## Evidence - **Before:** no locker, no idle daemon; Mod+Q unbound. **After:** `cumpad` and `cumputer` toplevels evaluate; `powermenu` builds (shellcheck passes). Generated `/etc/xdg/gtklock/config.ini`: ```ini [main] layout=/nix/store/...-gtklock-layout.ui style=/nix/store/...-style.css time-format=%H:%M ``` swayidle on cumpad: `swayidle -w timeout 300 'gtklock -d' before-sleep 'gtklock -d' lock 'gtklock -d'`; `services.swayidle.enable = false` on cumputer. Not yet tested by actually locking a live session. ## Merge Danger **Door:** two-way Revert the two commits to remove it. **Blast Radius:** session A broken locker could leave a session locked; recovery is another VT (Ctrl+Alt+F2). Lid-close now waits for the lock before suspending. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gtklock shows only the clock and a password field, styled from m4rti.theme.
Laptops run swayidle to lock after 5 minutes idle and before suspend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fuzzel menu to lock the screen, log out, shut down or reboot, on every host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marti merged commit 3e943d0d45 into main 2026-10-18 12:45:01 +02:00
marti deleted branch feature/lockscreen 2026-10-18 12:45:05 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marti/nix!51
No description provided.