mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 08:33:55 -05:00
hyprland: fixed swayidle dpms calling waymsg instead of hyprctl
This commit is contained in:
parent
dab2d33585
commit
fe52832fab
|
@ -93,10 +93,10 @@
|
|||
lock = pkgs.swaylock + ''/bin/swaylock -l -f -c 303446 --indicator-idle-visible --font "Noto SansM Nerd Font Regular" --ring-color ca9ee6 --inside-color 303446'';
|
||||
idled =
|
||||
if osConfig.networking.hostName == "mauville"
|
||||
then ''${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms off"' resume '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms on"' before-sleep '${lock}'
|
||||
then ''${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' resume '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' before-sleep '${lock}'
|
||||
''
|
||||
else ''
|
||||
${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms off"' resume '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms on"' timeout 900 '${pkgs.systemd}/bin/systemctl suspend' before-sleep '${lock}'
|
||||
${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' resume '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' timeout 900 '${pkgs.systemd}/bin/systemctl suspend' before-sleep '${lock}'
|
||||
'';
|
||||
|
||||
hyprnome = pkgs.hyprnome + "/bin/hyprnome";
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
general {
|
||||
lock_cmd = pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock # avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = ${pkgs.systemd}/bin/loginctl lock-session # lock before suspend.
|
||||
after_sleep_cmd = ${pkgs.hyprland}/bin/hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||
after_sleep_cmd = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||
}
|
||||
|
||||
listener {
|
||||
|
@ -41,8 +41,8 @@
|
|||
|
||||
listener {
|
||||
timeout = 330 # 5.5min
|
||||
on-timeout = ${pkgs.hyprland}/bin/hyprctl dispatch dpms off # screen off when timeout has passed
|
||||
on-resume = ${pkgs.hyprland}/bin/hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||
on-timeout = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off # screen off when timeout has passed
|
||||
on-resume = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
|
||||
listener {
|
||||
|
|
Loading…
Reference in a new issue