add(matugen): auto-theme switch
This commit is contained in:
@@ -55,3 +55,8 @@ post_hook = "makoctl reload"
|
|||||||
input_path = "~/.config/matugen/templates/vicinae"
|
input_path = "~/.config/matugen/templates/vicinae"
|
||||||
output_path = "~/.local/share/vicinae/themes/matugen.toml"
|
output_path = "~/.local/share/vicinae/themes/matugen.toml"
|
||||||
post_hook = "vicinae theme set matugen"
|
post_hook = "vicinae theme set matugen"
|
||||||
|
|
||||||
|
[templates.theme-switch]
|
||||||
|
input_path = "~/.config/matugen/templates/theme-switch"
|
||||||
|
output_path = "~/.config/matugen/scripts/theme-switch.sh"
|
||||||
|
post_hook = "sh ~/.config/matugen/scripts/theme-switch.sh"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
matugen
|
matugen
|
||||||
|
dconf
|
||||||
psmisc # for killall
|
psmisc # for killall
|
||||||
];
|
];
|
||||||
home.file.".config/matugen/config.toml" = {
|
home.file.".config/matugen/config.toml" = {
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Copy static templates
|
# Copy static templates
|
||||||
|
home.file.".config/matugen/templates/theme-switch".source = ./templates/theme-switch;
|
||||||
home.file.".config/matugen/templates/cava".source = ./templates/cava;
|
home.file.".config/matugen/templates/cava".source = ./templates/cava;
|
||||||
home.file.".config/matugen/templates/firefox".source = ./templates/firefox;
|
home.file.".config/matugen/templates/firefox".source = ./templates/firefox;
|
||||||
home.file.".config/matugen/templates/ghostty".source = ./templates/ghostty;
|
home.file.".config/matugen/templates/ghostty".source = ./templates/ghostty;
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#!/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
|
||||||
Reference in New Issue
Block a user