1

Modules/Color: Don't specify light/dark schemes, choose a single scheme where everything is based on

This commit is contained in:
2025-07-19 19:23:17 +02:00
parent 3daefbad68
commit f62f7b4c64
11 changed files with 248 additions and 284 deletions

View File

@ -52,9 +52,7 @@
};
color = {
lightScheme = "catppuccin-latte";
darkScheme = "catppuccin-mocha";
# font = "JetBrainsMono Nerd Font Mono";
scheme = "catppuccin-mocha";
font = builtins.head nixosConfig.fonts.fontconfig.defaultFonts.monospace;
};

View File

@ -6,7 +6,7 @@
pkgs,
...
}: let
inherit (config.modules) TEMPLATE;
inherit (config.modules) TEMPLATE color;
in {
options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;};

View File

@ -10,11 +10,7 @@ in {
options.modules.color = import ./options.nix {inherit lib mylib;};
config = let
lightDefs = import ./schemes/${color.lightScheme}.nix;
darkDefs = import ./schemes/${color.darkScheme}.nix;
# Assignments will be generated from those keys
colorKeys = builtins.attrNames lightDefs;
colorDefs = import ./schemes/${color.scheme}.nix;
mkColorAssignment = defs: key: {${key} = defs.${key};};
mkStringColorAssignment = defs: key: {${key} = "#${defs.${key}}";};
@ -23,17 +19,20 @@ in {
in {
# Helper script that processes a visual mode selection and replaces
# referenced colors in-place with their counterparts in this module.
# Usage: '<,'>!applyColors<cr>
# Usage: ":'<,'>!applyColors<cr>"
home.packages = let
applyColors = let
mkPythonColorDef = name: value: " '${name}': '${value}',";
in
mkPythonColorDef = name: value: " '${name}': '${value}',";
applyColors =
pkgs.writers.writePython3Bin
"applyColors"
{
doCheck = false;
}
(
builtins.concatStringsSep "\n" [
"colors: dict[str, str] = {"
(config.modules.color.hex.dark
(config.modules.color.hex
|> builtins.mapAttrs mkPythonColorDef
|> builtins.attrValues
|> builtins.concatStringsSep "\n")
@ -44,56 +43,34 @@ in {
in [applyColors];
# This module sets its own options to the values specified in a colorscheme file.
# TODO: This is fucking stupid. Add an option to set a colorscheme,
# then provide a single hex/rgb/rgbString set, not this light/dark shit.
modules.color = {
hex = {
light =
colorKeys
|> builtins.map (mkColorAssignment lightDefs)
|> lib.mergeAttrsList;
# RRGGBB (0-F)
hex =
colorDefs
|> builtins.attrNames
|> builtins.map (mkColorAssignment colorDefs)
|> lib.mergeAttrsList;
dark =
colorKeys
|> builtins.map (mkColorAssignment darkDefs)
|> lib.mergeAttrsList;
};
# #RRGGBB (0-F)
hexS =
colorDefs
|> builtins.attrNames
|> builtins.map (mkStringColorAssignment colorDefs)
|> lib.mergeAttrsList;
hexString = {
light =
colorKeys
|> builtins.map (mkStringColorAssignment lightDefs)
|> lib.mergeAttrsList;
# [RR GG BB] (0-255)
rgb =
colorDefs
|> builtins.attrNames
|> builtins.map (mkRgbColorAssignment colorDefs)
|> lib.mergeAttrsList;
dark =
colorKeys
|> builtins.map (mkStringColorAssignment darkDefs)
|> lib.mergeAttrsList;
};
rgb = {
light =
colorKeys
|> builtins.map (mkRgbColorAssignment lightDefs)
|> lib.mergeAttrsList;
dark =
colorKeys
|> builtins.map (mkRgbColorAssignment darkDefs)
|> lib.mergeAttrsList;
};
rgbString = {
light =
colorKeys
|> builtins.map (mkRgbStringColorAssignment lightDefs)
|> lib.mergeAttrsList;
dark =
colorKeys
|> builtins.map (mkRgbStringColorAssignment darkDefs)
|> lib.mergeAttrsList;
};
# RR,GG,BB (0-255)
rgbS =
colorDefs
|> builtins.attrNames
|> builtins.map (mkRgbStringColorAssignment colorDefs)
|> lib.mergeAttrsList;
};
};
}

View File

@ -2,25 +2,19 @@
lib,
mylib,
...
}:
with lib;
with mylib.modules; {
lightScheme = mkOption {
type = types.str;
description = "The color scheme to use for light colors";
example = "catppuccin-latte";
default = "catppuccin-latte";
};
darkScheme = mkOption {
type = types.str;
description = "The color scheme to use for dark colors";
}: {
scheme = lib.mkOption {
type = lib.types.enum [
"catppuccin-latte"
"catppuccin-mocha"
];
description = "The color scheme to use";
example = "catppuccin-mocha";
default = "catppuccin-mocha";
};
font = mkOption {
type = types.str;
font = lib.mkOption {
type = lib.types.str;
description = "The font to use";
example = "JetBrainsMono Nerd Font Mono";
default = "JetBrainsMono Nerd Font Mono";
@ -28,23 +22,23 @@ with mylib.modules; {
# These options will be populated automatically.
hex = mkOption {
type = types.attrs;
hex = lib.mkOption {
type = lib.types.attrs;
description = "Colors in \"RRGGBB\" hexadecimal format";
};
hexString = mkOption {
type = types.attrs;
hexS = lib.mkOption {
type = lib.types.attrs;
description = "Colors in \"#RRGGBB\" hexadecimal format";
};
rgbString = mkOption {
type = types.attrs;
description = "Colors in \"RR,GG,BB\" decimal format";
};
rgb = mkOption {
type = types.attrs;
rgb = lib.mkOption {
type = lib.types.attrs;
description = "Colors in [RR GG BB] decimal format";
};
rgbS = lib.mkOption {
type = lib.types.attrs;
description = "Colors in \"RR,GG,BB\" decimal format";
};
}

View File

@ -6,42 +6,42 @@
username,
...
}: let
inherit (config.modules) fish;
inherit (config.modules) fish color;
in {
options.modules.fish = import ./options.nix {inherit lib mylib;};
config = lib.mkIf fish.enable {
home.file.".config/fish/themes/catppuccin-latte.theme".text = ''
# name: 'Catppuccin Latte'
# name: 'Catppuccin Mocha'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: eff1f5
# preferred_background: ${color.hex.base}
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword d20f39
fish_color_quote 40a02b
fish_color_redirection ea76cb
fish_color_end fe640b
fish_color_comment 8c8fa1
fish_color_error d20f39
fish_color_gray 9ca0b0
fish_color_selection --background=ccd0da
fish_color_search_match --background=ccd0da
fish_color_option 40a02b
fish_color_operator ea76cb
fish_color_escape e64553
fish_color_autosuggestion 9ca0b0
fish_color_cancel d20f39
fish_color_cwd df8e1d
fish_color_user 179299
fish_color_host_remote 40a02b
fish_color_host 1e66f5
fish_color_status d20f39
fish_pager_color_progress 9ca0b0
fish_pager_color_prefix ea76cb
fish_pager_color_completion 4c4f69
fish_pager_color_description 9ca0b0
fish_color_normal ${color.hex.text}
fish_color_command ${color.hex.blue}
fish_color_param f2cdcd
fish_color_keyword f38ba8
fish_color_quote a6e3a1
fish_color_redirection f5c2e7
fish_color_end fab387
fish_color_comment 7f849c
fish_color_error f38ba8
fish_color_gray 6c7086
fish_color_selection --background=313244
fish_color_search_match --background=313244
fish_color_option a6e3a1
fish_color_operator f5c2e7
fish_color_escape eba0ac
fish_color_autosuggestion 6c7086
fish_color_cancel f38ba8
fish_color_cwd f9e2af
fish_color_user 94e2d5
fish_color_host ${color.hex.blue}
fish_color_host_remote a6e3a1
fish_color_status f38ba8
fish_pager_color_progress 6c7086
fish_pager_color_prefix f5c2e7
fish_pager_color_completion ${color.hex.text}
fish_pager_color_description 6c7086
'';
programs.fish = {

View File

@ -7,7 +7,7 @@
nixosConfig,
...
}: let
inherit (config.modules) hyprland color waybar;
inherit (config.modules) hyprland color;
always-bind = lib.mergeAttrsList [
{
@ -203,11 +203,11 @@ in {
enable = true;
settings = {
options = {
background = "${color.hex.dark.text}";
background = "${color.hex.text}";
overlay = true;
overlay_font = "${color.font}:12";
overlay_text_color = "${color.hex.dark.text}";
overlay_background_color = "${color.hex.dark.base}";
overlay_text_color = "${color.hex.text}";
overlay_background_color = "${color.hex.base}";
};
};
};
@ -242,12 +242,12 @@ in {
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(${color.hex.dark.base})";
font_color = "rgb(${color.hex.base})";
font_family = "${color.font}";
inner_color = "rgb(${color.hex.dark.lavender})";
outer_color = "rgb(${color.hex.dark.base})";
inner_color = "rgb(${color.hex.lavender})";
outer_color = "rgb(${color.hex.base})";
outline_thickness = 2;
placeholder_text = "<span foreground='\#\#${color.hex.dark.base}'>Password...</span>";
placeholder_text = "<span foreground='\#\#${color.hex.base}'>Password...</span>";
shadow_passes = 0;
rounding = 5;
halign = "center";
@ -261,7 +261,7 @@ in {
position = "0, 300";
monitor = "";
text = ''cmd[update:1000] date -I'';
color = "rgba(${color.hex.dark.text}AA)";
color = "rgba(${color.hex.text}AA)";
font_size = 22;
font_family = "${color.font}";
halign = "center";
@ -273,7 +273,7 @@ in {
position = "0, 200";
monitor = "";
text = ''cmd[update:1000] date +"%-H:%M"'';
color = "rgba(${color.hex.dark.text}AA)";
color = "rgba(${color.hex.text}AA)";
font_size = 95;
font_family = "${color.font} Extrabold";
halign = "center";
@ -339,26 +339,26 @@ in {
settings = {
global = {
monitor = waybar.monitor;
monitor = config.modules.waybar.monitor;
font = "${color.font} 11";
offset = "10x10";
background = "#${color.hex.light.base}";
foreground = "#${color.hex.light.text}";
background = "#${color.hex.base}";
foreground = "#${color.hex.text}";
frame_width = 2;
corner_radius = 5;
separator_color = "frame";
};
urgency_low = {
frame_color = "#${color.hex.light.green}";
frame_color = "#${color.hex.green}";
};
urgency_normal = {
frame_color = "#${color.hex.light.green}";
frame_color = "#${color.hex.green}";
};
urgency_critical = {
frame_color = "#${color.hex.light.red}";
frame_color = "#${color.hex.red}";
};
};
};
@ -386,8 +386,8 @@ in {
gaps_out = 10;
border_size = 2;
"col.active_border" = "rgb(${color.hex.dark.lavender})";
"col.inactive_border" = "rgba(${color.hex.dark.base}AA)";
"col.active_border" = "rgb(${color.hex.lavender})";
"col.inactive_border" = "rgba(${color.hex.base}AA)";
};
group = {
@ -397,12 +397,12 @@ in {
font_size = 10;
gradients = false;
"col.active" = "rgb(${color.hex.dark.lavender})";
"col.inactive" = "rgba(${color.hex.dark.base}AA)";
"col.active" = "rgb(${color.hex.lavender})";
"col.inactive" = "rgba(${color.hex.base}AA)";
};
"col.border_active" = "rgb(${color.hex.dark.lavender})";
"col.border_inactive" = "rgba(${color.hex.dark.base}AA)";
"col.border_active" = "rgb(${color.hex.lavender})";
"col.border_inactive" = "rgba(${color.hex.base}AA)";
};
input = {

View File

@ -71,8 +71,8 @@ in {
};
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/index.ts
"theme.bar.background" = "#${color.hex.light.base}";
"theme.bar.border.color" = "#${color.hex.dark.lavender}";
"theme.bar.background" = "#${color.hex.base}";
"theme.bar.border.color" = "#${color.hex.lavender}";
"theme.bar.border.location" = "full";
"theme.bar.border_radius" = "6px";
"theme.bar.border.width" = "2px";
@ -93,7 +93,7 @@ in {
"theme.bar.buttons.radius" = "6px";
"theme.bar.buttons.spacing" = "2px"; # NOTE: Horizontal inter-button spacing
"theme.bar.buttons.style" = "default";
"theme.bar.buttons.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.text" = "#${color.hex.base}";
"theme.bar.buttons.y_margins" = "2px"; # NOTE: Top/Bottom bar padding
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/general/index.ts
@ -123,19 +123,19 @@ in {
"bar.workspaces.workspaces" = 9;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/workspaces.ts
"theme.bar.buttons.workspaces.active" = "#${color.hex.dark.pink}";
"theme.bar.buttons.workspaces.available" = "#${color.hex.dark.base}";
"theme.bar.buttons.workspaces.background" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.workspaces.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.workspaces.active" = "#${color.hex.pink}";
"theme.bar.buttons.workspaces.available" = "#${color.hex.base}";
"theme.bar.buttons.workspaces.background" = "#${color.hex.lavender}";
"theme.bar.buttons.workspaces.border" = "#${color.hex.lavender}";
"theme.bar.buttons.workspaces.enableBorder" = false;
"theme.bar.buttons.workspaces.fontSize" = "18px";
"theme.bar.buttons.workspaces.hover" = "#${color.hex.dark.pink}";
"theme.bar.buttons.workspaces.hover" = "#${color.hex.pink}";
"theme.bar.buttons.workspaces.numbered_active_highlight_border" = "4px"; # border radius
"theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = "#${color.hex.dark.base}";
"theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = "#${color.hex.base}";
"theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "6px";
"theme.bar.buttons.workspaces.numbered_active_underline_color" = "#${color.hex.dark.pink}";
"theme.bar.buttons.workspaces.numbered_active_underline_color" = "#${color.hex.pink}";
"theme.bar.buttons.workspaces.numbered_inactive_padding" = "6px"; # make the same as numbered_active_highlight_padding to avoid layout jumping
"theme.bar.buttons.workspaces.occupied" = "#${color.hex.dark.base}";
"theme.bar.buttons.workspaces.occupied" = "#${color.hex.base}";
"theme.bar.buttons.workspaces.smartHighlight" = "false";
"theme.bar.buttons.workspaces.spacing" = "6px"; # no visible difference?
@ -156,13 +156,13 @@ in {
"bar.windowtitle.truncation_size" = 50;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/windowtitle.ts
"theme.bar.buttons.windowtitle.background" = "#${color.hex.dark.pink}";
"theme.bar.buttons.windowtitle.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.windowtitle.background" = "#${color.hex.pink}";
"theme.bar.buttons.windowtitle.border" = "#${color.hex.lavender}";
"theme.bar.buttons.windowtitle.enableBorder" = false;
"theme.bar.buttons.windowtitle.icon_background" = "#${color.hex.dark.pink}";
"theme.bar.buttons.windowtitle.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.windowtitle.icon_background" = "#${color.hex.pink}";
"theme.bar.buttons.windowtitle.icon" = "#${color.hex.base}";
"theme.bar.buttons.windowtitle.spacing" = "6px"; # Spacing between icon and text
"theme.bar.buttons.windowtitle.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.windowtitle.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/media/index.ts
"bar.media.format" = "{artist: - }{title}";
@ -172,13 +172,13 @@ in {
"bar.media.truncation_size" = 30;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/media.ts
"theme.bar.buttons.media.background" = "#${color.hex.dark.mauve}";
"theme.bar.buttons.media.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.media.background" = "#${color.hex.mauve}";
"theme.bar.buttons.media.border" = "#${color.hex.lavender}";
"theme.bar.buttons.media.enableBorder" = false;
"theme.bar.buttons.media.icon_background" = "#${color.hex.dark.base}";
"theme.bar.buttons.media.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.media.icon_background" = "#${color.hex.base}";
"theme.bar.buttons.media.icon" = "#${color.hex.base}";
"theme.bar.buttons.media.spacing" = "6px";
"theme.bar.buttons.media.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.media.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/cava/index.ts
"bar.customModules.cava.showActiveOnly" = true;
@ -186,73 +186,73 @@ in {
# "bar.customModules.cava.leftClick" = "menu:media";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/cava.ts
"theme.bar.buttons.modules.cava.background" = "#${color.hex.dark.red}";
"theme.bar.buttons.modules.cava.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.cava.background" = "#${color.hex.red}";
"theme.bar.buttons.modules.cava.border" = "#${color.hex.lavender}";
"theme.bar.buttons.modules.cava.enableBorder" = false;
"theme.bar.buttons.modules.cava.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cava.icon_background" = "#${color.hex.dark.red}";
"theme.bar.buttons.modules.cava.icon" = "#${color.hex.base}";
"theme.bar.buttons.modules.cava.icon_background" = "#${color.hex.red}";
"theme.bar.buttons.modules.cava.spacing" = "6px";
"theme.bar.buttons.modules.cava.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cava.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/volume/index.ts
"bar.volume.middleClick" = "kitty ncpamixer";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/volume.ts
"theme.bar.buttons.volume.background" = "#${color.hex.dark.maroon}";
"theme.bar.buttons.volume.background" = "#${color.hex.maroon}";
"theme.bar.buttons.volume.enableBorder" = false;
"theme.bar.buttons.volume.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.volume.icon_background" = "#${color.hex.dark.maroon}";
"theme.bar.buttons.volume.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.volume.border" = "#${color.hex.lavender}";
"theme.bar.buttons.volume.icon_background" = "#${color.hex.maroon}";
"theme.bar.buttons.volume.icon" = "#${color.hex.base}";
"theme.bar.buttons.volume.spacing" = "6px";
"theme.bar.buttons.volume.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.volume.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/network/index.ts
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/network.ts
"theme.bar.buttons.network.background" = "#${color.hex.dark.peach}";
"theme.bar.buttons.network.background" = "#${color.hex.peach}";
"theme.bar.buttons.network.enableBorder" = false;
"theme.bar.buttons.network.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.network.icon_background" = "#${color.hex.dark.peach}";
"theme.bar.buttons.network.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.network.border" = "#${color.hex.lavender}";
"theme.bar.buttons.network.icon_background" = "#${color.hex.peach}";
"theme.bar.buttons.network.icon" = "#${color.hex.base}";
"theme.bar.buttons.network.spacing" = "6px";
"theme.bar.buttons.network.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.network.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/bluetooth/index.ts
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/bluetooth.ts
"theme.bar.buttons.bluetooth.background" = "#${color.hex.dark.yellow}";
"theme.bar.buttons.bluetooth.background" = "#${color.hex.yellow}";
"theme.bar.buttons.bluetooth.enableBorder" = false;
"theme.bar.buttons.bluetooth.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.bluetooth.icon_background" = "#${color.hex.dark.yellow}";
"theme.bar.buttons.bluetooth.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.bluetooth.border" = "#${color.hex.lavender}";
"theme.bar.buttons.bluetooth.icon_background" = "#${color.hex.yellow}";
"theme.bar.buttons.bluetooth.icon" = "#${color.hex.base}";
"theme.bar.buttons.bluetooth.spacing" = "6px";
"theme.bar.buttons.bluetooth.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.bluetooth.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/cpu/index.ts
"bar.customModules.cpu.middleClick" = "kitty btop";
"bar.customModules.cpu.pollingInterval" = 1000;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/cpu.ts
"theme.bar.buttons.modules.cpu.background" = "#${color.hex.dark.green}";
"theme.bar.buttons.modules.cpu.background" = "#${color.hex.green}";
"theme.bar.buttons.modules.cpu.enableBorder" = false;
"theme.bar.buttons.modules.cpu.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.cpu.icon_background" = "#${color.hex.dark.green}";
"theme.bar.buttons.modules.cpu.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cpu.border" = "#${color.hex.lavender}";
"theme.bar.buttons.modules.cpu.icon_background" = "#${color.hex.green}";
"theme.bar.buttons.modules.cpu.icon" = "#${color.hex.base}";
"theme.bar.buttons.modules.cpu.spacing" = "6px";
"theme.bar.buttons.modules.cpu.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.cpu.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/ram/index.ts
"bar.customModules.ram.labelType" = "percentage"; # "used/total", "percentage"
"bar.customModules.ram.pollingInterval" = 1000;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/ram.ts
"theme.bar.buttons.modules.ram.background" = "#${color.hex.dark.teal}";
"theme.bar.buttons.modules.ram.background" = "#${color.hex.teal}";
"theme.bar.buttons.modules.ram.enableBorder" = false;
"theme.bar.buttons.modules.ram.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.ram.icon_background" = "#${color.hex.dark.teal}";
"theme.bar.buttons.modules.ram.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.ram.border" = "#${color.hex.lavender}";
"theme.bar.buttons.modules.ram.icon_background" = "#${color.hex.teal}";
"theme.bar.buttons.modules.ram.icon" = "#${color.hex.base}";
"theme.bar.buttons.modules.ram.spacing" = "6px";
"theme.bar.buttons.modules.ram.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.ram.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/storage/index.ts
"bar.customModules.storage.labelType" = "percentage"; # "used/total", "percentage"
@ -260,34 +260,34 @@ in {
"bar.customModules.storage.pollingInterval" = 60000;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/storage.ts
"theme.bar.buttons.modules.storage.background" = "#${color.hex.dark.sky}";
"theme.bar.buttons.modules.storage.background" = "#${color.hex.sky}";
"theme.bar.buttons.modules.storage.enableBorder" = false;
"theme.bar.buttons.modules.storage.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.modules.storage.icon_background" = "#${color.hex.dark.sky}";
"theme.bar.buttons.modules.storage.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.storage.border" = "#${color.hex.lavender}";
"theme.bar.buttons.modules.storage.icon_background" = "#${color.hex.sky}";
"theme.bar.buttons.modules.storage.icon" = "#${color.hex.base}";
"theme.bar.buttons.modules.storage.spacing" = "6px";
"theme.bar.buttons.modules.storage.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.modules.storage.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/clock/index.ts
"bar.clock.format" = "%Y-%m-%d %H:%M";
"bar.clock.showTime" = true;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/clock.ts
"theme.bar.buttons.clock.background" = "#${color.hex.dark.sapphire}";
"theme.bar.buttons.clock.background" = "#${color.hex.sapphire}";
"theme.bar.buttons.clock.enableBorder" = false;
"theme.bar.buttons.clock.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.clock.icon_background" = "#${color.hex.dark.sapphire}";
"theme.bar.buttons.clock.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.clock.border" = "#${color.hex.lavender}";
"theme.bar.buttons.clock.icon_background" = "#${color.hex.sapphire}";
"theme.bar.buttons.clock.icon" = "#${color.hex.base}";
"theme.bar.buttons.clock.spacing" = "6px";
"theme.bar.buttons.clock.text" = "#${color.hex.dark.base}";
"theme.bar.buttons.clock.text" = "#${color.hex.base}";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/systray/index.ts
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/systray.ts
"theme.bar.buttons.systray.background" = "#${color.hex.dark.blue}";
"theme.bar.buttons.systray.background" = "#${color.hex.blue}";
"theme.bar.buttons.systray.enableBorder" = false;
"theme.bar.buttons.systray.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.systray.customIcon" = "#${color.hex.dark.base}";
"theme.bar.buttons.systray.border" = "#${color.hex.lavender}";
"theme.bar.buttons.systray.customIcon" = "#${color.hex.base}";
"theme.bar.buttons.systray.spacing" = "6px";
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/notifications/index.ts
@ -295,20 +295,20 @@ in {
"bar.notifications.show_total" = true;
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/notifications.ts
"theme.bar.buttons.notifications.background" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.notifications.background" = "#${color.hex.lavender}";
"theme.bar.buttons.notifications.enableBorder" = false;
"theme.bar.buttons.notifications.border" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.notifications.icon_background" = "#${color.hex.dark.lavender}";
"theme.bar.buttons.notifications.icon" = "#${color.hex.dark.base}";
"theme.bar.buttons.notifications.border" = "#${color.hex.lavender}";
"theme.bar.buttons.notifications.icon_background" = "#${color.hex.lavender}";
"theme.bar.buttons.notifications.icon" = "#${color.hex.base}";
"theme.bar.buttons.notifications.spacing" = "6px";
"theme.bar.buttons.notifications.total" = "#${color.hex.dark.base}";
"theme.bar.buttons.notifications.total" = "#${color.hex.base}";
#
# TODO: Menus Config
#
"theme.bar.menus.background" = "#${color.hex.light.base}";
"theme.bar.menus.border.color" = "#${color.hex.dark.lavender}";
"theme.bar.menus.background" = "#${color.hex.base}";
"theme.bar.menus.border.color" = "#${color.hex.lavender}";
"theme.bar.menus.border.radius" = "6px";
"theme.bar.menus.border.size" = "2px";
"theme.bar.menus.buttons.radius" = "0.4em";

View File

@ -5,7 +5,7 @@
mylib,
...
}: let
inherit (config.modules) kitty;
inherit (config.modules) kitty color;
in {
options.modules.kitty = import ./options.nix {inherit lib mylib;};
@ -27,9 +27,7 @@ in {
"kitty_mod+l" = "next_layout";
};
settings = let
color = config.modules.color.hex.dark;
in {
settings = {
editor = config.home.sessionVariables.EDITOR;
scrollback_lines = 10000;
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
@ -50,74 +48,74 @@ in {
#
# The basic colors
background = "#${color.base}";
foreground = "#${color.text}";
selection_foreground = "#${color.base}";
selection_background = "#${color.rosewater}";
background = color.hexS.base;
foreground = color.hexS.text;
selection_foreground = color.hexS.base;
selection_background = color.hexS.rosewater;
# Cursor colors
cursor = "#${color.rosewater}";
cursor_text_color = "#${color.base}";
cursor = color.hexS.rosewater;
cursor_text_color = color.hexS.base;
# URL underline color when hovering with mouse
url_color = "#${color.rosewater}";
url_color = color.hexS.rosewater;
# Kitty window border colors
active_border_color = "#${color.lavender}";
inactive_border_color = "#${color.overlay0}";
bell_border_color = "#${color.yellow}";
active_border_color = color.hexS.lavender;
inactive_border_color = color.hexS.overlay0;
bell_border_color = color.hexS.yellow;
# OS Window titlebar colors
wayland_titlebar_color = "system";
macos_titlebar_color = "system";
# Tab bar colors
active_tab_foreground = "#${color.base}";
active_tab_background = "#${color.lavender}";
inactive_tab_foreground = "#${color.text}";
inactive_tab_background = "#${color.crust}";
tab_bar_background = "#${color.base}";
active_tab_foreground = color.hexS.base;
active_tab_background = color.hexS.lavender;
inactive_tab_foreground = color.hexS.text;
inactive_tab_background = color.hexS.crust;
tab_bar_background = color.hexS.base;
# Color for marks (marked text in the terminal)
mark1_foreground = "#${color.base}";
mark1_background = "#${color.lavender}";
mark2_foreground = "#${color.base}";
mark2_background = "#${color.mauve}";
mark3_foreground = "#${color.base}";
mark3_background = "#${color.sapphire}";
mark1_foreground = color.hexS.base;
mark1_background = color.hexS.lavender;
mark2_foreground = color.hexS.base;
mark2_background = color.hexS.mauve;
mark3_foreground = color.hexS.base;
mark3_background = color.hexS.sapphire;
# The 16 terminal colors
# black
color0 = "#${color.subtext1}";
color8 = "#${color.subtext0}";
color0 = color.hexS.subtext1;
color8 = color.hexS.subtext0;
# red
color1 = "#${color.red}";
color9 = "#${color.red}";
color1 = color.hexS.red;
color9 = color.hexS.red;
# green
color2 = "#${color.green}";
color10 = "#${color.green}";
color2 = color.hexS.green;
color10 = color.hexS.green;
# yellow
color3 = "#${color.yellow}";
color11 = "#${color.yellow}";
color3 = color.hexS.yellow;
color11 = color.hexS.yellow;
# blue
color4 = "#${color.blue}";
color12 = "#${color.blue}";
color4 = color.hexS.blue;
color12 = color.hexS.blue;
# magenta
color5 = "#${color.pink}";
color13 = "#${color.pink}";
color5 = color.hexS.pink;
color13 = color.hexS.pink;
# cyan
color6 = "#${color.teal}";
color14 = "#${color.teal}";
color6 = color.hexS.teal;
color14 = color.hexS.teal;
# white
color7 = "#${color.surface2}";
color15 = "#${color.surface1}";
color7 = color.hexS.surface2;
color15 = color.hexS.surface1;
};
};
};

View File

@ -1026,40 +1026,40 @@ in {
bubbles = ''
{
normal = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.lavender}", gui = "bold" },
b = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.crust}" },
c = { fg = "#${color.hex.dark.text}", bg = "NONE" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.lavender}", gui = "bold" },
b = { fg = "#${color.hex.text}", bg = "#${color.hex.crust}" },
c = { fg = "#${color.hex.text}", bg = "NONE" },
},
insert = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.green}", gui = "bold" },
b = { fg = "#${color.hex.dark.green}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.green}", gui = "bold" },
b = { fg = "#${color.hex.green}", bg = "#${color.hex.crust}" },
},
visual = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.mauve}", gui = "bold" },
b = { fg = "#${color.hex.dark.mauve}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.mauve}", gui = "bold" },
b = { fg = "#${color.hex.mauve}", bg = "#${color.hex.crust}" },
},
replace = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.red}", gui = "bold" },
b = { fg = "#${color.hex.dark.red}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.red}", gui = "bold" },
b = { fg = "#${color.hex.red}", bg = "#${color.hex.crust}" },
},
-- terminal = {
-- a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.green}", gui = "bold" },
-- b = { fg = "#${color.hex.dark.green}", bg = "#${color.hex.dark.crust}" },
-- a = { fg = "#${color.hex.base}", bg = "#${color.hex.green}", gui = "bold" },
-- b = { fg = "#${color.hex.green}", bg = "#${color.hex.crust}" },
-- },
command = {
a = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.peach}", gui = "bold" },
b = { fg = "#${color.hex.dark.peach}", bg = "#${color.hex.dark.crust}" },
a = { fg = "#${color.hex.base}", bg = "#${color.hex.peach}", gui = "bold" },
b = { fg = "#${color.hex.peach}", bg = "#${color.hex.crust}" },
},
inactive = {
a = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.base}" },
b = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.base}" },
c = { fg = "#${color.hex.dark.text}", bg = "NONE" },
a = { fg = "#${color.hex.text}", bg = "#${color.hex.base}" },
b = { fg = "#${color.hex.text}", bg = "#${color.hex.base}" },
c = { fg = "#${color.hex.text}", bg = "NONE" },
},
}
'';
@ -1598,17 +1598,17 @@ in {
opts = {
line.__raw = ''
function(line)
local base = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.base}" }
local crust = { fg = "#${color.hex.dark.crust}", bg = "#${color.hex.dark.crust}" }
local text = { fg = "#${color.hex.dark.text}", bg = "#${color.hex.dark.crust}" }
local lavender = { fg = "#${color.hex.dark.lavender}", bg = "#${color.hex.dark.lavender}" }
local base = { fg = "#${color.hex.base}", bg = "#${color.hex.base}" }
local crust = { fg = "#${color.hex.crust}", bg = "#${color.hex.crust}" }
local text = { fg = "#${color.hex.text}", bg = "#${color.hex.crust}" }
local lavender = { fg = "#${color.hex.lavender}", bg = "#${color.hex.lavender}" }
local numtabs = vim.call("tabpagenr", "$")
return {
-- Head
{
{ " NEOVIM ", hl = { fg = "#${color.hex.dark.base}", bg = "#${color.hex.dark.lavender}", style = "bold" } },
{ " NEOVIM ", hl = { fg = "#${color.hex.base}", bg = "#${color.hex.lavender}", style = "bold" } },
-- The separator gets a foreground and background fill (each have fg + bg).
-- line.sep("", lavender, lavender),
@ -1617,7 +1617,7 @@ in {
-- Tabs
line.tabs().foreach(function(tab)
-- Switch out the start separator instead of the ending one because the last separator is different
local hl = tab.is_current() and { fg = "#${color.hex.dark.lavender}", bg = "#${color.hex.dark.crust}", style = "bold" } or text
local hl = tab.is_current() and { fg = "#${color.hex.lavender}", bg = "#${color.hex.crust}", style = "bold" } or text
local sep_start = tab.number() == 1 and "" or ""
local sep_end = tab.number() == numtabs and "" or ""

View File

@ -809,7 +809,7 @@ _: let
# }
{
mode = "n";
key = "<leader>cC";
key = "<leader>cc";
action = "<cmd>Neogen<cr>";
options.desc = "Generate Doc Comment";
}

View File

@ -277,14 +277,11 @@ in {
'';
".config/rmpc/themes/${themeName}.ron".text = let
light = color.hex.light;
dark = color.hex.dark;
bg = light.base;
text = light.text;
accent = dark.mauve;
accentHL = dark.red;
surface = dark.base;
bg = color.hex.base;
text = color.hex.text;
accent = color.hex.mauve;
accentHL = color.hex.red;
surface = color.hex.base;
in ''
#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
@ -331,10 +328,10 @@ in {
// The stuff shown in the status bar (on the progress bar)
level_styles: (
info: (fg: "#${accent}", bg: "#${surface}"),
warn: (fg: "#${dark.yellow}", bg: "#${surface}"),
error: (fg: "#${dark.red}", bg: "#${surface}"),
debug: (fg: "#${dark.green}", bg: "#${surface}"),
trace: (fg: "#${dark.mauve}", bg: "#${surface}"),
warn: (fg: "#${color.hex.yellow}", bg: "#${surface}"),
error: (fg: "#${color.hex.red}", bg: "#${surface}"),
debug: (fg: "#${color.hex.green}", bg: "#${surface}"),
trace: (fg: "#${color.hex.mauve}", bg: "#${surface}"),
),
progress_bar: (