I want to use short timeout with swayidle to power off screen when it's locked. The hard part is detecting that screen lock is active. Currently the only way is grepping process table:
pgrep -x -u "$USER" swaylock
Or a bit "better" but even more verbose by taking session into account:
pgrep -x --cgroup "/user.slice/user-$(id -u).slice/session-$XDG_SESSION_ID.scope" swaylock
Obviously there must be a better way that queries Wayland server directly? Could additional mode of operation be added to swaylock that does exactly that?
This is somewhat related to swaywm/swayidle#2
I want to use short timeout with
swayidleto power off screen when it's locked. The hard part is detecting that screen lock is active. Currently the only way is grepping process table:pgrep -x -u "$USER" swaylockOr a bit "better" but even more verbose by taking session into account:
pgrep -x --cgroup "/user.slice/user-$(id -u).slice/session-$XDG_SESSION_ID.scope" swaylockObviously there must be a better way that queries Wayland server directly? Could additional mode of operation be added to swaylock that does exactly that?
This is somewhat related to swaywm/swayidle#2