#!/bin/bash # # This script moves the mouse curser in order to inhibit screen lock and$ # # # endless loop while [ 1 ]; do # wait 5 minutes sleep 300; # state of VM state=$(virsh --connect qemu:///system dominfo Windows_10_Pro_Ga$ # if state contains "running" -> it is running if [[ $state = *"running"* ]]; then # Test if idle for more than 5 minutes (xprintidle provi$ if [ $(xprintidle) -gt 300000 ]; then # move mouse xdotool mousemove 50 50; fi; fi; done;