From b1534e45c42a66156d766907d58a696102005208 Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Mon, 29 Jun 2026 06:01:51 -0400 Subject: [PATCH] update: add ATRI idle config --- hypridle-ATRI.conf | 20 ++++++++++++++++++++ lua/modules/hypridle.lua | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 hypridle-ATRI.conf diff --git a/hypridle-ATRI.conf b/hypridle-ATRI.conf new file mode 100644 index 0000000..9e5d26b --- /dev/null +++ b/hypridle-ATRI.conf @@ -0,0 +1,20 @@ +general { + ignore_dbus_inhibit = false +} + +general { + lock_cmd = pidof hyprlock || hyprlock # 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. +} + +# dpms +listener { + # DPMS TIMEOUT + timeout = 660 + # DPMS ONTIMEOUT + on-timeout = hyprctl dispatch dpms off + # DPMS ONRESUME + on-resume = hyprctl dispatch dpms on +} + diff --git a/lua/modules/hypridle.lua b/lua/modules/hypridle.lua index 6f1c6f9..1e83f5d 100644 --- a/lua/modules/hypridle.lua +++ b/lua/modules/hypridle.lua @@ -1,7 +1,12 @@ +local settings=require("lua.lib.settings") local M = {} local function start_hypridle() - hl.exec_cmd("hypridle") + if string.sub(settings["hostname"], 1, 4) == "ATRI" then + hl.exec_cmd("hypridle -c ~/.config/hypr/hypridle-ATRI.conf") + else + hl.exec_cmd("hypridle") + end end M.autostart = {