Skip to content

Commit

Permalink
use XDG_CONFIG_HOME/azote as the default directory for azotebg
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelserpa committed Sep 11, 2022
1 parent 4e77e9d commit 581baf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion azote/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 581baf0

Please sign in to comment.