Warn when Caps Lock is on at the Plymouth password prompt - #10799
Open
TomWor wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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