Add config paths for MacOS systems

This commit is contained in:
2026-04-27 20:07:48 +03:00
parent a1e8d6c19a
commit b564e0ec2e
3 changed files with 22 additions and 7 deletions
+8 -3
View File
@@ -84,10 +84,15 @@ func readStyles() {
}
stylesPaths := make([]string, 0)
if runtime.GOOS == "windows" {
switch runtime.GOOS {
case "windows":
stylesPaths = append(stylesPaths, filepath.Join(homeDir, "AppData/Roaming/Typer/styles"))
stylesPaths = append(stylesPaths, filepath.Join(filepath.Dir(execPath), "etc/typer/styles"))
} else {
stylesPaths = append(stylesPaths, filepath.Join(filepath.Dir(execPath), "config/styles"))
case "darwin":
stylesPaths = append(stylesPaths, filepath.Join(homeDir, "Library/Typer/styles"))
stylesPaths = append(stylesPaths, "/Library/Typer/styles")
stylesPaths = append(stylesPaths, filepath.Join(sysconfdir, "typer/styles"))
default:
stylesPaths = append(stylesPaths, filepath.Join(homeDir, ".config/typer/styles"))
stylesPaths = append(stylesPaths, filepath.Join(sysconfdir, "typer/styles"))
}