fix: share reliable virtual key delivery across Linux rigs
This commit is contained in:
@@ -10,6 +10,7 @@ export CLIPBIN_CLIPS_REPO="${repo}" CLIPBIN_CLIPS_OUT="${out}"
|
||||
"${repo}/scripts/rig/headless.sh" bash <<'INNER'
|
||||
set -euo pipefail
|
||||
repo="${CLIPBIN_CLIPS_REPO}"; out="${CLIPBIN_CLIPS_OUT}"
|
||||
source "${repo}/scripts/rig/keys.sh"
|
||||
export XDG_DATA_HOME="${out}/data" XDG_CONFIG_HOME="${out}/config"
|
||||
mkdir -p "${XDG_CONFIG_HOME}/clipbin"
|
||||
cat > "${XDG_CONFIG_HOME}/clipbin/settings.json" <<'JSON'
|
||||
@@ -34,12 +35,12 @@ quit_app() {
|
||||
read -r qx qy qw qh < <(geometry)
|
||||
click "$((qx+qw-30))" "$((qy+100))"
|
||||
sleep 0.5
|
||||
wtype -M ctrl -k q -m ctrl
|
||||
rig_key q ctrl
|
||||
for attempt in $(seq 20); do
|
||||
if ! kill -0 "${app}" 2>/dev/null; then wait "${app}"; return; fi
|
||||
if ((attempt % 4 == 0)); then
|
||||
swaymsg '[app_id="dev.clipbin.Clipbin"] focus' >/dev/null
|
||||
wtype -M ctrl -k q -m ctrl
|
||||
rig_key q ctrl
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user