nvim: use zenbones theme, adjust feline, alacritty and waybar

This commit is contained in:
Łukasz Pankowski 2024-06-29 11:06:44 +02:00
parent da18d28504
commit b73ebaf338
9 changed files with 160 additions and 153 deletions

View File

@ -1,41 +1,26 @@
# (https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty/tokyonight_storm.toml)
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#24283b'
foreground = '#c0caf5'
#[colors.cursor]
#cursor = '#c0caf5'
#text = '#24283b'
# Normal colors
[colors.normal]
black = '#1d202f'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#a9b1d6'
# Bright colors
# https://github.com/zenbones-theme/zenbones.nvim/blob/main/extras/alacritty/zenbones_dark.toml
# This file is auto-generated by shipwright.nvim
[colors.bright]
black = '#414868'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#c0caf5'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#ff9e64'
[[colors.indexed_colors]]
index = 17
color = '#db4b4b'
black = "#403833"
red = "#E8838F"
green = "#8BAE68"
yellow = "#D68C67"
blue = "#61ABDA"
magenta = "#CF86C1"
cyan = "#65B8C1"
white = "#888F94"
[colors.cursor]
cursor = "#C4CACF"
text = "#1C1917"
[colors.normal]
black = "#1C1917"
blue = "#6099C0"
cyan = "#66A5AD"
green = "#819B69"
magenta = "#B279A7"
red = "#DE6E7C"
white = "#B4BDC3"
yellow = "#B77E64"
[colors.primary]
background = "#1C1917"
foreground = "#B4BDC3"

View File

@ -1,41 +1,26 @@
# (https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty/tokyonight_day.toml)
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#e1e2e7'
foreground = '#3760bf'
#[colors.cursor]
#cursor = '#3760bf'
#text = '#e1e2e7'
# Normal colors
[colors.normal]
black = '#e9e9ed'
red = '#f52a65'
green = '#587539'
yellow = '#8c6c3e'
blue = '#2e7de9'
magenta = '#9854f1'
cyan = '#007197'
white = '#6172b0'
# Bright colors
# https://github.com/zenbones-theme/zenbones.nvim/blob/main/extras/alacritty/zenbones_light.toml
# This file is auto-generated by shipwright.nvim
[colors.bright]
black = '#a1a6c5'
red = '#f52a65'
green = '#587539'
yellow = '#8c6c3e'
blue = '#2e7de9'
magenta = '#9854f1'
cyan = '#007197'
white = '#3760bf'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#b15c00'
[[colors.indexed_colors]]
index = 17
color = '#c64343'
black = "#CFC1BA"
red = "#94253E"
green = "#3F5A22"
yellow = "#803D1C"
blue = "#1D5573"
magenta = "#7B3B70"
cyan = "#2B747C"
white = "#4F5E68"
[colors.cursor]
cursor = "#2C363C"
text = "#F0EDEC"
[colors.normal]
black = "#F0EDEC"
blue = "#286486"
cyan = "#3B8992"
green = "#4F6C31"
magenta = "#88507D"
red = "#A8334C"
white = "#2C363C"
yellow = "#944927"
[colors.primary]
background = "#F0EDEC"
foreground = "#2C363C"

View File

@ -1,10 +1,10 @@
* {
background-color: #263c59;
color: #7b899d;
background-color: #352f2d;
color: #afa099;
}
#workspaces button.active {
border-bottom: 3px solid #7b899d;
border-bottom: 3px solid #afa099;
}
#workspaces button.urgent {

View File

@ -1,10 +1,10 @@
* {
background-color: #8fa0a3;
color: #394446;
background-color: #e1dcd9;
color: #2c363c;
}
#workspaces button.active {
border-bottom: 3px solid #5c6d70;
border-bottom: 3px solid #2c363c;
}
#workspaces button.urgent {

View File

@ -20,9 +20,11 @@
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
"hierarchy-tree-go.nvim": { "branch": "main", "commit": "9fab9ddefe81edab4a144824955d2d085db3f49a" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lackluster.nvim": { "branch": "main", "commit": "439ae684024be24a9ebc91b6ea2c6f5cf8ab9785" },
"lazy.nvim": { "branch": "main", "commit": "bc620783663ab09d16bff9fdecc07da65b2a1528" },
"leap.nvim": { "branch": "main", "commit": "eca8108dcd5f41fbde2a674dceb58b81ed887dc8" },
"lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" },
"lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
@ -52,5 +54,6 @@
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"whaler": { "branch": "main", "commit": "9e0b67e36250cb80e679563adcd4b7451eae26b2" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" }
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" },
"zenbones.nvim": { "branch": "main", "commit": "e9ba8305f65524f9355515cdd8704b2c6ba2def6" }
}

View File

@ -16,3 +16,11 @@ vim.api.nvim_create_autocmd('BufWritePre', {
group = vim.api.nvim_create_augroup('BufWriteFormat', { clear = true }),
pattern = { '*.go', '*.lua', '*.rs' },
})
vim.api.nvim_create_autocmd('ColorScheme', {
desc = 'Change feline theme',
group = vim.api.nvim_create_augroup('ChangeFelineTheme', { clear = true }),
callback = function()
require('feline').use_theme(vim.o.background)
end,
})

View File

@ -0,0 +1,15 @@
local M = {}
function M.terminalbg()
local ok, lines = pcall(io.lines, os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
if ok then
for line in lines do
if string.find(line, 'light.toml') then
return "light"
end
end
end
return "dark"
end
return M

View File

@ -1,26 +1,15 @@
local function terminalbg()
local ok, lines = pcall(io.lines, os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
if ok then
for line in lines do
if string.find(line, 'light.toml') then
return "light"
end
end
end
return "dark"
end
return {
{
-- Colorscheme
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
'zenbones-theme/zenbones.nvim',
dependencies = { 'rktjmp/lush.nvim' },
config = function()
vim.o.background = terminalbg()
vim.cmd.colorscheme('tokyonight')
vim.o.background = require('lupan.utils').terminalbg()
vim.cmd.colorscheme('zenbones')
end,
},
"slugbyte/lackluster.nvim",
"folke/tokyonight.nvim",
{
-- Indentation guides (see `:help indent_blankline.txt`)
'lukas-reineke/indent-blankline.nvim',

View File

@ -1,19 +1,41 @@
local function feline_config(_, opts)
local theme = {
bg = '#394b70',
black = '#1d202f',
skyblue = '#7aa2f7',
cyan = '#0db9d7',
fg = '#c0caf5',
green = '#1abc9c',
oceanblue = '#3d59a1',
magenta = '#bb9af7',
orange = '#ff9e64',
red = '#f7768e',
violet = '#9d7cd8',
white = '#a9b1d6',
yellow = '#e0af68',
local feline = require('feline')
local dark_theme = {
bg = '#615853',
bg2 = '#352f2d',
black = '#403833',
skyblue = '#61abda',
cyan = '#65b8c1',
fg = '#b4bdc3',
green = '#8bae68',
oceanblue = '#6099c0',
magenta = '#cf86c1',
orange = '#d68c67',
red = '#e8838f',
violet = '#b279a7',
white = '#b4bdc3',
yellow = '#b77e64',
}
feline.add_theme('dark', dark_theme)
local light_theme = {
bg = '#e1dcd9',
bg2 = '#d6cdc9',
black = '#c4b6af',
skyblue = '#1d5573',
cyan = '#2b747c',
fg = '#2c363c',
green = '#3f5a22',
oceanblue = '#286486',
magenta = '#7b3b70',
orange = '#803d1c',
red = '#94253e',
violet = '#88507d',
white = '#4f5e68',
yellow = '#944927',
}
feline.add_theme('light', light_theme)
local statusline = require('arrow.statusline')
local vimode = require('feline.providers.vi_mode')
@ -24,7 +46,7 @@ local function feline_config(_, opts)
return {
name = vimode.get_mode_highlight_name(),
fg = vimode.get_mode_color(),
bg = theme.fg,
bg = 'bg2',
style = 'bold',
}
end,
@ -32,21 +54,21 @@ local function feline_config(_, opts)
str = ' █',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
},
right_sep = {
str = '',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
}
},
file_info = {
provider = 'file_info',
hl = {
fg = theme.fg,
fg = 'fg',
},
left_sep = {
str = ' ',
@ -58,122 +80,123 @@ local function feline_config(_, opts)
arrow = {
provider = function() return statusline.text_for_statusline_with_icons() end,
hl = {
fg = theme.red,
fg = 'red',
style = 'bold',
},
},
file_size = {
provider = 'file_size',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = ' █',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
},
},
line_percentage = {
provider = 'line_percentage',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = '',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
},
},
right_sep = {
str = '',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
},
},
},
position = {
provider = 'position',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
right_sep = {
str = '█ ',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
}
},
diagnostic_errors = {
provider = 'diagnostic_errors',
hl = {
fg = theme.red,
fg = 'red',
},
},
diagnostic_warnings = {
provider = 'diagnostic_warnings',
hl = {
fg = theme.yellow,
},
},
diagnostic_info = {
provider = 'diagnostic_info',
hl = {
fg = theme.green,
fg = 'yellow',
},
},
diagnostic_hints = {
provider = 'diagnostic_hints',
hl = {
fg = theme.blue,
fg = 'cyan',
},
},
diagnostic_info = {
provider = 'diagnostic_info',
hl = {
fg = 'skyblue',
},
},
git_diff_added = {
provider = 'git_diff_added',
hl = {
fg = theme.green,
fg = 'green',
},
},
git_diff_removed = {
provider = 'git_diff_removed',
hl = {
fg = theme.red,
fg = 'red',
},
},
git_diff_changed = {
provider = 'git_diff_changed',
hl = {
fg = theme.yellow,
fg = 'yellow',
},
},
git_branch = {
provider = 'git_branch',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = ' █',
hl = {
fg = theme.fg,
fg = 'bg2',
},
},
right_sep = {
str = '',
hl = {
fg = theme.fg,
fg = 'bg2',
},
}
},
@ -208,9 +231,8 @@ local function feline_config(_, opts)
}
opts.components = { active = active, inactive = inactive }
local feline = require('feline')
feline.setup(opts)
feline.use_theme(theme)
feline.use_theme(require('lupan.utils').terminalbg())
end
return {