i have tried using the qubes os buskill guide for setting up udev rules. i have also made a udev rule in /etc/udev/ rules.d/99-usb-removed.rules with the following
ACTION==“remove”, RUN+=“/home/user/script.sh”
i run the following commands each time
sudo udevadm control --reload
sudo udevadm trigger
both in sys-usb the command i am trying to run when unplugging a device is
qrexec-client-vm dom0 buskill.lock
the command works when i run it