dracula / libreoffice

🧛🏻‍♂️ Dark theme for LibreOffice
https://draculatheme.com/libreoffice
MIT License
22 stars 6 forks source link

Handle XDG_CONFIG_HOME not being set #6

Closed alexandradeas closed 2 years ago

alexandradeas commented 2 years ago

When running the add-dracula-application-colors.sh script on Linux I ran into the issue that XDG_CONFIG_HOME wasn't set, the error message here wasn't particularly helpful and meant I had to look through the script to figure out what was going wrong. The error message displayed was:

realpath: /.config/libreoffice/*/user/registrymodifications.xcu: No such file or directory
cp: cannot stat '': No such file or directory
Settings file doesn't exist in expected location. Aborting ...

There are two ways I think this can be improved: 1) As it's almost certain that no one will have their config at root, then error earlier and state that XDG_CONFIG_HOME isn't set 2) Default to $HOME/.config per the spec https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables

Happy to make any changes to the script but don't want to jump in if one option is preferred to the other

eleanor-clifford commented 2 years ago

Thanks very much for the spot @alexandradeas, since the fix was easy to implement I just went ahead and did it (option 2)

alexandradeas commented 2 years ago

:+1: This one will need updating as well https://github.com/dracula/libreoffice/blob/875d3146e86da4325b9092a8f24efe1d887fe7d8/install.sh#L4

eleanor-clifford commented 2 years ago

oops, thanks, fixed