2021-07-09 11:09:09 +00:00
|
|
|
local dotfiles_gruv = require'lualine.themes.gruvbox'
|
2021-09-10 15:12:41 +00:00
|
|
|
local theme = require'dotfiles.colorscheme'
|
|
|
|
|
|
|
|
-- https://github.com/dmitmel/dotfiles/commit/bf96e553764e3a166286f5a6a8017e01dadcf6f9
|
|
|
|
-- https://ptb.discord.com/channels/382339402338402315/382339402338402317/885864846892077086
|
|
|
|
function get_color(index)
|
|
|
|
local color = theme.base16_colors[index]
|
|
|
|
local r, g, b = unpack(color, 1, 3)
|
|
|
|
return string.format('#%02x%02x%02x', r, g, b)
|
|
|
|
end
|
2021-07-09 11:09:09 +00:00
|
|
|
|
|
|
|
-- Structure of themes is as follows:
|
|
|
|
-- a: Outer components, such as `NORMAL` text and line counts
|
|
|
|
-- b: secondary components, such git branch info
|
|
|
|
-- c: Middle components, basically everything in the middle
|
|
|
|
|
2021-09-10 15:12:41 +00:00
|
|
|
dotfiles_gruv.normal.a.bg = get_color(12)
|
2021-07-09 11:09:09 +00:00
|
|
|
|
2021-09-10 15:12:41 +00:00
|
|
|
dotfiles_gruv.insert.a.bg = get_color(14)
|
|
|
|
dotfiles_gruv.insert.c.bg = get_color(2)
|
2021-07-09 11:09:09 +00:00
|
|
|
|
2021-09-10 15:12:41 +00:00
|
|
|
dotfiles_gruv.visual.a.bg = get_color(15)
|
|
|
|
dotfiles_gruv.visual.c.bg = get_color(2)
|
|
|
|
dotfiles_gruv.visual.c.fg = get_color(7)
|
2021-07-09 11:09:09 +00:00
|
|
|
|
2021-09-10 15:12:41 +00:00
|
|
|
dotfiles_gruv.command.a.bg = get_color(16)
|
|
|
|
dotfiles_gruv.command.c.bg = get_color(2)
|
|
|
|
dotfiles_gruv.command.c.fg = get_color(7)
|
2021-07-09 11:09:09 +00:00
|
|
|
|
2021-09-10 15:12:41 +00:00
|
|
|
dotfiles_gruv.replace.a.bg = get_color(9)
|
|
|
|
dotfiles_gruv.replace.c.bg = get_color(2)
|
2021-09-10 12:45:16 +00:00
|
|
|
|
|
|
|
-- Displays the currently selected Arduino board
|
|
|
|
local function showBoard()
|
|
|
|
if vim.g.arduino_board then
|
|
|
|
return '[' .. vim.g.arduino_board .. ']'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-07-09 11:09:09 +00:00
|
|
|
require('lualine').setup{
|
|
|
|
options = {
|
|
|
|
theme = dotfiles_gruv
|
|
|
|
}
|
|
|
|
}
|