diff --git a/home/natto/config/xmonad/xmobar.hs b/home/natto/config/xmonad/xmobar.hs index 430911f..a80cd1f 100644 --- a/home/natto/config/xmonad/xmobar.hs +++ b/home/natto/config/xmonad/xmobar.hs @@ -2,16 +2,16 @@ import Xmobar bg, fg, grey, red, green, yellow, blue, magenta, cyan, white, sep :: String sep = "║" -bg = "#1d1f21" -fg = "#c5c8c6" -grey = "#969896" -red = "#cc6666" -green = "#b5bd68" -yellow = "#f0c674" -blue = "#81a2be" -magenta = "#b294bb" -cyan = "#8abeb7" -white = "#ecebec" +bg = "#002b36" +fg = "#839496" +grey = "#073642" +red = "#dc322f" +green = "#859900" +yellow = "#b58900" +blue = "#268bd2" +magenta = "#d33682" +cyan = "#2aa198" +white = "#eee8d5" config :: Config config = diff --git a/home/natto/config/xmonad/xmonad.hs b/home/natto/config/xmonad/xmonad.hs index b04d53a..b7fe987 100644 --- a/home/natto/config/xmonad/xmonad.hs +++ b/home/natto/config/xmonad/xmonad.hs @@ -20,12 +20,12 @@ import qualified XMonad.StackSet as W import qualified Data.Map as M --colors -bgColor = "#1d1f21" -fgColor = "#c5c8c6" -activeWinColor = "#f0c674" -inactiveWinColor = "#b294bb" -urgentWinColor = "#cc6666" -miscColor = "#8abeb7" +bgColor = "#002b36" +fgColor = "#eee8d5" +inactiveWinColor = "#2aa198" +activeWinColor = "#d33682" +urgentWinColor = "#dc322f" +miscColor = inactiveWinColor myBorderWidth = 2 myTerminal = "/usr/bin/env st" diff --git a/home/natto/services.nix b/home/natto/services.nix index 6345a57..6d3b87e 100644 --- a/home/natto/services.nix +++ b/home/natto/services.nix @@ -105,7 +105,7 @@ in window_type = "dock"; sticky = true; icon_size = 23; - background = "#1d2021"; + background = "#002b36"; icon_gravity = "E"; grow_gravity = "E"; kludges = "force_icons_size"; diff --git a/modules/nvim/default.nix b/modules/nvim/default.nix index 050cdac..278e765 100644 --- a/modules/nvim/default.nix +++ b/modules/nvim/default.nix @@ -1,25 +1,25 @@ -{config, pkgs, ...}: +{ config, pkgs, ... }: { programs.neovim = { enable = true; package = pkgs.neovim-nightly; - # package = pkgs.neovim-nightly.overrideAttrs (_:{ - # nativeBuildInputs = with pkgs; [ unzip cmake pkgconfig gettext tree-sitter ]; - # }); + # package = pkgs.neovim-nightly.overrideAttrs (_:{ + # nativeBuildInputs = with pkgs; [ unzip cmake pkgconfig gettext tree-sitter ]; + # }); defaultEditor = true; configure = { - customRC = '' - lua << EOF - ${builtins.readFile ./init.lua} - EOF - ''; + customRC = '' + lua << EOF + ${builtins.readFile ./init.lua} + EOF + ''; packages.myVimPackage = with pkgs.unstable.vimPlugins; { start = [ nvim-colorizer-lua bracey-vim - auto-pairs - vim-floaterm + auto-pairs + vim-floaterm vim-closetag nerdcommenter nvim-cmp @@ -30,7 +30,7 @@ cmp-path cmp-calc cmp-emoji - # cmp-look + # cmp-look cmp-buffer nvim-lspconfig barbar-nvim @@ -40,7 +40,6 @@ nvim-treesitter vim-latex-live-preview lspkind-nvim - # (gruvbox.overrideAttrs (oa: { patches = [ ./gruvbox.patch ]; })) base16-vim ]; }; diff --git a/modules/nvim/init.lua b/modules/nvim/init.lua index 7b90556..e80045e 100644 --- a/modules/nvim/init.lua +++ b/modules/nvim/init.lua @@ -137,8 +137,6 @@ bind('n', "", ":NvimTreeToggle", {noremap=true, silent=true}) bind('n', "r", ":NvimTreeRefresh", {noremap=true, silent=true}) bind('n', "f", ":NvimTreeFindFile", {noremap=true, silent=true}) -vim.o.background="dark" -comm("colorscheme base16-tomorrow-night") --floaterm vim.g.floaterm_keymap_toggle = '' @@ -321,21 +319,26 @@ local function mode() return mode_map[m] end -hi("Light", "guibg=#c5c8c6 guifg=#1d1f21") -hi("Dark", "guibg=#1d1f21 guifg=#c5c8c6") -hi("Gray", "guifg=#1d1f21 guibg=#b294bb") +--theming +local dark = true +comm("colorscheme base16-solarized-dark") + +hi("Light", "guibg=#eee8d5 guifg=#002b36") +hi("Misc", "guibg=#dc322f guifg=#fdf6e3") +hi("Dark", "guibg=#002b36 guifg=#839496") local function git() local branch = io.popen([[git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n']]):read("*a") return string.len(branch) > 0 and ' '.. branch or '' end + local statusline = { '%#Light# ', mode():upper() .. ' ', - '%#Dark#', + '%#Misc#', string.len(git()) > 0 and ' ' .. git() .. ' ' or '', - '%#Gray# ', + '%#Dark# ', '%f ', '%#Light#', '%=', @@ -351,6 +354,17 @@ local statusline = { vim.o.statusline = table.concat(statusline) +function _G.ToggleTheme() + if dark then + comm("colorscheme base16-solarized-light") + else + comm("colorscheme base16-solarized-dark") + end + dark = not dark + hi("Light", "guibg=#eee8d5 guifg=#002b36") + hi("Dark", "guibg=#002b36 guifg=#839496") + hi("Misc", "guibg=#dc322f guifg=#fdf6e3") + vim.o.statusline = table.concat(statusline) +end +bind('n', "", ":call v:lua.ToggleTheme()", {silent=true}) vim.g.tex_flavor = "latex" -comm("set syntax=off") -