From d49f19e48b2abe123d98f4144c837da3dec1b94c Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Fri, 11 Mar 2022 13:43:31 +0100 Subject: [PATCH] suspend update --- lock_and_suspend | 2 +- toggle_suspend | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lock_and_suspend b/lock_and_suspend index 953ebad..03fe95a 100755 --- a/lock_and_suspend +++ b/lock_and_suspend @@ -1,3 +1,3 @@ #!/bin/sh # Lock screen and suspend if enabled in config file -DISPLAY=:0 i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend +i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend diff --git a/toggle_suspend b/toggle_suspend index c6a0897..ff7413f 100755 --- a/toggle_suspend +++ b/toggle_suspend @@ -1,5 +1,5 @@ #!/bin/sh -if [ -z "$(grep off "/run/user/1000/enable_suspend")" ] ; then +if [ -z "$(grep off "$XDG_RUNTIME_DIR/enable_suspend")" ] ; then echo off > "$XDG_RUNTIME_DIR/enable_suspend" notify-send "Sleep mode is now" "off" else