1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 19:47:47 +00:00

Move fonts and corner rounding to theme

This commit is contained in:
RGBCube 2023-11-30 12:09:58 +03:00
parent 696e7e6406
commit 974d277f26
No known key found for this signature in database
9 changed files with 54 additions and 42 deletions

6
flake.lock generated
View file

@ -199,11 +199,11 @@
}, },
"themes": { "themes": {
"locked": { "locked": {
"lastModified": 1701262386, "lastModified": 1701334779,
"narHash": "sha256-Qi2cZdAkXPxw7rF2DWb+9OZ0bw6m3iPeOGp2VXskJQQ=", "narHash": "sha256-j3T9R/Rc46S8TbD/Qtvqk9ms0m+Tbr4l1OB45NcVppI=",
"owner": "RGBCube", "owner": "RGBCube",
"repo": "ThemeNix", "repo": "ThemeNix",
"rev": "ccd52c1beb9aeeb78e55b19b2595ab5cee924074", "rev": "de638a3a6fca350b6bdb0e0e0fb4984d53dea36e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -47,8 +47,26 @@
}; };
outputs = { nixpkgs, homeManager, tools, themes, fenix, ... } @ inputs: tools.eachDefaultLinuxArch (system: let outputs = { nixpkgs, homeManager, tools, themes, fenix, ... } @ inputs: tools.eachDefaultLinuxArch (system: let
pkgs = nixpkgs.legacyPackages.${system};
upkgs = { upkgs = {
theme = themes.gruvbox-dark-hard; theme = themes.custom (themes.raw.gruvbox-dark-hard // {
corner-radius = 16;
border-width = 3;
font.size.normal = 12;
font.size.big = 18;
font.sans.name = "Lexend";
font.sans.package = pkgs.lexend;
font.mono.name = "RobotoMono Nerd Font";
font.mono.package = (pkgs.nerdfonts.override {
fonts = [
"RobotoMono"
];
});
});
hyprland = inputs.hyprland.packages.${system}.default; hyprland = inputs.hyprland.packages.${system}.default;
hyprpicker = inputs.hyprpicker.packages.${system}.default; hyprpicker = inputs.hyprpicker.packages.${system}.default;

View file

@ -7,25 +7,25 @@ homeConfiguration "nixos" {
package = pkgs.gruvbox-dark-icons-gtk; package = pkgs.gruvbox-dark-icons-gtk;
}; };
settings.global = { settings.global = with upkgs.theme; {
width = "(300, 900)"; width = "(300, 900)";
dmenu = "fuzzel --dmenu"; dmenu = "fuzzel --dmenu";
corner_radius = 16; corner_radius = corner-radius;
gap_size = 10; gap_size = 10;
horizontal_padding = 10; horizontal_padding = 10;
padding = 10; padding = 10;
frame_color = base0A; frame_color = base0A;
frame_width = 3; frame_width = border-width;
separator_color = "frame"; separator_color = "frame";
background = base00; background = base00;
foreground = base05; foreground = base05;
alignment = "center"; alignment = "center";
font = "OpenSans 12"; font = "${font.sans.name} ${toString font.size.normal}";
min_icon_size = 64; min_icon_size = 64;

View file

@ -1,4 +1,4 @@
{ lib, pkgs, systemConfiguration, systemFonts, ... }: lib.recursiveUpdate { lib, pkgs, upkgs, systemConfiguration, systemFonts, ... }: lib.recursiveUpdate
(systemConfiguration { (systemConfiguration {
console = { console = {
@ -11,12 +11,9 @@
}) })
(with pkgs; systemFonts [ (with pkgs; systemFonts [
(nerdfonts.override { upkgs.theme.font.sans.package
fonts = [ upkgs.theme.font.mono.package
"RobotoMono"
];
})
lexend
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-lgc-plus noto-fonts-lgc-plus

View file

@ -2,8 +2,8 @@
homeConfiguration "nixos" { homeConfiguration "nixos" {
programs.fuzzel = enabled { programs.fuzzel = enabled {
settings.main = { settings.main = with upkgs.theme.font; {
font = "Lexend:size=18"; font = "${sans.name}:size=${toString size.big}";
dpi-aware = false; dpi-aware = false;
layer = "overlay"; layer = "overlay";
prompt = ''" "''; prompt = ''" "'';
@ -26,9 +26,9 @@ homeConfiguration "nixos" {
border = base0A + "FF"; border = base0A + "FF";
}; };
settings.border = { settings.border = with upkgs.theme; {
radius = 16; radius = corner-radius;
width = 3; width = border-width;
}; };
}; };
} }

View file

@ -6,10 +6,10 @@
(homeConfiguration "nixos" { (homeConfiguration "nixos" {
gtk = enabled { gtk = enabled {
font = { font = with upkgs.theme.font; {
name = "Lexend"; inherit (sans) name package;
package = pkgs.lexend;
size = 12; size = size.normal;
}; };
iconTheme = { iconTheme = {

View file

@ -5,7 +5,7 @@
}) })
(homeConfiguration "nixos" { (homeConfiguration "nixos" {
wayland.windowManager.hyprland = enabled { wayland.windowManager.hyprland = with upkgs.theme; enabled {
package = upkgs.hyprland; package = upkgs.hyprland;
extraConfig = extraConfig =
@ -126,7 +126,7 @@
'' ''
decoration { decoration {
drop_shadow = false drop_shadow = false
rounding = 16 rounding = ${toString corner-radius}
blur { blur {
enabled = false enabled = false
@ -134,13 +134,13 @@
} }
'' ''
+ +
(with upkgs.theme; '' ''
general { general {
max_fps = 60 max_fps = 60
gaps_in = 5 gaps_in = 5
gaps_out = 10 gaps_out = 10
border_size = 3 border_size = ${toString border-width}
col.active_border = 0xFF${base0A} col.active_border = 0xFF${base0A}
col.nogroup_border_active = 0xFF${base0A} col.nogroup_border_active = 0xFF${base0A}
@ -153,7 +153,7 @@
resize_on_border = true resize_on_border = true
} }
'') ''
+ +
'' ''
gestures { gestures {

View file

@ -1,14 +1,12 @@
{ pkgs, upkgs, homeConfiguration, enabled, ... }: { upkgs, homeConfiguration, enabled, ... }:
homeConfiguration "nixos" { homeConfiguration "nixos" {
programs.kitty = enabled { programs.kitty = enabled {
font.name = "RobotoMono Nerd Font"; font = with upkgs.theme.font; {
font.size = 12; inherit (mono) name package;
font.package = (pkgs.nerdfonts.override {
fonts = [ size = size.normal;
"RobotoMono" };
];
});
theme = "Gruvbox Dark"; theme = "Gruvbox Dark";

View file

@ -6,7 +6,7 @@ homeConfiguration "nixos" {
settings = [{ settings = [{
layer = "top"; layer = "top";
height = 32; height = 2 * upkgs.theme.corner-radius;
margin-right = 10; margin-right = 10;
margin-left = 10; margin-left = 10;
@ -116,17 +116,16 @@ homeConfiguration "nixos" {
}; };
}]; }];
style = with upkgs.theme.withHashtag; '' style = with upkgs.theme; with withHashtag; ''
* { * {
border: none; border: none;
border-radius: 0; border-radius: ${toString corner-radius}px;
font-family: "Lexend"; font-family: "${font.sans.name}";
} }
#waybar { #waybar {
background: ${base00}; background: ${base00};
color: ${base05}; color: ${base05};
border-radius: 16px;
} }
#workspace-1 { #workspace-1 {