mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 01:43:10 -05:00
Move long xidlehook command for laptops to script
This commit is contained in:
parent
48177ecef0
commit
0507ec52ae
2 changed files with 11 additions and 1 deletions
|
@ -72,7 +72,7 @@ xsettingsd &
|
|||
$HOME/.local/bin/pipewire-launcher &
|
||||
{{- end }}
|
||||
{{- if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "triangulum")) }}
|
||||
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 3600 "loginctl suspend" "xrandr --output eDP-1 --brightness 1 && redshift -r & disown" &
|
||||
$HOME/.local/bin/xidlehook-laptop &
|
||||
cbatticon -u 20 -i standard -c "loginctl suspend" &
|
||||
$HOME/.local/bin/tint2-launcher &
|
||||
{{- end }}
|
||||
|
|
10
dot_local/bin/executable_xidlehook-laptop
Normal file
10
dot_local/bin/executable_xidlehook-laptop
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/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" &
|
Loading…
Reference in a new issue