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.
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_closewindowbut run into issues: how do I get the target window'sWINDOWADDRESS?event_openwindowprovidesWINDOWCLASSso it's easy to do so:But I can't do the same for
event_closewindowbecause it only providesWINDOWADDRESS:I tried the following:
But the window is already closed so
target_addressis alwaysnull.Any input is much appreciated. Thank you.