Skip to content

Warn when Caps Lock is on at the Plymouth password prompt - #10799

Open
TomWor wants to merge 1 commit into
omacom:quattrofrom
TomWor:plymouth-capslock-warning
Open

Warn when Caps Lock is on at the Plymouth password prompt#10799
TomWor wants to merge 1 commit into
omacom:quattrofrom
TomWor:plymouth-capslock-warning

Conversation

@TomWor

@TomWor TomWor commented Sep 8, 2026

Copy link
Copy Markdown

The disk unlock prompt is the one place Omarchy asks for a password with no feedback beyond bullets, and Caps Lock is invisible there. The initramfs runs the console keymap, where the key does what it says, while the desktop it boots into remaps it to Compose (default/hypr/input.lua), so nothing in daily use teaches the habit of avoiding it. A stray press means retyping the passphrase with no hint about why it was refused.

Plymouth's script plugin reports the keyboard's Caps Lock state through Plymouth.GetCapslockState(). Poll it from the refresh callback while the password dialog is showing and, when it is set, show a warning triangle and "Caps Lock is on" centred under the entry field. The label is rendered lazily, so a boot that never has Caps Lock on never loads the label plugin, and every call is guarded so a plymouthd without GetCapslockState, or a theme directory without warning.png, leaves the prompt exactly as it was.

The warning follows the theme. warning.png joins bullet.png, entry.png, lock.png and progress_bar.png in the set of assets omarchy-plymouth-set recolours to the theme's foreground, and the label colour lives in three text_color lines at the top of the script that the publisher rewrites next to the background colours. The packaged assets stay Tokyo Night, so a fresh install matches before any theme is set.

warning.png is added to the publisher's allowlist and the test's copy of it, and the test now also checks that the script receives the selected text colour. Verified at the unlock prompt of an encrypted install on Plymouth 26.134.222.

IMG_3109.mp4

The disk unlock prompt is the one place Omarchy asks for a password with no
feedback beyond bullets, and Caps Lock is invisible there. The initramfs runs
the console keymap, where the key does what it says, while the desktop it
boots into remaps it to Compose (default/hypr/input.lua), so nothing in daily
use teaches the habit of avoiding it. A stray press means retyping the
passphrase with no hint about why it was refused.

Plymouth's script plugin reports the keyboard's Caps Lock state through
Plymouth.GetCapslockState(). Poll it from the refresh callback while the
password dialog is showing and, when it is set, show a warning triangle and
"Caps Lock is on" centred under the entry field. The label is rendered
lazily, so a boot that never has Caps Lock on never loads the label plugin,
and every call is guarded so a plymouthd without GetCapslockState, or a
theme directory without warning.png, leaves the prompt exactly as it was.

The warning follows the theme. warning.png joins bullet.png, entry.png,
lock.png and progress_bar.png in the set of assets omarchy-plymouth-set
recolours to the theme's foreground, and the label colour lives in three
text_color lines at the top of the script that the publisher rewrites next
to the background colours. The packaged assets stay Tokyo Night, so a fresh
install matches before any theme is set.

warning.png is added to the publisher's allowlist and the test's copy of it,
and the test now also checks that the script receives the selected text
colour. Verified at the unlock prompt of an encrypted install on Plymouth
26.134.222.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137xBjDgUqaGSorW29VESMk
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