From f2f044eebe69f1197d257d11944eb3e87ee926df Mon Sep 17 00:00:00 2001 From: kiri Date: Sun, 30 Nov 2025 21:13:25 +0100 Subject: [PATCH] Improve and add theming --- .../nixCats/lua/plugins/coding.lua | 5 - .../home-manager/nixCats/lua/plugins/lsp.lua | 1 - .../home-manager/nixCats/lua/plugins/ui.lua | 3 - modules/themes/catppuccin.nix | 39 +++-- modules/themes/gruvbox.nix | 114 ++++++++++++ modules/themes/kanagawa-dragon.nix | 162 ++++++++++++++++++ modules/themes/kanagawa-wave.nix | 151 ++++++++++++++++ modules/variables.nix | 2 +- 8 files changed, 451 insertions(+), 26 deletions(-) create mode 100644 modules/themes/gruvbox.nix create mode 100644 modules/themes/kanagawa-dragon.nix create mode 100644 modules/themes/kanagawa-wave.nix diff --git a/modules/home-manager/nixCats/lua/plugins/coding.lua b/modules/home-manager/nixCats/lua/plugins/coding.lua index 73cdc6e..c6c302f 100644 --- a/modules/home-manager/nixCats/lua/plugins/coding.lua +++ b/modules/home-manager/nixCats/lua/plugins/coding.lua @@ -205,12 +205,8 @@ require("lz.n").load({ documentation = { auto_show = true, auto_show_delay_ms = 500, - window = { - border = "rounded", - }, }, menu = { - border = "rounded", draw = { columns = { { "kind_icon" }, { "label", gap = 1 } }, components = { @@ -254,7 +250,6 @@ require("lz.n").load({ -- Shows a signature help window while you type arguments for a function signature = { - window = { border = "rounded" }, enabled = true, }, }) diff --git a/modules/home-manager/nixCats/lua/plugins/lsp.lua b/modules/home-manager/nixCats/lua/plugins/lsp.lua index db985a8..b1d1f8f 100644 --- a/modules/home-manager/nixCats/lua/plugins/lsp.lua +++ b/modules/home-manager/nixCats/lua/plugins/lsp.lua @@ -78,7 +78,6 @@ require("lz.n").load({ -- 1. Setup Diagnostics (Visuals) vim.diagnostic.config({ severity_sort = true, - float = { border = "rounded", source = "if_many" }, underline = { severity = vim.diagnostic.severity.ERROR }, signs = { text = { diff --git a/modules/home-manager/nixCats/lua/plugins/ui.lua b/modules/home-manager/nixCats/lua/plugins/ui.lua index 21c1501..db110fa 100644 --- a/modules/home-manager/nixCats/lua/plugins/ui.lua +++ b/modules/home-manager/nixCats/lua/plugins/ui.lua @@ -109,9 +109,6 @@ require("lz.n").load({ require("which-key").setup({ preset = "modern", delay = 200, - win = { - border = "rounded", - }, icons = { -- set icon mappings to true if you have a Nerd Font mappings = true, diff --git a/modules/themes/catppuccin.nix b/modules/themes/catppuccin.nix index 7eb17d3..cf414a0 100644 --- a/modules/themes/catppuccin.nix +++ b/modules/themes/catppuccin.nix @@ -26,6 +26,13 @@ transparentButtons = false; floating = true; }; + + neovim = { + plugin = pkgs.vimPlugins.catppuccin-nvim; + setup = '' + vim.cmd.colorscheme("catppuccin"); + ''; + }; }; description = "Theme configuration options"; }; @@ -36,22 +43,22 @@ # Mocha # See https://tinted-theming.github.io/tinted-gallery/ for more schemes base16Scheme = { - base00 = "1e1e2e"; # Default Background - base01 = "181825"; # Lighter Background (Used for status bars, line number and folding marks) - base02 = "313244"; # Selection Background - base03 = "45475a"; # Comments, Invisibles, Line Highlighting - base04 = "585b70"; # Dark Foreground (Used for status bars) - base05 = "cdd6f4"; # Default Foreground, Caret, Delimiters, Operators - base06 = "f5e0dc"; # Light Foreground (Not often used) - base07 = "b4befe"; # Light Background (Not often used) - base08 = "f38ba8"; # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted - base09 = "fab387"; # Integers, Boolean, Constants, XML Attributes, Markup Link Url - base0A = "f9e2af"; # Classes, Markup Bold, Search Text Background - base0B = "a6e3a1"; # Strings, Inherited Class, Markup Code, Diff Inserted - base0C = "94e2d5"; # Support, Regular Expressions, Escape Characters, Markup Quotes - base0D = "89b4fa"; # Functions, Methods, Attribute IDs, Headings, Accent color - base0E = "cba6f7"; # Keywords, Storage, Selector, Markup Italic, Diff Changed - base0F = "f2cdcd"; # Deprecated, Opening/Closing Embedded Language Tags, e.g. + base00 = "#1e1e2e"; + base01 = "#181825"; + base02 = "#313244"; + base03 = "#45475a"; + base04 = "#585b70"; + base05 = "#cdd6f4"; + base06 = "#f5e0dc"; + base07 = "#b4befe"; + base08 = "#f38ba8"; + base09 = "#fab387"; + base0A = "#f9e2af"; + base0B = "#a6e3a1"; + base0C = "#94e2d5"; + base0D = "#89b4fa"; + base0E = "#cba6f7"; + base0F = "#f2cdcd"; }; cursor = { diff --git a/modules/themes/gruvbox.nix b/modules/themes/gruvbox.nix new file mode 100644 index 0000000..0b4392f --- /dev/null +++ b/modules/themes/gruvbox.nix @@ -0,0 +1,114 @@ +{ + lib, + pkgs, + config, + ... +}: +{ + options.theme = lib.mkOption { + type = lib.types.attrs; + default = { + rounding = 17; + gaps-in = 5; + gaps-out = 10; + active-opacity = 1; + inactive-opacity = 1; + blur = true; + border-size = 3; + animation-speed = "fast"; # "fast" | "medium" | "slow" + fetch = "none"; # "nerdfetch" | "neofetch" | "pfetch" | "none" + textColorOnWallpaper = config.lib.stylix.colors.base01; # Color of the text displayed on the wallpaper (Lockscreen, display manager, ...) + + bar = { + # Hyprpanel + position = "top"; # "top" | "bottom" + transparent = true; + transparentButtons = false; + floating = true; + }; + + neovim = { + plugin = pkgs.vimPlugins.tokyonight-nvim; + setup = '' + require("tokyonight").setup({ + style = "night" + }) + vim.cmd.colorscheme("tokyonight") + ''; + }; + }; + description = "Theme configuration options"; + }; + + config.stylix = { + enable = true; + + # Tokyo Night Dark + # See https://tinted-theming.github.io/tinted-gallery/ for more schemes + base16Scheme = { + base00 = "#1A1B26"; + base01 = "#16161E"; + base02 = "#2F3549"; + base03 = "#444B6A"; + base04 = "#787C99"; + base05 = "#A9B1D6"; + base06 = "#CBCCD1"; + base07 = "#D5D6DB"; + base08 = "#C0CAF5"; + base09 = "#A9B1D6"; + base0A = "#0DB9D7"; + base0B = "#9ECE6A"; + base0C = "#B4F9F8"; + base0D = "#2AC3DE"; + base0E = "#BB9AF7"; + base0F = "#F7768E"; + }; + + cursor = { + name = "phinger-cursors-light"; + package = pkgs.phinger-cursors; + size = 28; + }; + + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrains Mono Nerd Font"; + }; + + sansSerif = { + package = pkgs.source-sans-pro; + name = "Source Sans Pro"; + }; + + serif = config.stylix.fonts.sansSerif; + + emoji = { + package = pkgs.noto-fonts-color-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + applications = 13; + desktop = 13; + popups = 15; + terminal = 11.5; + }; + }; + + polarity = "dark"; + image = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/leef_dark_purple_minimalist.png"; + sha256 = "sha256-q6ufFdC/tMSb+mllw7XhilkAObemXXyps2SBlnMt7mY="; + }; + + # image = pkgs.fetchurl { + # url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/alone-cloud_dark.png"; + # sha256 = "sha256-L4Esjo6LEwhBEN29WX445F+54rlnvOtAMKsQz8Qpyuc="; + # }; + + # image = pkgs.fetchurl { + # url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/the-cloud-is-hidding-the-moon_dark.png"; + # sha256 = "sha256-EEH2cHsVromD+X5VFF3YObNuSSRbDnpfqEN6fjCztbc="; + # }; + }; +} diff --git a/modules/themes/kanagawa-dragon.nix b/modules/themes/kanagawa-dragon.nix new file mode 100644 index 0000000..1976b87 --- /dev/null +++ b/modules/themes/kanagawa-dragon.nix @@ -0,0 +1,162 @@ +{ + lib, + pkgs, + config, + ... +}: +{ + options.theme = lib.mkOption { + type = lib.types.attrs; + default = { + rounding = 17; + gaps-in = 5; + gaps-out = 10; + active-opacity = 1; + inactive-opacity = 1; + blur = true; + border-size = 3; + animation-speed = "fast"; # "fast" | "medium" | "slow" + fetch = "none"; # "nerdfetch" | "neofetch" | "pfetch" | "none" + textColorOnWallpaper = config.lib.stylix.colors.base01; # Color of the text displayed on the wallpaper (Lockscreen, display manager, ...) + + bar = { + # Hyprpanel + position = "top"; # "top" | "bottom" + transparent = true; + transparentButtons = false; + floating = true; + }; + + neovim = { + plugin = pkgs.vimPlugins.kanagawa-nvim; + setup = '' + require("kanagawa").setup({ + + colors = { + theme = { + all = { + ui = { + bg_gutter = "none" + } + } + } + }, + + overrides = function(colors) + local theme = colors.theme + + local makeDiagnosticColor = function(color) + local c = require("kanagawa.lib.color") + return { fg = color, bg = c(color):blend(theme.ui.bg, 0.95):to_hex() } + end + + return { + NormalFloat = { bg = "none" }, + FloatBorder = { bg = "none" }, + FloatTitle = { bg = "none" }, + + -- Save an hlgroup with dark background and dimmed foreground + -- so that you can use it where your still want darker windows. + -- E.g.: autocmd TermOpen * setlocal winhighlight=Normal:NormalDark + NormalDark = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 }, + + TelescopeTitle = { fg = theme.ui.special, bold = true }, + TelescopePromptNormal = { bg = theme.ui.bg_p1 }, + TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 }, + TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 }, + TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 }, + TelescopePreviewNormal = { bg = theme.ui.bg_dim }, + TelescopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim }, + + Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1 }, -- add `blend = vim.o.pumblend` to enable transparency + PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 }, + PmenuSbar = { bg = theme.ui.bg_m1 }, + PmenuThumb = { bg = theme.ui.bg_p2 }, + + DiagnosticVirtualTextHint = makeDiagnosticColor(theme.diag.hint), + DiagnosticVirtualTextInfo = makeDiagnosticColor(theme.diag.info), + DiagnosticVirtualTextWarn = makeDiagnosticColor(theme.diag.warning), + DiagnosticVirtualTextError = makeDiagnosticColor(theme.diag.error), + } + end, + }) + + vim.cmd.colorscheme("kanagawa-dragon") + ''; + }; + }; + description = "Theme configuration options"; + }; + + config.stylix = { + enable = true; + + # Tokyo Night Dark + # See https://tinted-theming.github.io/tinted-gallery/ for more schemes + base16Scheme = { + base00 = "#181616"; + base01 = "#0d0c0c"; + base02 = "#2d4f67"; + base03 = "#a6a69c"; + base04 = "#7fb4ca"; + base05 = "#c5c9c5"; + base06 = "#938aa9"; + base07 = "#c5c9c5"; + base08 = "#c4746e"; + base09 = "#e46876"; + base0A = "#c4b28a"; + base0B = "#8a9a7b"; + base0C = "#8ea4a2"; + base0D = "#8ba4b0"; + base0E = "#a292a3"; + base0F = "#7aa89f"; + }; + + cursor = { + name = "phinger-cursors-light"; + package = pkgs.phinger-cursors; + size = 28; + }; + + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrains Mono Nerd Font"; + }; + + sansSerif = { + package = pkgs.source-sans-pro; + name = "Source Sans Pro"; + }; + + serif = config.stylix.fonts.sansSerif; + + emoji = { + package = pkgs.noto-fonts-color-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + applications = 13; + desktop = 13; + popups = 15; + terminal = 11.5; + }; + }; + + polarity = "dark"; + image = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/leef_dark_purple_minimalist.png"; + sha256 = "sha256-q6ufFdC/tMSb+mllw7XhilkAObemXXyps2SBlnMt7mY="; + }; + + # image = pkgs.fetchurl { + # url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/alone-cloud_dark.png"; + # sha256 = "sha256-L4Esjo6LEwhBEN29WX445F+54rlnvOtAMKsQz8Qpyuc="; + # }; + + # image = pkgs.fetchurl { + # url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/the-cloud-is-hidding-the-moon_dark.png"; + # sha256 = "sha256-EEH2cHsVromD+X5VFF3YObNuSSRbDnpfqEN6fjCztbc="; + # }; + }; +} diff --git a/modules/themes/kanagawa-wave.nix b/modules/themes/kanagawa-wave.nix new file mode 100644 index 0000000..9824147 --- /dev/null +++ b/modules/themes/kanagawa-wave.nix @@ -0,0 +1,151 @@ +{ + lib, + pkgs, + config, + ... +}: +{ + options.theme = lib.mkOption { + type = lib.types.attrs; + default = { + rounding = 17; + gaps-in = 5; + gaps-out = 10; + active-opacity = 1; + inactive-opacity = 1; + blur = true; + border-size = 3; + animation-speed = "fast"; # "fast" | "medium" | "slow" + fetch = "none"; # "nerdfetch" | "neofetch" | "pfetch" | "none" + textColorOnWallpaper = config.lib.stylix.colors.base01; # Color of the text displayed on the wallpaper (Lockscreen, display manager, ...) + + bar = { + # Hyprpanel + position = "top"; # "top" | "bottom" + transparent = true; + transparentButtons = false; + floating = true; + }; + + neovim = { + plugin = pkgs.vimPlugins.kanagawa-nvim; + setup = '' + require("kanagawa").setup({ + colors = { + theme = { + all = { + ui = { + bg_gutter = "none" + } + } + } + }, + + overrides = function(colors) + local theme = colors.theme + + local makeDiagnosticColor = function(color) + local c = require("kanagawa.lib.color") + return { fg = color, bg = c(color):blend(theme.ui.bg, 0.95):to_hex() } + end + + return { + TelescopeTitle = { fg = theme.ui.special, bold = true }, + TelescopePromptNormal = { bg = theme.ui.bg_p1 }, + TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 }, + TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 }, + TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 }, + TelescopePreviewNormal = { bg = theme.ui.bg_dim }, + TelescopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim }, + + Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1 }, -- add `blend = vim.o.pumblend` to enable transparency + PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 }, + PmenuSbar = { bg = theme.ui.bg_m1 }, + PmenuThumb = { bg = theme.ui.bg_p2 }, + + DiagnosticVirtualTextHint = makeDiagnosticColor(theme.diag.hint), + DiagnosticVirtualTextInfo = makeDiagnosticColor(theme.diag.info), + DiagnosticVirtualTextWarn = makeDiagnosticColor(theme.diag.warning), + DiagnosticVirtualTextError = makeDiagnosticColor(theme.diag.error), + } + end, + }) + + vim.cmd.colorscheme("kanagawa-wave") + ''; + }; + }; + description = "Theme configuration options"; + }; + + config.stylix = { + enable = true; + + # See https =//tinted-theming.github.io/tinted-gallery/ for more schemes + base16Scheme = { + base00 = "#1F1F28"; + base01 = "#16161D"; + base02 = "#223249"; + base03 = "#54546D"; + base04 = "#727169"; + base05 = "#DCD7BA"; + base06 = "#C8C093"; + base07 = "#717C7C"; + base08 = "#C34043"; + base09 = "#FFA066"; + base0A = "#C0A36E"; + base0B = "#76946A"; + base0C = "#6A9589"; + base0D = "#7E9CD8"; + base0E = "#957FB8"; + base0F = "#D27E99"; + }; + + cursor = { + name = "phinger-cursors-light"; + package = pkgs.phinger-cursors; + size = 28; + }; + + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrains Mono Nerd Font"; + }; + + sansSerif = { + package = pkgs.source-sans-pro; + name = "Source Sans Pro"; + }; + + serif = config.stylix.fonts.sansSerif; + + emoji = { + package = pkgs.noto-fonts-color-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + applications = 13; + desktop = 13; + popups = 15; + terminal = 11.5; + }; + }; + + polarity = "dark"; + image = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/leef_dark_purple_minimalist.png"; + sha256 = "sha256-q6ufFdC/tMSb+mllw7XhilkAObemXXyps2SBlnMt7mY="; + }; + + # image = pkgs.fetchurl { + # url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/alone-cloud_dark.png"; + # sha256 = "sha256-L4Esjo6LEwhBEN29WX445F+54rlnvOtAMKsQz8Qpyuc="; + # }; + + # image = pkgs.fetchurl { + # url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/the-cloud-is-hidding-the-moon_dark.png"; + # sha256 = "sha256-EEH2cHsVromD+X5VFF3YObNuSSRbDnpfqEN6fjCztbc="; + # }; + }; +} diff --git a/modules/variables.nix b/modules/variables.nix index c2353d6..ab6fe4c 100644 --- a/modules/variables.nix +++ b/modules/variables.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { imports = [ - ./themes/tokyo-city.nix + ./themes/kanagawa-wave.nix ]; config.var = {