change themes for xmobar and neovim
This commit is contained in:
		@@ -2,16 +2,16 @@ import Xmobar
 | 
			
		||||
 | 
			
		||||
bg, fg, grey, red, green, yellow, blue, magenta, cyan, white, sep :: String
 | 
			
		||||
sep = "<fc=" ++ cyan ++ ">║</fc>"
 | 
			
		||||
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 =
 | 
			
		||||
 
 | 
			
		||||
@@ -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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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";
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
 
 | 
			
		||||
@@ -137,8 +137,6 @@ bind('n', "<M-o>", ":NvimTreeToggle<CR>", {noremap=true, silent=true})
 | 
			
		||||
bind('n', "<Space>r", ":NvimTreeRefresh<CR>", {noremap=true, silent=true})
 | 
			
		||||
bind('n', "<Space>f", ":NvimTreeFindFile<CR>", {noremap=true, silent=true})
 | 
			
		||||
 | 
			
		||||
vim.o.background="dark"
 | 
			
		||||
comm("colorscheme base16-tomorrow-night")
 | 
			
		||||
 | 
			
		||||
--floaterm
 | 
			
		||||
vim.g.floaterm_keymap_toggle = '<F1>'
 | 
			
		||||
@@ -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', "<F7>", ":call v:lua.ToggleTheme()<CR>", {silent=true})
 | 
			
		||||
vim.g.tex_flavor = "latex"
 | 
			
		||||
comm("set syntax=off")
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user