use theme hash for element theme name
This commit is contained in:
parent
5ef4c6ec2b
commit
4c6082972e
@ -127,6 +127,12 @@ in
|
|||||||
|
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
|
colorsJson = builtins.toFile "colors.json" (builtins.toJSON cfg.favColors.base16);
|
||||||
|
themeHashOut = pkgs.runCommandNoCC "theme-hash" {} ''
|
||||||
|
cat ${colorsJson} | ${pkgs.coreutils}/bin/sha256sum | ${pkgs.coreutils}/bin/head -c 8 > $out
|
||||||
|
'';
|
||||||
|
themeHash = builtins.readFile themeHashOut;
|
||||||
|
|
||||||
i3config = {
|
i3config = {
|
||||||
config = {
|
config = {
|
||||||
colors = {
|
colors = {
|
||||||
@ -171,7 +177,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
elementTheme = {
|
elementTheme = {
|
||||||
name = "Nix colors 11";
|
name = "colors-${themeHash}";
|
||||||
is_dark = true;
|
is_dark = true;
|
||||||
colors = {
|
colors = {
|
||||||
"accent-color" = "#${cfg.favColors.base16.base02}";
|
"accent-color" = "#${cfg.favColors.base16.base02}";
|
||||||
@ -197,7 +203,6 @@ in
|
|||||||
settingDefaults.custom_themes = [ elementTheme ];
|
settingDefaults.custom_themes = [ elementTheme ];
|
||||||
|
|
||||||
settingDefaults.theme = "custom-${elementTheme.name}";
|
settingDefaults.theme = "custom-${elementTheme.name}";
|
||||||
default_theme = "custom-${elementTheme.name}";
|
|
||||||
|
|
||||||
showLabsSettings = true;
|
showLabsSettings = true;
|
||||||
};
|
};
|
||||||
@ -211,7 +216,6 @@ in
|
|||||||
# Element
|
# Element
|
||||||
xdg.configFile."Riot/config.json".text = builtins.toJSON elementConfig;
|
xdg.configFile."Riot/config.json".text = builtins.toJSON elementConfig;
|
||||||
xdg.configFile."Element/config.json".text = builtins.toJSON elementConfig;
|
xdg.configFile."Element/config.json".text = builtins.toJSON elementConfig;
|
||||||
xdg.configFile."element_theme.json".text = builtins.toJSON elementTheme;
|
|
||||||
|
|
||||||
# Mako
|
# Mako
|
||||||
programs.mako = {
|
programs.mako = {
|
||||||
|
Loading…
Reference in New Issue
Block a user