Skip to content

add support for other screen lockers using dbus (via loginctl lock-session)#34

Open
Alexthemediocre wants to merge 2 commits intodebuggyo:mainfrom
Alexthemediocre:locker
Open

add support for other screen lockers using dbus (via loginctl lock-session)#34
Alexthemediocre wants to merge 2 commits intodebuggyo:mainfrom
Alexthemediocre:locker

Conversation

@Alexthemediocre
Copy link

Enables screen lockers other than hyprlock to be used as long as they are configured to respond to dbus lock events. See Arch Wiki on session lock, loginctl(1). Triggers said dbus event using loginctl lock-session.

======

An example setup that can respond to dbus lock events: swaylock + swayidle, with the below swayidle.service (modified from an example in the niri documentation). swayidle handles the dbus events and spawns swaylock.

~/.config/systemd/user/swayidle.service
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target

[Service]
ExecStart=/usr/bin/swayidle -w timeout 601 'niri msg action power-off-monitors' timeout 600 'swaylock -f' before-sleep 'swaylock -f' lock 'swaylock -f'
Restart=on-failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant