aboutsummaryrefslogtreecommitdiff
path: root/move-qemu.sh
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2025-09-24 05:01:20 +0200
committersrdusr <trevorgray@srdusr.com>2025-09-24 05:01:20 +0200
commit553cb2204b0bf27afe13c6332f5679bbd47172a0 (patch)
tree75c86ff018122a682e0afd7a0e2a0228a63e44bd /move-qemu.sh
parentb20e4e004be74884cc72c57a3128e36fd5177d7a (diff)
downloaddotfiles-553cb2204b0bf27afe13c6332f5679bbd47172a0.tar.gz
dotfiles-553cb2204b0bf27afe13c6332f5679bbd47172a0.zip
Update/Overhaul
Diffstat (limited to 'move-qemu.sh')
-rwxr-xr-xmove-qemu.sh74
1 files changed, 0 insertions, 74 deletions
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