Customized Lock Screen and Notification Center with Quickshell
Score —PAM authentication integration, smooth launch animations, and a grouped Wayland notification center architecture.
Contents
Summary: This explains Quickshell's solution to the flickering seen on external lock screens and the problem of notifications remaining behind the lock: a lock surface that stays above everything and does not leak input, using the Wayland
ext-session-lock-v1protocol, password verification with PAM, and a notification center that groups notifications by application.
Desktop security and notification management are among the most sensitive parts of the user experience. The screen flickering experienced when using an external lock screen, or notifications disappearing behind the lock screen, undermine the feeling of a cohesive desktop.
Quickshell provides an elegant, secure and integrated lock screen by natively supporting the Wayland ext-session-lock-v1 protocol and the Linux PAM (Pluggable Authentication Modules) infrastructure.
1. Wayland Session Lock Protocol
When the screen is locked, Quickshell creates a secure surface that goes above all other windows and does not allow any input event to leak behind it:
import QtQuick 2.15
import Quickshell 1.0
import Quickshell.Wayland 1.0
SessionLock {
id: lockSurface
Rectangle {
anchors.fill: parent
color: "#08090b"
// Dijital Saat
Text {
anchors.centerIn: parent
anchors.verticalCenterOffset: -60
text: Qt.formatDateTime(new Date(), "hh:mm")
font.pixelSize: 64
font.bold: true
color: "#ffffff"
}
// Şifre Giriş Alanı
TextInput {
id: passwordField
anchors.centerIn: parent
anchors.verticalCenterOffset: 40
echoMode: TextInput.Password
color: "#00ffcc"
font.pixelSize: 18
focus: true
onAccepted: {
PamAuth.authenticate(passwordField.text);
}
}
}
}
2. Grouped Notification Center
Quickshell's notification server (org.freedesktop.Notifications) automatically groups incoming notifications by application name. If the user wishes, they can list past notifications from the side panel or clear them with a single click.
My reading
- The lock screen must be protected by the protocol: the session lock protocol prevents input from reaching the windows behind it.
- Verification is done with the system's own infrastructure: the password check goes through PAM.
- Grouping reduces notification clutter: notifications are collected by application name.