Skip to content

Instantly share code, notes, and snippets.

@ilsubyeega
Created May 26, 2025 11:19
Show Gist options
  • Save ilsubyeega/ef16e236b809861eebd5d6aee94968a5 to your computer and use it in GitHub Desktop.
Save ilsubyeega/ef16e236b809861eebd5d6aee94968a5 to your computer and use it in GitHub Desktop.
alacritty -e "bash" "-c" "echo hi && sleep 10" &
PROCESSID=$!
sleep 0.1
WINDOW_ID=$(echo "\"Windows\"" | socat STDIO "$NIRI_SOCKET" | jaq '.Ok | .[] | map(select(.pid == '"$PROCESSID"')) | .[].id')
echo $WINDOW_ID
echo '{"Action":{"MoveWindowToWorkspace":{"window_id":'"$WINDOW_ID"', "reference": {"Index":2}, "focus": false}}}' | socat STDIO "$NIRI_SOCKET"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment