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
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
# Dependencies: hyprctl
# Wait until the window exists
keepassxc &
NAME="KeePassXC"
CLASS="org.keepassxc.KeePassXC"
WORKSPACE=401
while true; do
WIN=$(hyprctl clients -j | jq -r '.[] | select(.class == "'$CLASS'") | .address')
if [ -n "$WIN" ]; then
echo "Found window: $WIN"
break
fi
echo "Waiting for $NAME window..."
sleep 0.5
done
# Move to workspace
while true; do
# Focus the window
hyprctl dispatch focuswindow address:$WIN
sleep 0.1
ACTIVE=$(hyprctl activewindow -j | jq -r '.address')
if [ "$ACTIVE" = "$WIN" ]; then
echo "Window is now focused: $WIN"
hyprctl dispatch movetoworkspace $WORKSPACE
break
fi
echo "Waiting for focus..."
sleep $((RANDOM % 3))
done