Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rices/end4/illogical-impulse/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@
"scrollFactor": 0.3
}
},
"misc": {
"focusOnActivate": true
},
"sessionAutostart": true
},
"interactions": {
Expand Down
30 changes: 30 additions & 0 deletions tests/shell-overrides-agree.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# The end-4 shell's Hyprland settings page writes its stored options into
# hyprland/shellOverrides/main.lua, which loads after custom/*.lua. A value the
# rice sets in custom/general.lua must therefore be the same in the rice's
# illogical-impulse/config.json, or the shell silently overrides it with its
# default once that page is opened.
set -euo pipefail

REPO="$(cd "$(dirname "$0")/.." && pwd)"
failed=0

for general in "$REPO"/rices/*/hypr/custom/general.lua; do
rice_dir="${general%/hypr/custom/general.lua}"
config="$rice_dir/illogical-impulse/config.json"
[[ -f "$config" ]] || continue
rice="${rice_dir##*/}"

# misc:focus_on_activate <-> hyprland.misc.focusOnActivate (shell default: false)
lua="$(grep -oE '^\s*focus_on_activate\s*=\s*(true|false)' "$general" | grep -oE 'true|false' | tail -n1 || true)"
[[ -n "$lua" ]] || continue
json="$(jq -r '.hyprland.misc.focusOnActivate // false' "$config")"
if [[ "$lua" != "$json" ]]; then
echo "FAIL: $rice: custom/general.lua focus_on_activate = $lua, config.json hyprland.misc.focusOnActivate = $json" >&2
failed=1
else
echo "ok: $rice: focus_on_activate = $lua in both"
fi
done

exit "$failed"
Loading