lxqt / lxqt-session

The LXQt session manager
https://lxqt.github.io
GNU Lesser General Public License v2.1
57 stars 51 forks source link

Implement screenlocking on wayland #511

Closed stefonarch closed 2 months ago

stefonarch commented 5 months ago

Screenlocking setting in lxqt-config-session defaults always to "false" to prevent a crash: https://github.com/lxqt/lxqt-session/commit/0048ae69b38fb9db6b339787336d16c944869551

Replacing xdg-screensaver with a script that launches swaylock works in lxqt-leave --lockscreen.

Expected Behavior

Users should be able to set a screenlocker for wayland which will be used. There are only 4 lockers afaik: https://github.com/swaywm/swaylock https://github.com/ifreund/waylock https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/ https://github.com/jovanlanik/gtklock

Current Behavior

Only manually implementation with swayidle is working.

swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'wlopm --off \*' \
resume 'wlopm --on \*' \
before-sleep 'swaylock -f -c 000000' >/dev/null 2>&1 &
Possible Solution

Files: https://github.com/lxqt/liblxqt/blob/master/lxqtscreensaver.cpp https://github.com/lxqt/lxqt-session/blob/master/lxqt-session/src/lockscreenmanager.cpp

Context

One of the features needed for LXQt 2.1

stefonarch commented 5 months ago

Just noticed we have a PR still open, this could be just fine for wayland: https://github.com/lxqt/lxqt-session/pull/322 https://github.com/lxqt/liblxqt/pull/256

stefonarch commented 2 months ago

Fixed in https://github.com/lxqt/lxqt-session/commit/d51d521c6cffe7190f56be833b991005151ea80c