]> git.mdlowis.com Git - proto/labwc.git/commitdiff
docs/autostart: add swayidle example
authorJohan Malm <jgm323@gmail.com>
Sun, 28 Nov 2021 22:54:22 +0000 (22:54 +0000)
committerJohan Malm <jgm323@gmail.com>
Sun, 28 Nov 2021 22:54:22 +0000 (22:54 +0000)
docs/autostart

index 408b95cb0afd77532ac2eca08582dc1274ef1cc7..a9772be8ecf8c80fcd84d08cb1be93d41a89ee67 100644 (file)
@@ -19,3 +19,11 @@ waybar >/dev/null 2>&1 &
 # org.freedesktop.Notifications D-Bus API and require a client such as mako to
 # function correctly. Thunderbird is an example of this.
 mako >/dev/null 2>&1 &
+
+# Lock screen after 5 minutes; turn off display after another 5 minutes
+swayidle -w \
+       timeout 300 'swaylock -f -c 000000' \
+       timeout 600 'wlr-randr --output eDP-1 --off' \
+       resume 'wlr-randr --output eDP-1 --on' \
+       before-sleep 'swaylock -f -c 000000' >/dev/null 2>&1 &
+