|
60 | 60 | check_system_service_active kanata-main.service |
61 | 61 | check_user_service_active toshy-config.service |
62 | 62 |
|
| 63 | +if systemctl cat kanata-main.service 2>/dev/null | |
| 64 | + grep -Fq 'PrivateUsers=true'; then |
| 65 | + fail "kanata-main.service uses PrivateUsers=true, which can hide input/uinput supplemental groups" |
| 66 | +else |
| 67 | + ok "kanata-main.service does not isolate host input/uinput groups with PrivateUsers" |
| 68 | +fi |
| 69 | + |
63 | 70 | if [[ -f $repo_kanata_config && -f $host_kanata_config ]]; then |
64 | 71 | if cmp -s "$repo_kanata_config" "$host_kanata_config"; then |
65 | 72 | ok "$host_kanata_config matches the dotfiles Kanata config" |
|
87 | 94 | toshy_config="${XDG_CONFIG_HOME:-$HOME/.config}/toshy/toshy_config.py" |
88 | 95 | if [[ -f $toshy_config ]]; then |
89 | 96 | if grep -Fq 'SLICE_MARK_START: keymapper_api' "$toshy_config" && |
| 97 | + grep -Fq 'SLICE_MARK_START: kbtype_override' "$toshy_config" && |
90 | 98 | grep -Fq 'DOTFILES_TOSHY_ONLY_DEVICES' "$toshy_config" && |
91 | | - grep -Fq '/run/kanata-main/main' "$toshy_config"; then |
| 99 | + grep -Fq '/run/kanata-main/main' "$toshy_config" && |
| 100 | + grep -Fq 'dotfiles-kanata-main' "$toshy_config"; then |
92 | 101 | ok "Toshy config includes dotfiles Kanata device slice" |
93 | 102 | else |
94 | 103 | fail "Toshy config does not include the dotfiles Kanata device slice" |
@@ -118,12 +127,23 @@ else |
118 | 127 | fi |
119 | 128 |
|
120 | 129 | if systemctl --user cat toshy-kanata-device.path 2>/dev/null | |
121 | | - grep -Fxq 'PathChanged=/run/kanata-main'; then |
| 130 | + grep -Fxq 'PathChanged=/run/kanata-main/main'; then |
122 | 131 | ok "toshy-kanata-device.path watches the Kanata virtual device" |
123 | 132 | else |
124 | 133 | fail "toshy-kanata-device.path is missing the Kanata virtual device watch" |
125 | 134 | fi |
126 | 135 |
|
| 136 | +if systemctl --user cat toshy-kanata-device.service 2>/dev/null | |
| 137 | + grep -Fq 'reset-failed toshy-config.service' && |
| 138 | + systemctl --user cat toshy-kanata-device.service 2>/dev/null | |
| 139 | + grep -Fq '[ -e /run/kanata-main/main ]' && |
| 140 | + systemctl --user cat toshy-kanata-device.service 2>/dev/null | |
| 141 | + grep -Fq 'restart toshy-config.service'; then |
| 142 | + ok "toshy-kanata-device.service can recover a failed Toshy service" |
| 143 | +else |
| 144 | + fail "toshy-kanata-device.service does not recover failed Toshy starts" |
| 145 | +fi |
| 146 | + |
127 | 147 | if systemctl cat input-remapper.service >/dev/null 2>&1; then |
128 | 148 | if [[ ${DOTFILES_KEEP_INPUT_REMAPPER:-0} == 1 ]]; then |
129 | 149 | warn "input-remapper.service exists and keep flag is set; skipping conflict check" |
|
0 commit comments