mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 15:51:54 -05:00
theme: simplify
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
This commit is contained in:
parent
2cea9d2da2
commit
1f9cf3a012
|
@ -5,15 +5,68 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.ar.home.theme;
|
cfg = config.ar.home.theme;
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
||||||
|
|
||||||
|
extraCss = ''
|
||||||
|
@define-color accent_bg_color ${cfg.colors.primary};
|
||||||
|
@define-color accent_color @accent_bg_color;
|
||||||
|
|
||||||
|
${
|
||||||
|
lib.strings.optionalString
|
||||||
|
cfg.gtk.hideTitleBar
|
||||||
|
''
|
||||||
|
/* No (default) title bar on wayland */
|
||||||
|
headerbar.default-decoration {
|
||||||
|
/* You may need to tweak these values depending on your GTK theme */
|
||||||
|
margin-bottom: 50px;
|
||||||
|
margin-top: -100px;
|
||||||
|
|
||||||
|
background: transparent;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
min-height: 0;
|
||||||
|
font-size: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rm -rf window shadows */
|
||||||
|
window.csd, /* gtk4? */
|
||||||
|
window.csd decoration { /* gtk3 */
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
''
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
font = {
|
||||||
|
name = "UbuntuSans Nerd Font";
|
||||||
|
package = pkgs.nerdfonts.override {fonts = ["UbuntuSans"];};
|
||||||
|
size = 11;
|
||||||
|
};
|
||||||
|
|
||||||
|
monospaceFont = {
|
||||||
|
inherit (font) package size;
|
||||||
|
name = "UbuntuSansMono Nerd Font";
|
||||||
|
};
|
||||||
|
|
||||||
|
serifFont = {
|
||||||
|
inherit (font) size;
|
||||||
|
name = "Vegur";
|
||||||
|
package = pkgs.vegur;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = [
|
||||||
(nerdfonts.override {fonts = ["UbuntuSans"];})
|
font.package
|
||||||
adwaita-qt
|
monospaceFont.package
|
||||||
gnome.adwaita-icon-theme
|
pkgs.adwaita-qt
|
||||||
liberation_ttf
|
pkgs.gnome.adwaita-icon-theme
|
||||||
vegur
|
pkgs.liberation_ttf
|
||||||
|
serifFont.package
|
||||||
];
|
];
|
||||||
|
|
||||||
pointerCursor = {
|
pointerCursor = {
|
||||||
|
@ -33,9 +86,9 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
monospace = ["UbuntuSansMono Nerd Font" "Liberation Mono"];
|
monospace = [monospaceFont.name];
|
||||||
serif = ["Vegur" "Liberation Serif"];
|
sansSerif = [font.name];
|
||||||
sansSerif = [config.gtk.font.name "LIberation Sans"];
|
serif = [serifFont.name];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,76 +96,40 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
package = pkgs.adw-gtk3;
|
|
||||||
name =
|
name =
|
||||||
if cfg.darkMode
|
if cfg.darkMode
|
||||||
then "adw-gtk3-dark"
|
then "adw-gtk3-dark"
|
||||||
else "adw-gtk3";
|
else "adw-gtk3";
|
||||||
|
|
||||||
|
package = pkgs.adw-gtk3;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
font = {inherit (font) name package size;};
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
package = pkgs.papirus-icon-theme.override {color = "adwaita";};
|
|
||||||
name =
|
name =
|
||||||
if cfg.darkMode
|
if cfg.darkMode
|
||||||
then "Papirus-Dark"
|
then "Papirus-Dark"
|
||||||
else "Papirus";
|
else "Papirus";
|
||||||
|
|
||||||
|
package = pkgs.papirus-icon-theme.override {color = "adwaita";};
|
||||||
};
|
};
|
||||||
|
|
||||||
font = {
|
gtk3 = {inherit (gtk) extraConfig extraCss;};
|
||||||
name = "UbuntuSans Nerd Font";
|
gtk4 = {inherit (gtk) extraConfig extraCss;};
|
||||||
package = pkgs.nerdfonts.override {fonts = ["UbuntuSans"];};
|
|
||||||
size = lib.mkDefault 11;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk3 = {
|
|
||||||
extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
|
||||||
extraCss = ''
|
|
||||||
@define-color accent_bg_color ${cfg.colors.primary};
|
|
||||||
@define-color accent_color @accent_bg_color;
|
|
||||||
|
|
||||||
${
|
|
||||||
lib.strings.optionalString
|
|
||||||
cfg.gtk.hideTitleBar
|
|
||||||
''
|
|
||||||
/* No (default) title bar on wayland */
|
|
||||||
headerbar.default-decoration {
|
|
||||||
/* You may need to tweak these values depending on your GTK theme */
|
|
||||||
margin-bottom: 50px;
|
|
||||||
margin-top: -100px;
|
|
||||||
|
|
||||||
background: transparent;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
min-height: 0;
|
|
||||||
font-size: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* rm -rf window shadows */
|
|
||||||
window.csd, /* gtk4? */
|
|
||||||
window.csd decoration { /* gtk3 */
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
''
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk4 = {
|
|
||||||
extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
|
||||||
extraCss = config.gtk.gtk3.extraCss;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme.name = "qtct";
|
platformTheme.name = "qtct";
|
||||||
|
|
||||||
style = {
|
style = {
|
||||||
package = pkgs.adwaita-qt6;
|
|
||||||
name =
|
name =
|
||||||
if cfg.darkMode
|
if cfg.darkMode
|
||||||
then "Adwaita-Dark"
|
then "Adwaita-Dark"
|
||||||
else "Adwaita";
|
else "Adwaita";
|
||||||
|
|
||||||
|
package = pkgs.adwaita-qt6;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -128,25 +145,11 @@ in {
|
||||||
then "prefer-dark"
|
then "prefer-dark"
|
||||||
else "prefer-light";
|
else "prefer-light";
|
||||||
|
|
||||||
cursor-theme = config.home.pointerCursor.name;
|
document-font-name = "${serifFont.name} ${toString serifFont.size}";
|
||||||
cursor-size = config.home.pointerCursor.size;
|
monospace-font-name = "${monospaceFont.name} ${toString monospaceFont.size}";
|
||||||
|
|
||||||
document-font-name = "Vegur ${toString config.gtk.font.size}";
|
|
||||||
|
|
||||||
gtk-theme =
|
|
||||||
if cfg.darkMode
|
|
||||||
then "adw-gtk3-dark"
|
|
||||||
else "adw-gtk3";
|
|
||||||
|
|
||||||
icon-theme =
|
|
||||||
if cfg.darkMode
|
|
||||||
then "Papirus-Dark"
|
|
||||||
else "Papirus";
|
|
||||||
|
|
||||||
monospace-font-name = "UbuntuSansMono Nerd Font ${toString config.gtk.font.size}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"org/gnome/desktop/wm/preferences".titlebar-font = "${config.gtk.font.name} ${toString config.gtk.font.size}";
|
"org/gnome/desktop/wm/preferences".titlebar-font = "${font.name} ${toString font.size}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue