Add support for clone terminal in hyprland

This commit is contained in:
Thomas Forgione 2025-04-14 22:52:17 +02:00
parent 807fe1d479
commit 4b76454bcd

View File

@ -1,8 +1,16 @@
#!/usr/bin/env bash
# Extract parent window uuid
WINDOW_ID=$(xdotool getactivewindow)
WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2)
# On hyprland
hyprctl monitors > /dev/null 2>&1
if [ $? -eq 0 ]; then
WM_NAME=$(hyprctl activewindow | grep title | cut -d ':' -f 2 | tr -d ' ')
else
WINDOW_ID=$(xdotool getactivewindow)
WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2)
fi
# Generate new uuid for new terminal
uuid=$(uuidgen)