Give Input keycaps, a shortcut search, and the missing pointer basics
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -16,12 +16,56 @@ set -euo pipefail
|
||||
|
||||
repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
harness="$repo_dir/config/dot/quickshell/keybinds-harness.qml"
|
||||
settings_dir="$repo_dir/config/dot/quickshell/modules/settings"
|
||||
page="$settings_dir/ShortcutsPage.qml"
|
||||
row="$settings_dir/ShortcutRow.qml"
|
||||
|
||||
fail() {
|
||||
printf 'keybinds contract: %s\n' "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# ── How the hundred and thirty are presented ─────────────────────────────────
|
||||
#
|
||||
# The count check below proves the page HAS every bind. These prove it is still
|
||||
# something a person can find one in. A wall of a hundred and thirty rows and a
|
||||
# searchable browser pass the count check identically.
|
||||
|
||||
[[ -r "$page" ]] || fail "cannot read $page"
|
||||
[[ -r "$row" ]] || fail "cannot read $row -- the shortcut row component is gone"
|
||||
browser="$(cat "$page" "$row")"
|
||||
|
||||
grep -Fq 'Keybinds.grouped()' <<<"$browser" \
|
||||
|| fail 'the page no longer renders the service grouping, so the group order is a second opinion'
|
||||
|
||||
# Chords are drawn as keys. The chord string itself stays the service's -- the
|
||||
# component is presentation over what Keybinds already produced, never a second
|
||||
# spelling of a binding.
|
||||
grep -Fq 'KeycapChord' <<<"$browser" \
|
||||
|| fail 'chords are no longer drawn as keycaps'
|
||||
|
||||
# A filter, matching what a shortcut does rather than what it is bound to:
|
||||
# nobody looking for the screenshot key knows it is Super+Shift+S, which is the
|
||||
# entire reason for searching.
|
||||
grep -Fq 'toLowerCase()' <<<"$browser" \
|
||||
|| fail 'the shortcut filter is gone, or is case-sensitive'
|
||||
grep -qE 'description[^\n]*toLowerCase|toLowerCase[^\n]*description' <<<"$browser" \
|
||||
|| fail 'the filter does not match a shortcut by its description'
|
||||
|
||||
# Filtering must say what it hid. A list that silently shrinks reads as a
|
||||
# shortcut having been lost.
|
||||
grep -qi 'showing' <<<"$browser" \
|
||||
|| fail 'a filtered list never says how many of how many it is showing'
|
||||
|
||||
# Counts come from the service, so adding a bind moves the number on the page.
|
||||
grep -Fq 'Keybinds.binds.length' <<<"$browser" \
|
||||
|| fail 'the header count is not read from the live keymap'
|
||||
|
||||
# The reason there is no GNOME keyboard button here, kept where the next person
|
||||
# to wonder about it will look. gnome-handoff-contract cannot state a reason.
|
||||
rg -Fq 'writes org.gnome.desktop input-source' "$page" \
|
||||
|| fail 'the note explaining why there is no GNOME keyboard handoff is gone'
|
||||
|
||||
qs_for_harness() {
|
||||
qs -p "$harness" "$@"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user