nwg-piotr / nwg-shell

Installer & meta-package for the nwg-shell project: a GTK3-based shell for sway and Hyprland Wayland compositors
Other
824 stars 14 forks source link

`variables` file overwritten without backup at upgrade time #142

Closed giraudan closed 1 year ago

giraudan commented 1 year ago

Whenever I upgrade nwg-shell, my .config/sway/variables file is overwritten with the default one withoug being backed up.

This isn't a huge issue because I only have 1 line that I modify, but it'd be nice to have my file backed up before the new one is written.

nwg-piotr commented 1 year ago

What do you mean by saying "Whenever I upgrade nwg-shell"? There happened 3 real upgrades that modified existing config files so far, only if it was really necessary. Just a version bumf does not overwrite anything.

giraudan commented 1 year ago

On many occasions, after upgrading (using my AUR helper), my .config/sway/variables file was overwritten.

I always modify it so that nwg-drawer doesn't stay in memory, doesn't display categories and doesn't display files.

On many occasions, after upgrading, I realized that nwg-drawer was longer to display, and showed me the categories and the files, and indeed, the modification I made to .config/sway/variables was no longer there.

Maybe my diagnostic is wrong, maybe it's not linked to the specific process of upgrading, but it sounds like a probable culprit.

Do you have any idea what could be causing this file to be overwritten by the default one?

nwg-piotr commented 1 year ago

If you modify the variables file manually, it's being overwritten every time you press the "Apply" button in nwg-shell-config. We don't parse the file back to the config utility, but we keep all the data in JSON format elsewhere. You should change settings in the shell config utility, to make them permanent.

Also, the settings you're talking about there are in the autostart file, not in variables.

giraudan commented 1 year ago

That makes sense, thanks a lot!