Copyright | (c) Hazel (Vawlpe) 2022 |
---|---|
License | GPL-3.0-or-later |
Maintainer | vawlpe@gmail.com |
Stability | experimental |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
To use this module, first get the path to the socket of the greetd daemon from the environment variable GREETD_SOCK
. This requires the greetd daemon to be running.
Then you can communicate with greetd using the withSocketDo
function of this module, passing it a callback function that will have direct acccess to the open socket.
For a simplified communication scheme you can implement a handler
and pass it to handleResponse
alongside the socket and command to run on successful authentication.
Documentation
:: Socket | Open socket to the greetd daemon, usually obtained from the callback of a |
-> Request |
|
-> IO () | Empty IO action result. |
:: Socket | Open socket to the greetd daemon, usually obtained from the callback of a |
-> IO Response |
|
:: (Response -> IO PromptResult) | Handler function that will be called for every response from greetd. |
-> Response | Response from greetd that will be passed to the handler function. |
-> Socket | Open socket to the greetd daemon, usually obtained from the callback of a |
-> [String] | List of strings to pass as the command to execute to start session after authentication. |
-> IO () | Empty IO action result. |
data PromptResult Source #
Success | Successful prompt result. |
Error | Error prompt result. |
Info | Info prompt result. |
Auth String | Auth prompt result. |