I would like to give the users of my extension the possibility to add custom css in a file called custom.css
. This file is then imported in stylesheet.css
:
@import url("custom.css");
The question is: If I release a new version of the extension and the user updates the extension via the green button on the gnome extension website, will the custom.css
still be there untouched afterwards or will it be overwritten with the default blank custom.css
file which I planned on including with the next release?
If it would be overwritten, how could I solve this?
custom.css
outside of the extension folder (e.g. in his home folder or elsewhere) and then manually import it in the stylesheet.css
?Ideally I do not want that the user loses his css.
Thank you very much!
I would count on the extension folder being removed entirely. There's really no other way GNOME Shell could ensure clean upgrades.
A better file-based approach would probably be to write to a file in ~/.config
or ~/.cache
. I wouldn't use the extension directory for any files that aren't intended to be static.