From 484dcc01c26d2567048d5d279dfce25399d7a6be Mon Sep 17 00:00:00 2001 From: ryukamish Date: Sun, 19 Apr 2026 19:26:28 +0530 Subject: add: path fix for niriwall and idling toggle for swayidle --- scripts/toggle-idle | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/toggle-idle (limited to 'scripts/toggle-idle') diff --git a/scripts/toggle-idle b/scripts/toggle-idle new file mode 100755 index 0000000..c5334bf --- /dev/null +++ b/scripts/toggle-idle @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +chk_idle=$(pgrep swayidle) +if [ -n "$chk_idle" ]; then + pkill swayidle && notify-send "SWAYIDLE" "Idling stopped" +else + setsid -f swayidle -w \ + timeout 600 'swaylock -f' \ + timeout 630 'niri msg action power-off-monitors' \ + resume 'niri msg action power-on-monitors' \ + before-sleep 'swaylock -f' && \ + notify-send "SWAYIDLE" "Idling started" +fi -- cgit v1.3