swayidle: move to start script
This commit is contained in:
parent
773bf1899a
commit
51e820c19e
2 changed files with 27 additions and 19 deletions
20
bin/start_swayidle.sh
Executable file
20
bin/start_swayidle.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/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 \
|
||||
timeout 1500 "$TERM_CMD bash -c 'notify-send -u critical display\ will\ turn\ off\ soon'" \
|
||||
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"
|
Loading…
Add table
Add a link
Reference in a new issue