Will updating a gnome shell extension delete custom css in a separate file made by the user?

132 views Asked by At

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?

  • Would it be better to not provide this file at all and let the user create it or will it be removed then anyway (because it is not included in the release)?
  • Should the user manually create a 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!

1

There are 1 answers

0
andy.holmes On BEST ANSWER

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.