timeout 60 '[ "$(cat /sys/class/power_supply/AC/online)" = "0" ] && brightnessctl -s && brightnessctl set 5% && notify-send "Sleeping in 1 minute"' resume 'brightnessctl -r'
timeout 110 '[ "$(cat /sys/class/power_supply/AC/online)" = "0" ] && notify-send "Going to Sleep"'
timeout 120 '[ "$(cat /sys/class/power_supply/AC/online)" = "0" ] && qs -c noctalia-shell ipc call sessionMenu lockAndSuspend'
timeout 290 '[ "$(cat /sys/class/power_supply/AC/online)" = "1" ] && notify-send "Locking Screem"'
timeout 300 '[ "$(cat /sys/class/power_supply/AC/online)" = "1" ] && qs -c noctalia-shell ipc call lockScreen lock'
