1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 19:17:45 +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": {
"locked": {
"lastModified": 1701262386,
"narHash": "sha256-Qi2cZdAkXPxw7rF2DWb+9OZ0bw6m3iPeOGp2VXskJQQ=",
"lastModified": 1701334779,
"narHash": "sha256-j3T9R/Rc46S8TbD/Qtvqk9ms0m+Tbr4l1OB45NcVppI=",
"owner": "RGBCube",
"repo": "ThemeNix",
"rev": "ccd52c1beb9aeeb78e55b19b2595ab5cee924074",
"rev": "de638a3a6fca350b6bdb0e0e0fb4984d53dea36e",
"type": "github"
},
"original": {

View file

@ -47,8 +47,26 @@
};
outputs = { nixpkgs, homeManager, tools, themes, fenix, ... } @ inputs: tools.eachDefaultLinuxArch (system: let
pkgs = nixpkgs.legacyPackages.${system};
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;
hyprpicker = inputs.hyprpicker.packages.${system}.default;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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