quickshell-web/modules/Quickshell.Services.Greetd/Greetd.json

291 lines
8 KiB
JSON
Raw Normal View History

2024-09-27 23:35:19 +00:00
{
"name": "Greetd",
"module": "Quickshell.Services.Greetd",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": null,
"details": "This object provides access to a running greetd instance if present.\nWith it you can authenticate a user and launch a session.\n\nSee [the greetd wiki] for instructions on how to set up a graphical greeter.\n\n[the greetd wiki]: https://man.sr.ht/~kennylevinsen/greetd/#setting-up-greetd-with-gtkgreet\n",
"flags": [
"singleton"
],
"properties": {
"state": {
"type": {
"type": "local",
"module": "Quickshell.Services.Greetd",
"name": "GreetdState"
},
"details": "The current state of the greetd connection.\n",
"flags": [
"readonly"
]
},
"available": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the greetd socket is available.\n",
"flags": [
"readonly"
]
},
"user": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The currently authenticating user.\n",
"flags": [
"readonly"
]
}
},
"functions": [
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "cancelSession",
"id": "cancelSession",
"details": "Cancel the active greetd session.\n",
"params": []
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "createSession",
"id": "createSession",
"details": "Create a greetd session for the given user.\n",
"params": [
{
"name": "user",
"type": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
]
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "launch",
"id": "launch",
"details": "Launch the session, exiting quickshell.\nTYPE99Vstate99Tprop99TYPE must be `GreetdState.ReadyToLaunch` to call this function.\n",
"params": [
{
"name": "command",
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
}
]
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "launch",
"id": "launch",
"details": "Launch the session, exiting quickshell.\nTYPE99Vstate99Tprop99TYPE must be `GreetdState.ReadyToLaunch` to call this function.\n",
"params": [
{
"name": "command",
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
},
{
"name": "environment",
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
}
]
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "launch",
"id": "launch",
"details": "Launch the session, exiting quickshell if TYPE99Vquit99Tprop99TYPE is true.\nTYPE99Vstate99Tprop99TYPE must be `GreetdState.ReadyToLaunch` to call this function.\n\nThe TYPE99Vlaunched99Tprop99TYPE signal can be used to perform an action after greetd has acknowledged\nthe desired session.\n\n> [!WARNING] Note that greetd expects the greeter to terminate as soon as possible\n> after setting a target session, and waiting too long may lead to unexpected behavior\n> such as the greeter restarting.\n>\n> Performing animations and such should be done *before* calling TYPE99Vlaunch99Tprop99TYPE.\n",
"params": [
{
"name": "command",
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
},
{
"name": "environment",
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
},
{
"name": "quit",
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
}
}
]
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "respond",
"id": "respond",
"details": "Respond to an authentication message.\n\nMay only be called in response to an TYPE99VauthMessage99Tsignal99TYPE with `responseRequired` set to true.\n",
"params": [
{
"name": "response",
"type": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
]
}
],
"signals": {
"launched": {
"name": "launched",
"details": "Greetd has acknowledged the launch request and the greeter should quit as soon as possible.\n\nThis signal is sent right before quickshell exits automatically if the launch was not specifically\nrequested not to exit. You usually don't need to use this signal.\n",
"params": []
},
"error": {
"name": "error",
"details": "Greetd has encountered an error.\n",
"params": [
{
"name": "error",
"type": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
]
},
"authFailure": {
"name": "authFailure",
"details": "Authentication has failed an the session has terminated.\n\nUsually this is something like a timeout or a failed password entry.\n",
"params": [
{
"name": "message",
"type": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
]
},
"readyToLaunch": {
"name": "readyToLaunch",
"details": "Authentication has finished successfully and greetd can now launch a session.\n",
"params": []
},
"authMessage": {
"name": "authMessage",
"details": "An authentication message has been sent by greetd.\n- `message` - the text of the message\n- `error` - if the message should be displayed as an error\n- `responseRequired` - if a response via `respond()` is required for this message\n- `echoResponse` - if the response should be displayed in clear text to the user\n\nNote that `error` and `responseRequired` are mutually exclusive.\n\nErrors are sent through `authMessage` when they are recoverable, such as a fingerprint scanner\nnot being able to read a finger correctly, while definite failures such as a bad password are\nsent through `authFailure`.\n",
"params": [
{
"name": "message",
"type": {
"type": "qt",
"module": "qml",
"name": "string"
}
},
{
"name": "error",
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
}
},
{
"name": "responseRequired",
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
}
},
{
"name": "echoResponse",
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
}
}
]
}
},
"variants": {}
}