From 42d489f4bd62157efc69d0c7edd2e815000f7522 Mon Sep 17 00:00:00 2001 From: joygnu Date: Thu, 22 Aug 2024 19:02:54 +0200 Subject: [PATCH] hypridle --- home/hypridle/default.nix | 4 ++-- home/hyprland/default.nix | 2 +- home/hyprland/scripts/hypridle.sh | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 home/hyprland/scripts/hypridle.sh diff --git a/home/hypridle/default.nix b/home/hypridle/default.nix index 2702c81..92d7ae7 100644 --- a/home/hypridle/default.nix +++ b/home/hypridle/default.nix @@ -4,12 +4,12 @@ settings = { listener = [ { - timeout = 600; + timeout = 300; on-timeout = "hyprctl dispatch dpms off"; on-resume = "hyprctl dispatch dpms on"; } { - timeout = 1200; + timeout = 600; on-timeout = "systemctl suspend"; on-resume = "hyprctl dispatch dpms on"; } diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 5648838..f356ec1 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -48,7 +48,7 @@ exec-once = [ "ags" - "hypridle" + "sh ~/nix/home/hyprland/scripts/hypridle.sh" ]; windowrule = [ diff --git a/home/hyprland/scripts/hypridle.sh b/home/hyprland/scripts/hypridle.sh new file mode 100644 index 0000000..a438b73 --- /dev/null +++ b/home/hyprland/scripts/hypridle.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +hostname=$(hostname) + +[ "$hostname" = "latop" ] && hyprilde +