mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 04:53:54 -05:00
theme: better gtk css
This commit is contained in:
parent
5ffd4dfc8b
commit
c1198d6791
|
@ -4,9 +4,9 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.ar.home.theme;
|
cfg = config.ar.home;
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.theme.enable {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.gnome.adwaita-icon-theme
|
pkgs.gnome.adwaita-icon-theme
|
||||||
pkgs.liberation_ttf
|
pkgs.liberation_ttf
|
||||||
|
@ -35,12 +35,13 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix.targets.gtk.extraCss = ''
|
stylix.targets.gtk.extraCss = builtins.concatStringsSep "\n" [
|
||||||
window.background { border-radius: ${toString cfg.borders.radius}; }
|
(lib.optionalString (cfg.desktop.hyprland.enable || cfg.desktop.sway.enable) ''
|
||||||
|
window.background { border-radius: ${toString cfg.theme.borders.radius}; }
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
background-color: alpha(${config.lib.stylix.colors.withHashtag.base00}, ${builtins.toString config.stylix.opacity.popups});
|
background-color: alpha(${config.lib.stylix.colors.withHashtag.base00}, ${builtins.toString config.stylix.opacity.popups});
|
||||||
border-radius: ${toString cfg.borders.radius};
|
border-radius: ${toString cfg.theme.borders.radius};
|
||||||
border: 1px solid ${config.lib.stylix.colors.withHashtag.base0D};
|
border: 1px solid ${config.lib.stylix.colors.withHashtag.base0D};
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
@ -48,20 +49,17 @@ in {
|
||||||
tooltip.background {
|
tooltip.background {
|
||||||
background-color: alpha(${config.lib.stylix.colors.withHashtag.base00}, ${builtins.toString config.stylix.opacity.popups});
|
background-color: alpha(${config.lib.stylix.colors.withHashtag.base00}, ${builtins.toString config.stylix.opacity.popups});
|
||||||
border: 1px solid ${config.lib.stylix.colors.withHashtag.base0D};
|
border: 1px solid ${config.lib.stylix.colors.withHashtag.base0D};
|
||||||
}
|
}'')
|
||||||
|
|
||||||
${
|
(lib.optionalString (
|
||||||
lib.optionalString (config.stylix.polarity == "light") "
|
(cfg.desktop.hyprland.enable || cfg.desktop.sway.enable) && (config.stylix.polarity == "light")
|
||||||
|
) ''
|
||||||
tooltip {
|
tooltip {
|
||||||
&.background { background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups}); }
|
&.background { background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups}); }
|
||||||
background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups});
|
background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups});
|
||||||
}"
|
}'')
|
||||||
}
|
|
||||||
|
|
||||||
${
|
(lib.optionalString cfg.theme.gtk.hideTitleBar ''
|
||||||
lib.strings.optionalString
|
|
||||||
cfg.gtk.hideTitleBar
|
|
||||||
''
|
|
||||||
/* No (default) title bar on wayland */
|
/* No (default) title bar on wayland */
|
||||||
headerbar.default-decoration {
|
headerbar.default-decoration {
|
||||||
/* You may need to tweak these values depending on your GTK theme */
|
/* You may need to tweak these values depending on your GTK theme */
|
||||||
|
@ -86,9 +84,7 @@ in {
|
||||||
window.csd decoration { /* gtk3 */
|
window.csd decoration { /* gtk3 */
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}'')
|
||||||
''
|
];
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
home = {
|
home = {
|
||||||
homeDirectory = "/home/aly";
|
homeDirectory = "/home/aly";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue