Ok, so just in case anyone else needs this, that’s how I did it.
- As instructed above, I monitor the output of
xscreensaver-command -watch and send
mosquitto_pub command to a VM that has local connectivity (
while read line
[[ $line =~ ^LOCK ]] && STATE='locked'
[[ $line =~ ^UNBLANK ]] && STATE='unlocked'
CMD=(qvm-run -p wg-tailscale "'"mosquitto_pub -h my_mqtt_host -t qubes-comupter-name/lock_status -m $STATE"'")
done < <(/usr/bin/xscreensaver-command -watch)
echo ...|sh is ugly, but my brain fried while trying to figure out another way)
- To make it auto-start I created this
qubes-monitor-screenlock.desktop file in
.config/autostart of dom0: