Add: Lockscreen (wip)

This commit is contained in:
Ly-sec
2025-08-14 13:17:44 +02:00
parent 0069463069
commit 71433c7807
5 changed files with 804 additions and 2 deletions
+2
View File
@@ -14,6 +14,8 @@ NBox {
readonly property real scaling: Scaling.scale(screen)
property string uptimeText: "--"
Layout.fillWidth: true
// Height driven by content
+10 -1
View File
@@ -6,10 +6,13 @@ import Quickshell.Io
import Quickshell.Widgets
import qs.Services
import qs.Widgets
import qs.Modules.Lockscreen
NPanel {
id: powerMenu
visible: false
// Anchors will be set by the parent component
function show() {
@@ -110,8 +113,9 @@ NPanel {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
// TODO: Implement lock screen functionality
console.log("Lock screen requested")
// Lock the screen
lockScreen.locked = true
powerMenu.visible = false
}
}
@@ -416,4 +420,9 @@ NPanel {
command: ["loginctl", "terminate-user", Quickshell.env("USER")]
running: false
}
// Lockscreen instance
Lockscreen {
id: lockScreen
}
}
+1
View File
@@ -15,6 +15,7 @@ NLoader {
// Target screen to open on
property var targetScreen: null
function openAt(x, screen) {
anchorX = x
targetScreen = screen