change themes for xmobar and neovim

This commit is contained in:
2022-03-18 13:25:06 +05:30
parent 2bac5bafcd
commit a2dfe8bea3
5 changed files with 52 additions and 39 deletions

View File

@@ -2,16 +2,16 @@ import Xmobar
bg, fg, grey, red, green, yellow, blue, magenta, cyan, white, sep :: String bg, fg, grey, red, green, yellow, blue, magenta, cyan, white, sep :: String
sep = "<fc=" ++ cyan ++ ">║</fc>" sep = "<fc=" ++ cyan ++ ">║</fc>"
bg = "#1d1f21" bg = "#002b36"
fg = "#c5c8c6" fg = "#839496"
grey = "#969896" grey = "#073642"
red = "#cc6666" red = "#dc322f"
green = "#b5bd68" green = "#859900"
yellow = "#f0c674" yellow = "#b58900"
blue = "#81a2be" blue = "#268bd2"
magenta = "#b294bb" magenta = "#d33682"
cyan = "#8abeb7" cyan = "#2aa198"
white = "#ecebec" white = "#eee8d5"
config :: Config config :: Config
config = config =

View File

@@ -20,12 +20,12 @@ import qualified XMonad.StackSet as W
import qualified Data.Map as M import qualified Data.Map as M
--colors --colors
bgColor = "#1d1f21" bgColor = "#002b36"
fgColor = "#c5c8c6" fgColor = "#eee8d5"
activeWinColor = "#f0c674" inactiveWinColor = "#2aa198"
inactiveWinColor = "#b294bb" activeWinColor = "#d33682"
urgentWinColor = "#cc6666" urgentWinColor = "#dc322f"
miscColor = "#8abeb7" miscColor = inactiveWinColor
myBorderWidth = 2 myBorderWidth = 2
myTerminal = "/usr/bin/env st" myTerminal = "/usr/bin/env st"

View File

@@ -105,7 +105,7 @@ in
window_type = "dock"; window_type = "dock";
sticky = true; sticky = true;
icon_size = 23; icon_size = 23;
background = "#1d2021"; background = "#002b36";
icon_gravity = "E"; icon_gravity = "E";
grow_gravity = "E"; grow_gravity = "E";
kludges = "force_icons_size"; kludges = "force_icons_size";

View File

@@ -1,4 +1,4 @@
{config, pkgs, ...}: { config, pkgs, ... }:
{ {
programs.neovim = { programs.neovim = {
@@ -40,7 +40,6 @@
nvim-treesitter nvim-treesitter
vim-latex-live-preview vim-latex-live-preview
lspkind-nvim lspkind-nvim
# (gruvbox.overrideAttrs (oa: { patches = [ ./gruvbox.patch ]; }))
base16-vim base16-vim
]; ];
}; };

View File

@@ -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>r", ":NvimTreeRefresh<CR>", {noremap=true, silent=true})
bind('n', "<Space>f", ":NvimTreeFindFile<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 --floaterm
vim.g.floaterm_keymap_toggle = '<F1>' vim.g.floaterm_keymap_toggle = '<F1>'
@@ -321,21 +319,26 @@ local function mode()
return mode_map[m] return mode_map[m]
end end
hi("Light", "guibg=#c5c8c6 guifg=#1d1f21") --theming
hi("Dark", "guibg=#1d1f21 guifg=#c5c8c6") local dark = true
hi("Gray", "guifg=#1d1f21 guibg=#b294bb") 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 function git()
local branch = io.popen([[git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n']]):read("*a") 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 '' return string.len(branch) > 0 and ''.. branch or ''
end end
local statusline = { local statusline = {
'%#Light# ', '%#Light# ',
mode():upper() .. ' ', mode():upper() .. ' ',
'%#Dark#', '%#Misc#',
string.len(git()) > 0 and ' ' .. git() .. ' ' or '', string.len(git()) > 0 and ' ' .. git() .. ' ' or '',
'%#Gray# ', '%#Dark# ',
'%f ', '%f ',
'%#Light#', '%#Light#',
'%=', '%=',
@@ -351,6 +354,17 @@ local statusline = {
vim.o.statusline = table.concat(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" vim.g.tex_flavor = "latex"
comm("set syntax=off")