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