diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-04-07 15:06:04 -0400 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-04-07 15:06:04 -0400 |
| commit | 52666e5590a4c24d1085c242918398b9e1be741a (patch) | |
| tree | 398c829241ca1cee55b2fc0f1f9bb828c446515c | |
| parent | a88fbe4bc93c44dd84ec3dee2b981c46881416d6 (diff) | |
| download | home-52666e5590a4c24d1085c242918398b9e1be741a.tar.gz | |
colorscheme support
| -rw-r--r-- | modules/default.nix | 2 | ||||
| -rw-r--r-- | modules/foot.nix | 74 | ||||
| -rw-r--r-- | modules/mountain.nix | 35 | ||||
| -rw-r--r-- | modules/neovim/nvim/lua/config/colorscheme.lua | 9 | ||||
| -rw-r--r-- | modules/neovim/nvim/lua/config/lsp/init.lua | 3 | ||||
| -rw-r--r-- | modules/neovim/nvim/lua/config/settings.lua | 8 | ||||
| -rw-r--r-- | modules/scheme/default.nix | 66 | ||||
| -rw-r--r-- | void/home.nix | 3 |
8 files changed, 171 insertions, 29 deletions
diff --git a/modules/default.nix b/modules/default.nix index 4c44c05..8b6d5a0 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./scheme ./foot.nix ./mako.nix ./neovide.nix @@ -17,5 +18,6 @@ ./services ./gpg ./pass + ./mountain.nix ]; } diff --git a/modules/foot.nix b/modules/foot.nix index 1b00758..da752d2 100644 --- a/modules/foot.nix +++ b/modules/foot.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, ... }: let cfg = config.modules.foot; + scheme = config.modules.scheme; + fmt = col: lib.strings.removePrefix "#" col; in { options.modules.foot = { @@ -32,30 +34,54 @@ in }; colors = { - foreground="cacaca"; - background="0f0f0f"; - regular0="0f0f0f"; - regular1="ac8a8c"; - regular2="8aac8b"; - regular3="aca98a"; - regular4="8f8aac"; - regular5="ac8aac"; - regular6="8aabac"; - regular7="cacaca"; - bright0="262626 "; - bright1="c49ea0 "; - bright2="9ec49f "; - bright3="c4c19e "; - bright4="a39ec4 "; - bright5="c49ec4 "; - bright6="9ec3c4 "; - bright7="f5f5f5 "; - "16"="ceb188"; - "17"="ac8a8c"; - "18"="191919"; - "19"="262626"; - "20"="ac8a8c"; - "21"="e7e7e7"; + # foreground="cacaca"; + # background="0f0f0f"; + # regular0="0f0f0f"; + # regular1="ac8a8c"; + # regular2="8aac8b"; + # regular3="aca98a"; + # regular4="8f8aac"; + # regular5="ac8aac"; + # regular6="8aabac"; + # regular7="cacaca"; + # bright0="262626 "; + # bright1="c49ea0 "; + # bright2="9ec49f "; + # bright3="c4c19e "; + # bright4="a39ec4 "; + # bright5="c49ec4 "; + # bright6="9ec3c4 "; + # bright7="f5f5f5 "; + # "16"="ceb188"; + # "17"="ac8a8c"; + # "18"="191919"; + # "19"="262626"; + # "20"="ac8a8c"; + # "21"="e7e7e7"; + foreground=fmt scheme.base05; + background=fmt scheme.base00; + regular0=fmt scheme.base00; + regular1=fmt scheme.base08; + regular2=fmt scheme.base0B; + regular3=fmt scheme.base0A; + regular4=fmt scheme.base0D; + regular5=fmt scheme.base0E; + regular6=fmt scheme.base0C; + regular7=fmt scheme.base05; + bright0=fmt scheme.base02; + bright1=fmt scheme.base08; + bright2=fmt scheme.base0B; + bright3=fmt scheme.base0A; + bright4=fmt scheme.base0D; + bright5=fmt scheme.base0E; + bright6=fmt scheme.base0C; + bright7=fmt scheme.base07; + "16"=fmt scheme.base09; + "17"=fmt scheme.base0F; + "18"=fmt scheme.base01; + "19"=fmt scheme.base02; + "20"=fmt scheme.base04; + "21"=fmt scheme.base06; }; }; }; diff --git a/modules/mountain.nix b/modules/mountain.nix new file mode 100644 index 0000000..94066d6 --- /dev/null +++ b/modules/mountain.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.modules.mountain; + hexColorRegex = ''#([0-9a-fA-F]{3}){1,2}''; + hexColor = { + type = lib.types.strMatching hexColorRegex; + }; +in +{ + options.modules.mountain = { + enable = lib.mkEnableOption "mountain theme"; + }; + + config = lib.mkIf cfg.enable { + modules.scheme = { + name = "base16-default-dark"; + base00 = "#0f0f0f"; + base01 = "#191919"; + base02 = "#262626"; + base03 = "#4c4c4c"; + base04 = "#ac8a8c"; + base05 = "#cacaca"; + base06 = "#e7e7e7"; + base07 = "#f0f0f0"; + base08 = "#ac8a8c"; + base09 = "#ceb188"; + base0A = "#aca98a"; + base0B = "#8aac8b"; + base0C = "#8aabac"; + base0D = "#8f8aac"; + base0E = "#ac8aac"; + base0F = "#ac8a8c"; + }; + }; +} diff --git a/modules/neovim/nvim/lua/config/colorscheme.lua b/modules/neovim/nvim/lua/config/colorscheme.lua index 026c0ed..7d40492 100644 --- a/modules/neovim/nvim/lua/config/colorscheme.lua +++ b/modules/neovim/nvim/lua/config/colorscheme.lua @@ -1,5 +1,6 @@ vim.cmd[[ colorscheme base16-mountain + " colorscheme base16-selenized-black hi LineNr guifg=#ceb188 hi LineNrAbove guifg=#262626 hi LineNrBelow guifg=#262626 @@ -11,8 +12,8 @@ vim.cmd[[ hi PmenuSel guibg=#191919 guifg=#cacaca hi WinBar guifg=#4c4c4c hi WinSeparator guifg=#191919 - - " status line + " + "" status line hi StatusLine guibg=#191919 guifg=#4c4c4c hi StatuslineInactive guibg=#191919 guifg=#4c4c4c gui=NONE hi StatuslineAccent guifg=#0f0f0f guibg=#aca98a gui=bold @@ -28,3 +29,7 @@ vim.cmd[[ hi LspInfo guibg=#191919 guifg=#8f8aac hi LspHint guibg=#191919 guifg=#8aabac ]] +vim.cmd[[ +hi StatusLineNC guibg=none guifg=#4c4c4c +hi StatusLine guibg=none guifg=#8f8aac +]] diff --git a/modules/neovim/nvim/lua/config/lsp/init.lua b/modules/neovim/nvim/lua/config/lsp/init.lua index d618df2..f4092ff 100644 --- a/modules/neovim/nvim/lua/config/lsp/init.lua +++ b/modules/neovim/nvim/lua/config/lsp/init.lua @@ -59,7 +59,7 @@ vim.api.nvim_create_autocmd("LspAttach", { callback = function(args) -- TODO: this ignores/overwrites default omnifunc rn map('i', "<C-n>", function() - return pumvisible() and '<C-n>' or vim.lsp.completion.trigger() + return pumvisible() and '<C-n>' or vim.lsp.completion.get() end, { expr = true }) map('i', '<Esc>', function() @@ -88,6 +88,7 @@ for server, config in pairs(servers) do -- config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities) vim.lsp.config[server].settings = config vim.lsp.enable(server) + lspconfig.rust_analyzer.setup({}) -- lspconfig[server].setup({}) end diff --git a/modules/neovim/nvim/lua/config/settings.lua b/modules/neovim/nvim/lua/config/settings.lua index 19378af..c78cae8 100644 --- a/modules/neovim/nvim/lua/config/settings.lua +++ b/modules/neovim/nvim/lua/config/settings.lua @@ -12,7 +12,13 @@ vim.o.termguicolors = true vim.opt.fillchars = {eob = " "} --vim.o.smd = false --vim.opt.laststatus = 3 -vim.opt.laststatus=0 +vim.opt.laststatus=2 +--%-0{minwid}.{maxwid}{item +vim.opt.statusline="%=%f%=%r %y" +vim.cmd[[ +hi StatusLineNC guibg=none +hi StatusLine guibg=none +]] vim.opt.pumheight = 6 vim.opt.expandtab = true vim.o.mouse="" diff --git a/modules/scheme/default.nix b/modules/scheme/default.nix new file mode 100644 index 0000000..9d6e77e --- /dev/null +++ b/modules/scheme/default.nix @@ -0,0 +1,66 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.modules.scheme; + hexColorRegex = ''#([0-9a-fA-F]{3}){1,2}''; + hexColor = { + type = lib.types.strMatching hexColorRegex; + }; + base16Palette = { + options = { + name = lib.mkOption { + type = lib.types.uniq lib.types.str; + description = "scheme name"; + example = "base16-default-dark"; + }; + light = lib.mkOption { + type = lib.types.uniq lib.types.bool; + default = false; + description = "whether this is a light colorscheme"; + }; + base00 = lib.mkOption hexColor; + base01 = lib.mkOption hexColor; + base02 = lib.mkOption hexColor; + base03 = lib.mkOption hexColor; + base04 = lib.mkOption hexColor; + base05 = lib.mkOption hexColor; + base06 = lib.mkOption hexColor; + base07 = lib.mkOption hexColor; + base08 = lib.mkOption hexColor; + base09 = lib.mkOption hexColor; + base0A = lib.mkOption hexColor; + base0B = lib.mkOption hexColor; + base0C = lib.mkOption hexColor; + base0D = lib.mkOption hexColor; + base0E = lib.mkOption hexColor; + base0F = lib.mkOption hexColor; + }; + }; +in +{ + options.modules.scheme = { + name = lib.mkOption { + type = lib.types.str; + description = "scheme name"; + example = "base16-default-dark"; + }; + base00 = lib.mkOption hexColor; + base01 = lib.mkOption hexColor; + base02 = lib.mkOption hexColor; + base03 = lib.mkOption hexColor; + base04 = lib.mkOption hexColor; + base05 = lib.mkOption hexColor; + base06 = lib.mkOption hexColor; + base07 = lib.mkOption hexColor; + base08 = lib.mkOption hexColor; + base09 = lib.mkOption hexColor; + base0A = lib.mkOption hexColor; + base0B = lib.mkOption hexColor; + base0C = lib.mkOption hexColor; + base0D = lib.mkOption hexColor; + base0E = lib.mkOption hexColor; + base0F = lib.mkOption hexColor; + }; + + # config = lib.mkIf cfg.enable { + # }; +} diff --git a/void/home.nix b/void/home.nix index 8bfbaaa..aee487c 100644 --- a/void/home.nix +++ b/void/home.nix @@ -17,7 +17,7 @@ }; foot.enable = true; - + mountain.enable = true; gpg.enable = true; pass = { @@ -58,6 +58,7 @@ mako.enable = true; neovide.enable = true; + services = { enable = true; coreServices = ["dbus"]; |