2022-12-15 04:00:54 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-07-19 20:54:15 +00:00
|
|
|
"hilbish/moonlight"
|
2022-12-15 04:00:54 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// #interface userDir
|
|
|
|
// user-related directories
|
|
|
|
// This interface just contains properties to know about certain user directories.
|
|
|
|
// It is equivalent to XDG on Linux and gets the user's preferred directories
|
|
|
|
// for configs and data.
|
|
|
|
// #field config The user's config directory
|
|
|
|
// #field data The user's directory for program data
|
2024-07-19 20:54:15 +00:00
|
|
|
func userDirLoader() *moonlight.Table {
|
|
|
|
mod := moonlight.NewTable()
|
2022-12-15 04:00:54 +00:00
|
|
|
|
2024-07-21 15:37:08 +00:00
|
|
|
mod.SetField("config", moonlight.StringValue(confDir))
|
|
|
|
mod.SetField("data", moonlight.StringValue(userDataDir))
|
2022-12-15 04:00:54 +00:00
|
|
|
|
|
|
|
return mod
|
|
|
|
}
|