From 553cb2204b0bf27afe13c6332f5679bbd47172a0 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 24 Sep 2025 05:01:20 +0200 Subject: Update/Overhaul --- move-qemu.sh | 74 ------------------------------------------------------------ 1 file changed, 74 deletions(-) delete mode 100755 move-qemu.sh (limited to 'move-qemu.sh') diff --git a/move-qemu.sh b/move-qemu.sh deleted file mode 100755 index 7583cff..0000000 --- a/move-qemu.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -# -#function move_qemu_window { -# find_window_title() { -# hyprctl clients | grep -q "QEMU (nixos) - noVNC — Mozilla Firefox" -# } -# -# # Function to move the window to workspace 3 -# move_window() { -# local window_title="$1" -# if [[ -n $window_title ]]; then -# hyprctl dispatch movetoworkspace 3,title:"$window_title" -# echo "Moved window to workspace 3." -# else -# echo "Failed to find window title." -# fi -# } -# -# # Function to handle socket input -# handle_socket() { -# while read -r line; do -# case "$line" in -# *"QEMU (nixos) - noVNC — Mozilla Firefox"*) -# echo "Socket message received: "$line -# if find_window_title; then -# window_title="^QEMU \(.*\) - noVNC — Mozilla Firefox*" -# move_window ""$window_title -# else -# echo "Failed to find window title." -# fi -# ;; -# *) -# echo "Ignoring socket message: "$line -# ;; -# esac -# done -# } -# -# # Wait for the socket and handle messages -# echo "Waiting for socket messages..." -# socat - "UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | handle_socket -#} -# -#move_qemu_window - -function move_qemu_window { - find_window_title() { - hyprctl clients | grep -q "QEMU (nixos) - noVNC — Mozilla Firefox" - } - - # Function to move the window to workspace 3 - move_window() { - local window_title="$1" - if [[ -n $window_title ]]; then - hyprctl dispatch movetoworkspace 3,title:"$window_title" - echo "Moved window to workspace 3." - else - echo "Failed to find window title." - fi - } - - # Wait for the window to appear - echo "Waiting for window..." - while true; do - if find_window_title; then - window_title="^QEMU \(.*\) - noVNC — Mozilla Firefox*" - move_window "$window_title" - fi - sleep 1 # Check every second - done -} - -move_qemu_window -- cgit v1.2.3