23 lines
287 B
Go
Raw Permalink Normal View History

2023-08-18 15:01:42 +00:00
package core
import (
"os"
"path/filepath"
)
func ConfigDir() string {
home := os.Getenv("XDG_CONFIG_HOME")
if home != "" {
return filepath.Join(home, "dash")
}
home, err := os.UserHomeDir()
if err != nil {
panic(err)
}
return filepath.Join(home, ".config", "dash")
}