nixos-config/pkgs/adwcustomizer/patches/update-non-flatpak-env.patch

17 lines
607 B
Diff
Raw Normal View History

diff --git a/src/main.py b/src/main.py
index 8aadfe0..d2c5d4c 100644
--- a/src/main.py
+++ b/src/main.py
@@ -369,5 +369,10 @@ class AdwcustomizerApplication(Adw.Application):
def main(version):
"""The application's entry point."""
- app = AdwcustomizerApplication(version)
+ if not os.getenv("XDG_CONFIG_HOME"):
+ os.environ["XDG_CONFIG_HOME"] = os.path.expanduser("~/.config")
+ app_config = os.path.join(os.environ["XDG_CONFIG_HOME"], "adwcustomizer")
+ os.makedirs(app_config, exist_ok=True)
+
+ app = AdwcustomizerApplication(version)
return app.run(sys.argv)