Hybernates your display after entering the lockscreen on KDE.
Go to file
2020-09-09 23:51:53 +02:00
afterlock Explain keypress sleep debouncing in hybernateDisplayLoop 2020-09-08 16:14:34 +02:00
cmd/after-lock Remove logfile if it's empty before exiting 2020-09-09 23:51:53 +02:00
lockfile Rename package 2020-09-08 16:32:55 +02:00
xdg Group lockscreen and display suspension related code 2020-09-08 14:08:54 +02:00
.gitignore Add .gitignore 2020-08-18 11:07:40 +02:00
go.mod Rename package 2020-09-08 16:32:55 +02:00
proof-of-concept.sh Initial commit. Add poc hack script 2020-08-17 12:28:52 +02:00
README.md Rename package 2020-09-08 16:32:55 +02:00

KDE Lockscreen Suspend Display (KDE LSD)

What?

KDE Plasma (as of 5.19.4) lacks the funcionality of hybernating your display after locking your computer.

This hack implements Gnome-like lockscreen behaviour: it hybernates your display after a given timeout if the computer is locked. It also makes sure that the display won't turn off while you are typing your password to unlock your machine.

How?

This whole started as a simple bash script (proof-of-concept.sh) using qdbus and xset to implement this functionality. However, it had an annoying defect: the screen would hybernate after the timeout no matter what (i.e. the display could turn off while you were typing your password to unlock the machine). To remedy this defect I've decided to monitor keypresses via /dev/input and rewrite the whole thing in golang to provide proper debouncing (i.e. the timeout resets if you start typing).

Beware this is a quick&dirty hack. Instead of calling qdbus and xset from golang, proper dbus bindings should be used. Instead of registering a go binary to execute once the lockscreen is active (System Settings -> Notifications -> Application Settings -> Screen Saver), the whole thing should probably be rewritten in C++ and contributed to KDE.