From b50d0ea4c8bbb0f823b643bc7998c45ed51046f6 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Wed, 4 May 2022 21:52:20 +0100 Subject: [PATCH] docs/autostart: use wlopm with * With swayidle timeout/resume, use wlopm --off/--on with * instead of specifying output names. When * is given as parameter to an operation wlopm will do the operation for all discovered outputs. https://git.sr.ht/~leon_plickat/wlopm/tree/master/item/wlopm.1#L68 --- docs/autostart | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/autostart b/docs/autostart index c79f1c34..f09ceb78 100644 --- a/docs/autostart +++ b/docs/autostart @@ -27,17 +27,8 @@ mako >/dev/null 2>&1 & # `wlr-randr --output --off` because this re-arranges views # (since a837fef). Instead use a wlr-output-power-management client such as # https://git.sr.ht/~leon_plickat/wlopm -# -# The swayidle example below only turns on/off one output. If you have -# multiple outputs, you could write a script like this: -# -# #!/bin/sh -# wlopm | while IFS=' ' read -r output state; do -# wlopm --toggle "${output}" -# done -# swayidle -w \ - timeout 3 'swaylock -f -c 000000' \ - timeout 6 'wlopm --off eDP-1' \ - resume 'wlopm --on eDP-1' \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'wlopm --off \*' \ + resume 'wlopm --on \*' \ before-sleep 'swaylock -f -c 000000' >/dev/null 2>&1 &