I would like to modify this so it notifies me when there is 5 minutes left before it suspends.
echo "This script will suspend computer in 15 minutes if there is no mouse or keyboard activity."
while :; do
if (( $(xprintidle) >= 900000 )); then
systemctl suspend
fi
sleep 0.5
done
echo "This script will suspend computer in 15 minutes if there is no mouse or keyboard activity."
while :; do
if (( $(xprintidle) >= 900000 )); then
systemctl suspend
fi
sleep 0.5
done