1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 15:02:50 -05:00

core: use stdlib for xdg dirs

This commit is contained in:
bbedward
2025-12-11 10:15:23 -05:00
parent 1c1cf866e2
commit 3a8d3ee515
9 changed files with 33 additions and 109 deletions

View File

@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
"github.com/AvengeMedia/DankMaterialShell/core/internal/utils"
"github.com/AvengeMedia/DankMaterialShell/core/internal/log"
)
type ThemeColors struct {
@@ -74,7 +74,12 @@ func loadColorsFile() *ColorScheme {
}
func getColorsFilePath() string {
return filepath.Join(utils.XDGCacheHome(), "DankMaterialShell", "dms-colors.json")
cacheDir, err := os.UserCacheDir()
if err != nil {
log.Error("Failed to get user cache dir", "err", err)
return ""
}
return filepath.Join(cacheDir, "DankMaterialShell", "dms-colors.json")
}
func isLightMode() bool {