diff --git a/apps/matugen/default.nix b/apps/matugen/default.nix index 34af09d..d8807e8 100644 --- a/apps/matugen/default.nix +++ b/apps/matugen/default.nix @@ -14,7 +14,19 @@ }; # Copy static templates - home.file.".config/matugen/templates/theme-switch".source = ./templates/theme-switch; + home.file.".config/matugen/templates/theme-switch".text = '' + #!/bin/sh + # Generated by Matugen + + # mode will be replaced by 'dark' or 'light' + MODE="{{mode}}" + + if [ "$MODE" = "dark" ]; then + ${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" + else + ${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'" + fi + ''; home.file.".config/matugen/templates/cava".source = ./templates/cava; home.file.".config/matugen/templates/firefox".source = ./templates/firefox; home.file.".config/matugen/templates/ghostty".source = ./templates/ghostty; @@ -343,7 +355,7 @@ gtk = { enable = true; theme = { - name = "adw-gtk3-dark"; + name = "adw-gtk3"; package = pkgs.adw-gtk3; }; iconTheme = { diff --git a/apps/matugen/templates/theme-switch b/apps/matugen/templates/theme-switch deleted file mode 100644 index 303e0d7..0000000 --- a/apps/matugen/templates/theme-switch +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# Generated by Matugen - -# mode will be replaced by 'dark' or 'light' -MODE="{{mode}}" - -if [ "$MODE" = "dark" ]; then - ${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" -else - ${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'" -fi