usable
This commit is contained in:
@@ -8,7 +8,6 @@ import Quickshell.Widgets
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.Greetd
|
||||
import Quickshell.Services.Pam
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
|
||||
@@ -19,23 +18,63 @@ ClippingWrapperRectangle {
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
id: error
|
||||
text: ""
|
||||
color: Pywal.colors.color13
|
||||
visible: false
|
||||
}
|
||||
Text {
|
||||
text: "User"
|
||||
color: Pywal.special.foreground
|
||||
}
|
||||
TextInput {
|
||||
id: username
|
||||
text: "guest"
|
||||
color: Pywal.special.foreground
|
||||
}
|
||||
Text {
|
||||
text: "Password"
|
||||
color: Pywal.special.foreground
|
||||
}
|
||||
TextInput {
|
||||
id: password
|
||||
text: "test"
|
||||
echoMode: TextInput.Password
|
||||
color: Pywal.special.foreground
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Login"
|
||||
|
||||
onClicked: {
|
||||
if(Greetd.available) {
|
||||
Greetd.authMessage.connect((m, e, rr, er) => {
|
||||
console.log(m)
|
||||
if(e) {
|
||||
if(er) {
|
||||
error.visible = true
|
||||
error.text = m
|
||||
}
|
||||
} else if(rr) {
|
||||
console.log("send password")
|
||||
Greetd.respond(password.text)
|
||||
}
|
||||
})
|
||||
|
||||
Greetd.authFailure.connect((m) => {
|
||||
error.visible = true
|
||||
error.text = m
|
||||
})
|
||||
|
||||
Greetd.readyToLaunch.connect(() => {
|
||||
console.log("readyToLaunch")
|
||||
Greetd.launch([ "Hyprland" ])
|
||||
})
|
||||
console.log("createSession")
|
||||
Greetd.createSession(username.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user