nixos-config/pkgs/adwcustomizer/patches/update-non-flatpak-env.patch
Gabriel Arazas 79a9bf1374 adwcustomizer: init at 2022-07-19
It's not fully functioning that requires the latest version of
libadwaita which nixpkgs doesn't have yet in the unstable branch.
2022-07-19 12:16:50 +08:00

16 lines
555 B
Diff

diff --git a/src/main.py b/src/main.py
index b73c749..97e2b24 100644
--- a/src/main.py
+++ b/src/main.py
@@ -295,5 +295,10 @@ class AdwcustomizerApplication(Adw.Application):
def main(version):
"""The application's entry point."""
+ 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()
return app.run(sys.argv)