mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
compositor+matugen: border override, hypr/mango layout overrides, new
templates, respect XDG paths - Add Hyprland and MangoWC templates - Add GUI gaps, window radius, and border thickness overrides for niri, Hyprland, and MangoWC - Add replacement support in matugen templates for DATA_DIR, CACHE_DIR, CONFIG_DIR fixes #1274 fixes #1273
This commit is contained in:
@@ -10,9 +10,32 @@ func XDGStateHome() string {
|
||||
if dir := os.Getenv("XDG_STATE_HOME"); dir != "" {
|
||||
return dir
|
||||
}
|
||||
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(append([]string{home}, ".local", "state")...)
|
||||
return filepath.Join(home, ".local", "state")
|
||||
}
|
||||
|
||||
func XDGDataHome() string {
|
||||
if dir := os.Getenv("XDG_DATA_HOME"); dir != "" {
|
||||
return dir
|
||||
}
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(home, ".local", "share")
|
||||
}
|
||||
|
||||
func XDGCacheHome() string {
|
||||
if dir, err := os.UserCacheDir(); err == nil {
|
||||
return dir
|
||||
}
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(home, ".cache")
|
||||
}
|
||||
|
||||
func XDGConfigHome() string {
|
||||
if dir, err := os.UserConfigDir(); err == nil {
|
||||
return dir
|
||||
}
|
||||
home, _ := os.UserHomeDir()
|
||||
return filepath.Join(home, ".config")
|
||||
}
|
||||
|
||||
func ExpandPath(path string) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user