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