2020-08-04 01:46:48 +04:00
|
|
|
{ pkgs, config, lib, inputs, ... }:
|
2019-09-11 17:17:56 +04:00
|
|
|
let
|
2020-08-10 01:17:22 +04:00
|
|
|
thm = config.lib.base16.theme;
|
2019-09-11 17:17:56 +04:00
|
|
|
materia_colors = pkgs.writeTextFile {
|
|
|
|
name = "gtk-generated-colors";
|
|
|
|
text = ''
|
2020-08-10 01:17:22 +04:00
|
|
|
BG=${thm.base00-hex}
|
|
|
|
FG=${thm.base05-hex}
|
|
|
|
BTN_BG=${thm.base00-hex}
|
|
|
|
BTN_FG=${thm.base05-hex}
|
|
|
|
MENU_BG=${thm.base00-hex}
|
|
|
|
MENU_FG=${thm.base05-hex}
|
|
|
|
ACCENT_BG=${thm.base02-hex}
|
|
|
|
SEL_BG=${thm.base0D-hex}
|
|
|
|
SEL_FG=${thm.base00-hex}
|
|
|
|
TXT_BG=${thm.base00-hex}
|
|
|
|
TXT_FG=${thm.base05-hex}
|
|
|
|
HDR_BTN_BG=${thm.base00-hex}
|
|
|
|
HDR_BTN_FG=${thm.base05-hex}
|
|
|
|
WM_BORDER_FOCUS=${thm.base02-hex}
|
|
|
|
WM_BORDER_UNFOCUS=${thm.base01-hex}
|
2019-09-11 17:17:56 +04:00
|
|
|
MATERIA_STYLE_COMPACT=True
|
|
|
|
MATERIA_COLOR_VARIANT=dark
|
|
|
|
UNITY_DEFAULT_LAUNCHER_STYLE=False
|
|
|
|
NAME=generated
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
nixpkgs.overlays = [(self: super: {
|
|
|
|
generated-gtk-theme = self.stdenv.mkDerivation rec {
|
|
|
|
name = "generated-gtk-theme";
|
2020-08-04 01:46:48 +04:00
|
|
|
src = inputs.materia-theme;
|
2019-09-22 13:35:49 +04:00
|
|
|
buildInputs = with self; [ sassc bc which inkscape optipng ];
|
2019-09-11 17:17:56 +04:00
|
|
|
installPhase = ''
|
2019-09-22 13:35:49 +04:00
|
|
|
HOME=/build
|
2019-09-11 17:17:56 +04:00
|
|
|
chmod 777 -R .
|
|
|
|
patchShebangs .
|
2020-02-05 04:30:49 +04:00
|
|
|
mkdir -p $out/share/themes
|
2019-09-11 17:17:56 +04:00
|
|
|
substituteInPlace change_color.sh --replace "\$HOME/.themes" "$out/share/themes"
|
|
|
|
echo "Changing colours:"
|
|
|
|
./change_color.sh -o Generated ${materia_colors}
|
|
|
|
chmod 555 -R .
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
})];
|
2020-08-07 23:27:49 +04:00
|
|
|
services.dbus.packages = with pkgs; [ gnome3.dconf ];
|
2019-09-11 17:17:56 +04:00
|
|
|
home-manager.users.alukard = {
|
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
iconTheme = {
|
2020-08-11 02:38:02 +04:00
|
|
|
name = "${thm.iconsTheme}";
|
2019-09-11 17:17:56 +04:00
|
|
|
package = pkgs.papirus-icon-theme;
|
|
|
|
};
|
|
|
|
theme = {
|
|
|
|
name = "Generated";
|
|
|
|
package = pkgs.generated-gtk-theme;
|
|
|
|
};
|
2019-09-22 13:35:49 +04:00
|
|
|
font = {
|
2020-08-15 19:36:16 +04:00
|
|
|
name = "${thm.font} ${thm.normalFontSize}";
|
2019-09-22 13:35:49 +04:00
|
|
|
};
|
|
|
|
gtk3.extraConfig.gtk-cursor-theme-name = "bibata_oil";
|
2019-09-11 17:17:56 +04:00
|
|
|
};
|
2020-08-07 23:27:49 +04:00
|
|
|
home.sessionVariables.GTK_THEME = "Generated";
|
2020-11-10 00:09:40 +04:00
|
|
|
home.sessionVariables.XDG_DATA_DIRS = [
|
|
|
|
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
|
|
|
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
|
|
|
];
|
2019-09-11 17:17:56 +04:00
|
|
|
};
|
|
|
|
}
|