mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 01:33:55 -05:00
home/theme: imrpove readability
This commit is contained in:
parent
b9af8abe95
commit
ba351c050c
|
@ -4,7 +4,10 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.ar.home.theme.enable {
|
||||
config = let
|
||||
cfg = config.ar.home.theme;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
home = {
|
||||
packages = with pkgs; [gnome.adwaita-icon-theme];
|
||||
|
||||
|
@ -36,7 +39,7 @@
|
|||
theme = {
|
||||
package = pkgs.adw-gtk3;
|
||||
name =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
};
|
||||
|
@ -44,7 +47,7 @@
|
|||
iconTheme = {
|
||||
package = pkgs.papirus-icon-theme;
|
||||
name =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "Papirus-Dark"
|
||||
else "Papirus";
|
||||
};
|
||||
|
@ -55,17 +58,17 @@
|
|||
size = lib.mkDefault 11;
|
||||
};
|
||||
|
||||
gtk3.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
||||
gtk3.extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
||||
|
||||
gtk4.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
||||
gtk4.extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
||||
|
||||
gtk3.extraCss = ''
|
||||
@define-color accent_bg_color ${config.ar.home.theme.colors.primary};
|
||||
@define-color accent_bg_color ${cfg.colors.primary};
|
||||
@define-color accent_color @accent_bg_color;
|
||||
|
||||
${
|
||||
lib.strings.optionalString
|
||||
config.ar.home.theme.gtk.hideTitleBar
|
||||
cfg.gtk.hideTitleBar
|
||||
''
|
||||
/* No (default) title bar on wayland */
|
||||
headerbar.default-decoration {
|
||||
|
@ -99,14 +102,14 @@
|
|||
style = {
|
||||
package = pkgs.adwaita-qt;
|
||||
name =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "Adwaita-Dark"
|
||||
else "Adwaita";
|
||||
};
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/cinnamon/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}";
|
||||
"org/cinnamon/desktop/background".picture-uri = "file://${cfg.wallpaper}";
|
||||
|
||||
"org/cinnamon/desktop/interface" = {
|
||||
cursor-size = config.home.pointerCursor.size;
|
||||
|
@ -114,31 +117,31 @@
|
|||
font-name = "${config.gtk.font.name} ${toString config.gtk.font.size}";
|
||||
|
||||
gtk-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
|
||||
icon-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "Papirus-Dark"
|
||||
else "Papirus";
|
||||
};
|
||||
|
||||
"org/cinnamon/theme".name =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
|
||||
"org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.gtk.font.name} ${toString config.gtk.font.size}";
|
||||
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri = "file://${config.ar.home.theme.wallpaper}";
|
||||
picture-uri-dark = "file://${config.ar.home.theme.wallpaper}";
|
||||
picture-uri = "file://${cfg.wallpaper}";
|
||||
picture-uri-dark = "file://${cfg.wallpaper}";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "prefer-dark"
|
||||
else "prefer-light";
|
||||
|
||||
|
@ -148,12 +151,12 @@
|
|||
document-font-name = "NotoSerif Nerd Font ${toString config.gtk.font.size}";
|
||||
|
||||
gtk-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
|
||||
icon-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
if cfg.darkMode
|
||||
then "Papirus-Dark"
|
||||
else "Papirus";
|
||||
|
||||
|
|
Loading…
Reference in a new issue