GideonWolfe / Chameleon

🦎 Theme your linux system to match any image
173 stars 9 forks source link

Chameleon crash when ~/.config/chameleon/ and ~/.config/chameleon/config.yaml path doesn't exist #8

Closed OBITORASU closed 2 years ago

OBITORASU commented 3 years ago

I noticed that when install with make, the instructions do not mention creating a ~/.config/chamelon/ directory which is supposed to contain the config.yaml file. Based on the code:

# get config path
config_dir = home + '/.config/chameleon'
config_path = home + '/.config/chameleon/config.yaml'

the script simply crashes when these paths don't exist and the user has to manually create them to get things working. My suggestion is to check if these paths exist on the system and if not then create them for the user.

GideonWolfe commented 3 years ago

Thanks for the tip. I should be able to add a quick mkdir -p $HOME/.config/chameleon and it will create the directory if it doesn't exist.

OBITORASU commented 3 years ago

There might be another issue, while playing around with the config I realized the code is extremely specific about the user configuration file. We can try to do something like what polybar does and ship an example config.yaml for the user to play around with, that would be great, that would also mean we should document the current modules supported by the script and how to configure them respectively.

OBITORASU commented 3 years ago

I took the liberty of making a PR handling this issue via the makefile. Do check it out if possible. Thanks!

OBITORASU commented 3 years ago

I guess we should close this issue now since it is taken care of.