generated from blue-build/template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ergotu
committed
May 26, 2024
1 parent
555d00c
commit 44d3352
Showing
2 changed files
with
21 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
|
||
exec-once = waybar | ||
exec-once = /usr/lib/lxpolkit | ||
exec-once = dunst | ||
exec-once = nm-applet | ||
exec-once = swayidle -w timeout 600 "$lockCommand" | ||
exec-once = hypridle -c /usr/share/hyprland/hypridle.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
general { | ||
lock_cmd=hyprlock | ||
before_sleep_cmd=pgrep hyprlock || hyprlock | ||
lock_cmd = pidof hyprlock || hyprlock -c /usr/share/hyprland/hyprlock.conf # avoid starting multiple hyprlock instances. | ||
before_sleep_cmd = loginctl lock-session # lock before suspend. | ||
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. | ||
} | ||
|
||
#Suspend system if running on Battery | ||
listener { | ||
timeout=300 | ||
on-timeout = export bat=$(ls /sys/class/power_supply | grep -m 1 "BAT") && if [[ "$(cat /sys/class/power_supply/$bat/status)" == "Discharging" ]]; then systemctl suspend; fi | ||
timeout = 150 # 2.5min. | ||
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. | ||
on-resume = brightnessctl -r # monitor backlight restore. | ||
} | ||
|
||
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight. | ||
listener { | ||
timeout = 150 # 2.5min. | ||
on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. | ||
on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. | ||
} | ||
|
||
#Lock idle session | ||
listener { | ||
timeout = 600 | ||
on-timeout = loginctl lock-session | ||
on-resume = loginctl unlock-session && hyprctl dispatch dpms on | ||
timeout = 300 # 5min | ||
on-timeout = loginctl lock-session # lock screen when timeout has passed | ||
} | ||
|
||
#Sleep monitors | ||
listener { | ||
timeout = 660 | ||
on-timeout = hyprctl dispatch dpms off | ||
on-resume = hyprctl dispatch dpms on | ||
timeout = 330 # 5.5min | ||
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed | ||
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. | ||
} | ||
|
||
#Suspend after extended idle | ||
listener { | ||
timeout = 10800 | ||
on-timeout = systemctl suspend | ||
timeout = 1800 # 30min | ||
on-timeout = systemctl suspend # suspend pc | ||
} |