From f35903bfb7394424a3a18674d8bd9faf40b46e01 Mon Sep 17 00:00:00 2001 From: Oliver Walter Date: Tue, 5 Aug 2025 03:58:33 +0200 Subject: [PATCH] allow for CUSTOM_DATA_DIRS variable --- tools.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools.go b/tools.go index 7fecda6..e56376b 100644 --- a/tools.go +++ b/tools.go @@ -256,9 +256,19 @@ func getAppDirs() []string { home := os.Getenv("HOME") //xdgDataHome := os.Getenv("XDG_DATA_HOME") //xdgDataDirs := os.Getenv("XDG_DATA_DIRS") - if home != "" { - dirs = append(dirs, filepath.Join(home, "/my_applications")) - } + + custom := os.Getenv("CUSTOM_DATA_DIRS") + + if home != "" { + if custom == "" { + dirs = append(dirs, filepath.Join(home, "/my_applications")) + } else { + dirs = append(dirs, filepath.Join(home, custom)) + } + + } + + log.Infof("App dirs: %v", dirs)