gtk: Add gtk4.extraCss option (#4133)

This commit is contained in:
dariof4 2023-06-21 18:38:43 +02:00 committed by GitHub
parent 50cb4d8a1e
commit 1fefd7bb8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,6 +204,15 @@ in {
<filename>$XDG_CONFIG_HOME/gtk-4.0/settings.ini</filename>.
'';
};
extraCss = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration lines to add verbatim to
<filename>$XDG_CONFIG_HOME/gtk-4.0/gtk.css</filename>.
'';
};
};
};
};
@ -268,6 +277,9 @@ in {
xdg.configFile."gtk-4.0/settings.ini".text =
toGtk3Ini { Settings = gtkIni // cfg4.extraConfig; };
xdg.configFile."gtk-4.0/gtk.css" =
mkIf (cfg4.extraCss != "") { text = cfg4.extraCss; };
dconf.settings."org/gnome/desktop/interface" = dconfIni;
});
}