-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Program
shellevents
Maintainers of the program
trippwill
Bug or Regression?
Bug
Description
Hello! Hope you're doing well.
It's not exactly a bug. I'm trying to use event_closewindow but run into issues: how do I get the target window's WINDOWADDRESS?
event_openwindow provides WINDOWCLASS so it's easy to do so:
event_openwindow() {
# WINDOWADDRESS WORKSPACENAME WINDOWCLASS WINDOWTITLE
case "$WINDOWCLASS" in "firefox")
bash "$HOME"/.config/zsh/scripts/enable-audio.sh
;;
esac
}But I can't do the same for event_closewindow because it only provides WINDOWADDRESS:
event_closewindow() {
# WINDOWADDRESS
}I tried the following:
event_closewindow() {
# WINDOWADDRESS
target_address=$(hyprctl --batch clients -j | jq -r '.[] | select(.class == "firefox") | .address')
if [[ "$WINDOWADDRESS" == "$target_address" ]]; then
bash "$HOME"/.config/zsh/scripts/disable-audio.sh
fi
}But the window is already closed so target_address is always null.
Any input is much appreciated. Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working