From 0a1bd27da5f7261bb8a424f3b90abcdd51b92c4a Mon Sep 17 00:00:00 2001 From: Emanuel Serpa Date: Tue, 6 Sep 2022 16:03:22 -0300 Subject: [PATCH] use XDG_CONFIG_HOME/azote as the default directory for azotebg --- azote/tools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azote/tools.py b/azote/tools.py index 5ca96dc..627b53c 100644 --- a/azote/tools.py +++ b/azote/tools.py @@ -333,7 +333,10 @@ def set_env(language=None): os.mkdir(common.thumb_dir) # command file - common.cmd_file = os.path.join(os.getenv("HOME"), ".azotebg") + if os.path.isfile(os.path.join(os.getenv("HOME"), ".azotebg")): + common.cmd_file = os.path.join(os.getenv("HOME"), ".azotebg") + else: + common.cmd_file = os.path.join(os.getenv("XDG_CONFIG_HOME"), "azote/azotebg") # temporary folder common.tmp_dir = os.path.join(common.data_home, "temp")