Add support for clone terminal in hyprland
This commit is contained in:
parent
807fe1d479
commit
4b76454bcd
@ -1,8 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Extract parent window uuid
|
# 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
|
# Generate new uuid for new terminal
|
||||||
uuid=$(uuidgen)
|
uuid=$(uuidgen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user