mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-11-09 22:10:48 -05:00
18 lines
586 B
Text
18 lines
586 B
Text
|
#!/bin/bash
|
||
|
|
||
|
# dim screen after 2 minutes, turn screen off after 10, suspend after an hour
|
||
|
echo "---" | tee -a /tmp/swayidle-dim.log
|
||
|
swayidle -w \
|
||
|
timeout 120 "light -O && light -S .1" \
|
||
|
resume "light -I" \
|
||
|
2>&1 | tee -a /tmp/swayidle-dim.log & disown
|
||
|
|
||
|
echo "---" | tee -a /tmp/swayidle.log
|
||
|
swayidle -w \
|
||
|
timeout 600 "wlr-randr --output eDP-1 --off" \
|
||
|
timeout 3600 "loginctl suspend" \
|
||
|
resume "wlr-randr --output eDP-1 --on" \
|
||
|
before-sleep "if ![[ pgrep -x waylock ]]; then waylock -fork-on-lock -init-color 0x000000; fi" \
|
||
|
2>&1 | tee -a /tmp/swayidle.log & disown
|
||
|
|