#!/bin/sh # Raise and then hide the on-screen keyboard while Files is up; sample Files' rect. P=$(pgrep -x k230-shell-rust | head -1) E=$(sudo tr "\0" "\n" < /proc/$P/environ | grep -E "^(K230_|XDG_RUNTIME|WAYLAND|HOME=|PATH=)" | tr "\n" " ") SIG=/nix/store/s8fndzjybxfy7cn8b2lzlf498fpw1msw-k230-keyboard-gesture-signal/bin/k230-keyboard-gesture-signal echo "$(date +%T) show"; sudo -u shell env $E $SIG show N=4 sh /var/tmp/filesrect.sh | grep "^+" echo "$(date +%T) hide"; sudo -u shell env $E $SIG hide N=6 sh /var/tmp/filesrect.sh | grep "^+"