summaryrefslogtreecommitdiff
path: root/idle.sh
blob: ff833a40e0658a886dfce6cd5207649ed556b59a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/bash


while true; do
    if [[ "$(systemctl is-system-running)" == "running" || "$(systemctl is-system-running)" == "degraded" ]]; then
        if [[ "$(xprintidle)" -gt 600000 ]]; then  # Changed from 600000 (10 minutes) to 3600000 (1 hour)
            $HOME/scripts/auto-update.sh &
            killall picom; bspcomp &
        else
            sleep 60
        fi
    fi
done