2022-05-02 20:19:26 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
TERM_CMD="foot -T float"
|
|
|
|
LOCK_CMD="$HOME/.config/sway/bin/sway_lock"
|
|
|
|
SUS_CMD="$HOME/.config/sway/bin/sway_suspend"
|
|
|
|
|
|
|
|
### Idle configuration
|
|
|
|
# 10 min screen off
|
|
|
|
# 15 min lock
|
|
|
|
# 30 min suspend on battery
|
|
|
|
# 120 min suspend
|
|
|
|
pkill -x swayidle
|
|
|
|
swayidle -w \
|
2023-05-23 10:39:16 +02:00
|
|
|
timeout 1500 "$TERM_CMD bash -c 'dunstify -r 125 -t 300 display\ will\ turn\ off\ soon'" \
|
2022-05-02 20:19:26 +02:00
|
|
|
resume "$LOCK_CMD on" \
|
|
|
|
timeout 1800 "$LOCK_CMD off" \
|
|
|
|
timeout 2700 "$LOCK_CMD lockonly" \
|
|
|
|
timeout 3600 "$SUS_CMD suspend-battery" \
|
|
|
|
timeout 7200 "$SUS_CMD suspend" \
|
|
|
|
before-sleep "$LOCK_CMD lock"
|