refactor: major theme refactor

new profile catagory: theme. refactor modules for wallpaper, fonts, gtk,
and qt. adjusted modules that depend on old theming modules
This commit is contained in:
ooks-io 2024-04-06 22:38:54 +13:00
parent 7d910ba77c
commit f5e87f2a79
34 changed files with 217 additions and 118 deletions

View file

@ -2,6 +2,7 @@
let
cfg = config.homeModules.desktop.browser.schizofox;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
in
@ -13,7 +14,7 @@ in
programs.schizofox = {
enable = true;
theme = {
font = "${config.fontProfiles.regular.family}";
font = "${fonts.regular.family}";
colors = {
background-darker = "${colors.base00}";
background = "${colors.base01}";

View file

@ -2,6 +2,7 @@
let
cfg = config.homeModules.desktop.communication.discord;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
in
@ -29,8 +30,8 @@ in
--nix-accent: #${colors.base08};
--nix-hi: #${colors.base0B};
--font-mono: ${config.fontProfiles.monospace.family}, monospace;
--font-regular: ${config.fontProfiles.regular.family}, sans serif;
--font-mono: ${fonts.monospace.family}, monospace;
--font-regular: ${fonts.regular.family}, sans serif;
/* server collapse */
--sb-collapsed-width: 12px;

View file

@ -1,6 +1,6 @@
{
imports = [
./themeSettings # done
# ./themeSettings # done
./browser # done -- firefox still need: chrome, brave
#./creative -- still needs to be implemented
./communication # only discord implemented

View file

@ -3,6 +3,7 @@
let
cfg = config.homeModules.desktop.productivity.zathura;
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.fonts;
in
{
@ -10,7 +11,7 @@ in
programs.zathura = {
enable = true;
options = {
font = "${config.fontProfiles.regular.family} 14";
font = "${fonts.regular.family} 14";
recolor = true;
selection-clipboard = "clipboard";
default-bg = "#${colors.base00}";

View file

@ -2,6 +2,7 @@
let
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.terminal.foot;
in
@ -16,10 +17,10 @@ in
server.enable = true;
settings = {
main = {
font = "${config.fontProfiles.monospace.family}:pixelsize=18:antialias=true";
font-bold = "${config.fontProfiles.monospace.family}:style=Bold:pixelsize=18:antialias=true";
font-italic = "${config.fontProfiles.monospace.family}:style=Italic:pixelsize=18:antialias=true";
font-bold-italic = "${config.fontProfiles.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true";
font = "${fonts.monospace.family}:pixelsize=18:antialias=true";
font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true";
font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true";
font-bold-italic = "${fonts.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true";
dpi-aware = "yes";
letter-spacing = "-1px";
bold-text-in-bright = "palette-based";

View file

@ -2,7 +2,9 @@
let
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.font;
cfg = config.homeModules.desktop.terminal.kitty;
fish = config.homeModules.console.shell.fish;
in
{
@ -14,10 +16,10 @@ in
programs.kitty = {
enable = true;
font = {
name = config.fontProfiles.monospace.family;
name = fonts.monospace.family;
size = 12;
};
shellIntegration.enableFishIntegration = true;
shellIntegration.enableFishIntegration = lib.mkif fish.enable true;
settings = {
scrollback_lines = 4000;
scrollback_pager_history_size = 2048;

View file

@ -1,16 +0,0 @@
{ pkgs, lib, config, ... }:
let
cfg = config.homeModules.desktop.themeSettings;
in
{
config = lib.mkIf cfg.enable {
home.pointerCursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 22;
gtk.enable = true;
x11.enable = true;
};
};
}

View file

@ -1,14 +0,0 @@
{ lib, ... }:
{
imports = [
./cursor.nix
./fonts.nix
./gtk.nix
./qt.nix
];
# settings to be expanded on in the future
options.homeModules.desktop.themeSettings = {
enable = lib.mkEnableOption "Enable theme settings";
};
}

View file

@ -1,24 +0,0 @@
{ pkgs, config, lib, ... }:
let
cfg = config.homeModules.desktop.themeSettings;
in
{
config = lib. mkIf cfg.enable {
fontProfiles = {
enable = true;
monospace = {
family = "JetBrainsMono Nerd Font";
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
};
regular = {
family = "Fira Sans";
package = pkgs.fira;
};
};
home.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
];
};
}

View file

@ -1,35 +0,0 @@
{ config, pkgs, inputs, lib, ... }:
let
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme;
cfg = config.homeModules.desktop.themeSettings;
in
{
config = lib.mkIf cfg.enable (rec {
gtk = {
enable = true;
font = {
name = config.fontProfiles.regular.family;
size = 12;
};
theme = {
name = config.colorscheme.slug;
package = gtkThemeFromScheme { scheme = config.colorscheme; };
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
};
services.xsettingsd = {
enable = true;
settings = {
"Net/ThemeName" = gtk.theme.name;
"Net/IconThemeName" = gtk.iconTheme.name;
};
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
});
}

View file

@ -1,12 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homeModules.desktop.themeSettings;
in
{
config = lib.mkIf cfg.enable {
qt = {
enable = true;
platformTheme = "gtk";
};
};
}

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.wayland.bar.waybar;
monitorWidth = (lib.head config.monitors).width - 20;
inherit (config.colorscheme) colors;
@ -78,7 +79,7 @@ in
};
style = /* css */ ''
* {
font-family: "${config.fontProfiles.monospace.family}";
font-family: "${fonts.monospace.family}";
font-size: 19px;
border: solid #${colors.base05};
}

View file

@ -1,6 +1,7 @@
{ lib, config, pkgs, ... }:
let
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.wayland.launcher.rofi;
in
@ -8,7 +9,7 @@ in
config = lib.mkIf cfg.enable {
programs.rofi = {
enable = true;
font = "${config.fontProfiles.monospace.family}";
font = "${fonts.monospace.family}";
package = pkgs.rofi-wayland;
terminal = "${config.home.sessionVariables.TERMINAL}";
theme = let
@ -24,7 +25,7 @@ in
background-color = mkLiteral "@background";
border-color = mkLiteral "@foreground";
text-color = mkLiteral "@foreground";
font = mkLiteral "'${config.fontProfiles.monospace.family} 14'";
font = mkLiteral "'${fonts.monospace.family} 14'";
};
"window" = {

View file

@ -2,6 +2,7 @@
let
cfg = config.homeModules.desktop.wayland.launcher.tofi;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
in
@ -24,7 +25,7 @@ in
result-spacing = 10
selection-background-padding = 30
prompt-padding = 10
font = "${config.fontProfiles.monospace.family}"
font = "${fonts.monospace.family}"
font-size = 14
prompt-text = " "
background-color = #0000

View file

@ -2,6 +2,7 @@
let
cfg = config.homeModules.desktop.wayland.lockscreen.hyprlock;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
in
@ -55,7 +56,7 @@ in
};
color = "0xff${colors.base08}";
font_size = 30;
font_family = "${config.fontProfiles.monospace.family}";
font_family = "${fonts.monospace.family}";
}
{
monitor = "";
@ -66,7 +67,7 @@ in
};
color = "0xff${colors.base0B}";
font_size = 20;
font_family = "${config.fontProfiles.monospace.family}";
font_family = "${fonts.monospace.family}";
}
];
};

View file

@ -2,6 +2,8 @@
let
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.fonts;
wallpaperPath = config.homeModules.theme.wallpaper.path;
cfg = config.homeModules.desktop.wayland.lockscreen.swaylock;
in
{
@ -10,8 +12,8 @@ in
programs.swaylock = {
enable = true;
settings = {
image = "${config.wallpaper}";
font = config.fontProfiles.monospace.family;
image = "${wallpaperPath}";
font = fonts.monospace.family;
color = "#${colors.base01}";
ring-color = "#${colors.base02}";
inside-wrong-color = "#${colors.base08}";

View file

@ -1,6 +1,7 @@
{ config, lib, ... }:
let
inherit (config.colorscheme) colors kind;
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.wayland.notification.mako;
in {
config = lib.mkIf cfg.enable {
@ -11,7 +12,7 @@ in {
"${config.gtk.iconTheme.package}/share/icons/Papirus-Dark"
else
"${config.gtk.iconTheme.package}/share/icons/Papirus-Light";
font = "${config.fontProfiles.regular.family} 12";
font = "${fonts.regular.family} 12";
padding = "10,10";
anchor = "top-right";
width = 300;

View file

@ -9,5 +9,6 @@
./misc.nix
./monitor.nix
./gestures.nix
./hyprpaper.nix
];
}

View file

@ -9,13 +9,10 @@ in
wayland.windowManager.hyprland.settings = {
exec = [
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
"${pkgs.swaybg}/bin/swaybg -i ${config.wallpaper} --mode fill"
];
exec-once = [
"${pkgs._1password-gui}/bin/1password --silent"
"${pkgs.live-buds-cli}/bin/earbuds -d"
"eww daemon && eww open bar"
"systemctl --user start clight"
"waybar"
];
};

View file

@ -0,0 +1,19 @@
{ lib, config, inputs, ... }:
let
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
wallpaperPath = config.homeModules.theme.wallpaper.path;
in
{
imports = [ inputs.hyprpaper.homeManagerModules.hyprpaper ];
config = lib.mkIf cfg.enable {
services.hyprpaper = {
enable = true;
preloads = ["${wallpaperPath}"];
wallpapers = [", ${wallpaperPath}"];
ipc = false;
};
};
}