This commit is contained in:
Hannes
2026-05-08 17:53:39 +02:00
commit 0c8deaa90b
70 changed files with 3448 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
timeout=50 # 10 seconds max (50 * 0.2s)
count=0
while (( count < timeout )); do
# Grab both address and floating status
read -r win_addr floating <<< $(hyprctl -j clients | jq -r '.[] | select(.title == "Grayjay") | "\(.address) \(.floating)"')
if [[ -n "$win_addr" ]]; then
# Add 0x prefix if missing
if [[ "$win_addr" != 0x* ]]; then
win_addr="0x$win_addr"
fi
# If the window is floating, toggle to make it tiled
if [[ "$floating" == "true" ]]; then
hyprctl dispatch togglefloating address:$win_addr
fi
# Move to workspace 2 silently
hyprctl dispatch movetoworkspacesilent 2,address:$win_addr
exit 0
fi
sleep 0.2
((count++))
done
echo "Grayjay window not found within timeout." >&2
exit 1