mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-11-09 14:00:47 -05:00
11 lines
602 B
Text
11 lines
602 B
Text
|
#!/bin/bash
|
||
|
|
||
|
# Wait on pipewire or "--not-when-audio" will break everything
|
||
|
until pgrep -u $UID -x pipewire-pulse >/dev/null; do sleep 1; done
|
||
|
|
||
|
# dim screen after 2 minutes, lock screen after 10, suspend after an hour
|
||
|
xidlehook --not-when-audio --not-when-fullscreen \
|
||
|
--timer 120 "killall -q redshift && xrandr --output eDP-1 --brightness .1" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" \
|
||
|
--timer 480 "xset s activate" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" \
|
||
|
--timer 3000 "loginctl suspend" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" &
|