#!/bin/bash # Wait short so that Hyprland starts completely sleep 5 # Select WorkSpace 1 and start 4 Alacritty windows hyprctl dispatch workspace 1 alacritty --title Workspace1-1 & alacritty --title Workspace1-2 & alacritty --title Workspace1-3 -e cmatrix & alacritty --title Workspace1-4 -e btop & # Give the windows enough time to start sleep 5 # Call window IDs based on the titles with Hyprctl clients WIN_ID_1=$(hyprctl clients | grep -B 4 "Workspace1-1" | grep "ID:" | awk '{print $2}') WIN_ID_2=$(hyprctl clients | grep -B 4 "Workspace1-2" | grep "ID:" | awk '{print $2}') WIN_ID_3=$(hyprctl clients | grep -B 4 "Workspace1-3" | grep "ID:" | awk '{print $2}') WIN_ID_4=$(hyprctl clients | grep -B 4 "Workspace1-4" | grep "ID:" | awk '{print $2}') # Debug-Output of the window IDs echo "Fenster-ID 1: $WIN_ID_1" echo "Fenster-ID 2: $WIN_ID_2" echo "Fenster-ID 3: $WIN_ID_3" echo "Fenster-ID 4: $WIN_ID_4" # Check whether all window IDs have been determined correctly if [[ -z "$WIN_ID_1" || -z "$WIN_ID_2" || -z "$WIN_ID_3" || -z "$WIN_ID_4" ]]; then echo "Fehler: Eine oder mehrere Fenster-IDs konnten nicht ermittelt werden." hyprctl clients # Edition of all clients for further examination exit 1 fi # Edition of All Clients for Further Examination echo "Verschieben von Fenstern..." echo "hyprctl dispatch movewindowpixel 863 232 $WIN_ID_1" hyprctl dispatch movewindowpixel 863 232 $WIN_ID_1 echo "hyprctl dispatch movewindowpixel 863 581 $WIN_ID_2" hyprctl dispatch movewindowpixel 863 581 $WIN_ID_2 echo "hyprctl dispatch movewindowpixel 16 756 $WIN_ID_3" hyprctl dispatch movewindowpixel 16 756 $WIN_ID_3 echo "hyprctl dispatch movewindowpixel 16 232 $WIN_ID_4" hyprctl dispatch movewindowpixel 16 232 $WIN_ID_4 # Then adjust the size of the windows echo "Anpassen der Fenstergröße..." echo "hyprctl dispatch resizewindowpixel 487 337 $WIN_ID_1" hyprctl dispatch resizewindowpixel 487 337 $WIN_ID_1 echo "hyprctl dispatch resizewindowpixel 487 336 $WIN_ID_2" hyprctl dispatch resizewindowpixel 487 336 $WIN_ID_2 echo "hyprctl dispatch resizewindowpixel 835 161 $WIN_ID_3" hyprctl dispatch resizewindowpixel 835 161 $WIN_ID_3 echo "hyprctl dispatch resizewindowpixel 835 512 $WIN_ID_4" hyprctl dispatch resizewindowpixel 835 512 $WIN_ID_4 # Place the focus on the btop window with hyprctl echo "Fokus setzen auf Fenster $WIN_ID_4" hyprctl dispatch focuswindow $WIN_ID_4