hyprland scripts

This commit is contained in:
Hannes
2025-10-16 20:50:11 +02:00
parent 3add98f7bb
commit 178bff8856
41 changed files with 446 additions and 0 deletions

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

View File

@@ -0,0 +1,39 @@
#!/bin/bash
timeout=50 # 10 seconds max (50 * 0.2s)
count=0
while (( count < timeout )); do
win_addr=$(hyprctl clients | awk '
/^Window/ { addr=$2 }
/title: GoXLR Utility/ { print addr }
')
if [[ -n "$win_addr" ]]; then
# Add 0x prefix if missing
if [[ "$win_addr" != 0x* ]]; then
win_addr="0x$win_addr"
fi
# Get fullscreen state (1 or 0)
fullscreen_state=$(hyprctl clients | awk -v addr="${win_addr#0x}" '
$1 == "Window" && $2 == addr { found=1 }
found && /^fullscreen:/ { print $2; exit }
')
if [[ "$fullscreen_state" == "1" ]]; then
hyprctl dispatch fullscreen address:$win_addr
echo "Fullscreen disabled for GoXLR Utility."
else
echo "GoXLR Utility is not fullscreen."
fi
exit 0
fi
sleep 0.2
((count++))
done
echo "GoXLR Utility window not found within timeout." >&2
exit 1