{ "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": { "user": { "type": { "type": "qt", "module": "qml", "name": "string" }, "details": "The currently authenticating user.\n", "flags": [ "readonly" ] }, "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" ] } }, "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.\n{{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"state\" >}} 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.\n{{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"state\" >}} 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 {{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"quit\" >}} is true.\n{{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"state\" >}} must be `GreetdState.ReadyToLaunch` to call this function.\n\nThe {{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"launched\" >}} signal can be used to perform an action after greetd has acknowledged\nthe desired session.\n\n{{< callout type=\"warning\" >}}\n Note that greetd expects the greeter to terminate as soon as possible\nafter setting a target session, and waiting too long may lead to unexpected behavior\nsuch as the greeter restarting.\n\nPerforming animations and such should be done *before* calling {{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"launch\" >}}.\n\n{{< /callout >}}", "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 {{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"signal\" mname=\"authMessage\" >}} with `responseRequired` set to true.\n", "params": [ { "name": "response", "type": { "type": "qt", "module": "qml", "name": "string" } } ] } ], "signals": { "readyToLaunch": { "name": "readyToLaunch", "details": "Authentication has finished successfully and greetd can now launch a session.\n", "params": [] }, "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": [] }, "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" } } ] }, "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" } } ] } }, "variants": {} }