diff options
Diffstat (limited to 'usecases/desktop/graphical/gtk.nix')
-rw-r--r-- | usecases/desktop/graphical/gtk.nix | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/usecases/desktop/graphical/gtk.nix b/usecases/desktop/graphical/gtk.nix index 4a9f501..0151492 100644 --- a/usecases/desktop/graphical/gtk.nix +++ b/usecases/desktop/graphical/gtk.nix | |||
@@ -4,6 +4,32 @@ inputs: { | |||
4 | pkgs, | 4 | pkgs, |
5 | ... | 5 | ... |
6 | }: let | 6 | }: let |
7 | gtk3Colors = ./gtk-colors.scss; | ||
8 | |||
9 | gtk3CssFile = | ||
10 | pkgs.stdenv.mkDerivation ({ | ||
11 | name = "gtk3.css"; | ||
12 | |||
13 | src = pkgs.gtk3.src; | ||
14 | |||
15 | nativeBuildInputs = with pkgs; [sassc]; | ||
16 | |||
17 | patchPhase = '' | ||
18 | cp -f ${gtk3Colors} gtk/theme/Adwaita/_colors.scss | ||
19 | substituteAllInPlace gtk/theme/Adwaita/_colors.scss | ||
20 | ''; | ||
21 | |||
22 | dontConfigure = true; | ||
23 | dontInstall = true; | ||
24 | |||
25 | buildPhase = '' | ||
26 | sassc -a -M -t expanded gtk/theme/Adwaita/gtk-contained-dark.scss $out | ||
27 | # These lines contains includes of assets | ||
28 | sed -i -e '/-gtk-icon/d' $out; | ||
29 | ''; | ||
30 | } | ||
31 | // config.theme.colors); | ||
32 | |||
7 | gtk4NamedColors = with config.theme.colors; { | 33 | gtk4NamedColors = with config.theme.colors; { |
8 | # From the main CSS | 34 | # From the main CSS |
9 | # ----------------- | 35 | # ----------------- |
@@ -94,7 +120,7 @@ in { | |||
94 | }; | 120 | }; |
95 | 121 | ||
96 | xdg.configFile = { | 122 | xdg.configFile = { |
97 | # "gtk-3.0/gtk.css".source = gtkCssFile; | 123 | "gtk-3.0/gtk.css".source = gtk3CssFile; |
98 | "gtk-4.0/gtk.css".source = gtk4CssFile; | 124 | "gtk-4.0/gtk.css".source = gtk4CssFile; |
99 | }; | 125 | }; |
100 | }; | 126 | }; |