feat: add hilbish.interactive and hilbish.login vars

these are to check from lua if hilbish is running an interactive or
login session
dev
sammyette 2021-10-30 19:44:40 -04:00
parent 54d88f9f6c
commit 97a6e4baf2
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,8 @@ func HilbishLoader(L *lua.LState) int {
L.SetField(mod, "host", lua.LString(host)) L.SetField(mod, "host", lua.LString(host))
L.SetField(mod, "home", lua.LString(homedir)) L.SetField(mod, "home", lua.LString(homedir))
L.SetField(mod, "dataDir", lua.LString(dataDir)) L.SetField(mod, "dataDir", lua.LString(dataDir))
L.SetField(mod, "interactive", lua.LBool(interactive))
L.SetField(mod, "login", lua.LBool(interactive))
xdg := L.NewTable() xdg := L.NewTable()
L.SetField(xdg, "config", lua.LString(confDir)) L.SetField(xdg, "config", lua.LString(confDir))