From 90ee7f6d0355bed390126d488d0fcd7b6573d326 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 2 Nov 2020 01:26:06 -0500 Subject: [PATCH] lock: Move disabling DPMS to a function --- .config/i3/lock.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/i3/lock.sh b/.config/i3/lock.sh index 0846f5a..2cb4c7f 100755 --- a/.config/i3/lock.sh +++ b/.config/i3/lock.sh @@ -14,13 +14,17 @@ lock() { --pass-media-keys $@ } +unsetDPMS() { + xset dpms 0 0 0 +} + case "$1" in lock) - trap "xset dpms 0 0 0" HUP INT TERM + trap "unsetDPMS" HUP INT TERM # set dpms time to argument, or 0 if none given xset +dpms dpms ${2-0} ${2-0} ${2-0} lock ${2+"--nofork"} - xset dpms 0 0 0 + unsetDPMS ;; logout) i3-msg exit