#!/bin/sh # configuration script_wait=$((4*60)); # 4 minutes # process process="chrome"; # wait in miliseconds ttw=$((script_wait*1000)); while true do idle=$(xprintidle); if [ $idle -gt $ttw ]; then if pgrep $process > /dev/null 2>&1; then xdotool key shift; fi fi sleep $script_wait done