Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background colour #4

Open
djensenius opened this issue Jul 26, 2024 · 4 comments · May be fixed by #10
Open

Background colour #4

djensenius opened this issue Jul 26, 2024 · 4 comments · May be fixed by #10

Comments

@djensenius
Copy link

Hello-

When using lualine the background colour doesn't match.

I made this change to make it work.

local M = {}
local utils = require("lualine.utils.utils")

---@param colors TmuxStatusComponentColors
function M.create_hightlights(colors)
  local lualine_bg = utils.extract_highlight_colors("statusline", "bg")
  for name, value in pairs(colors) do
    vim.cmd.highlight('tmux_status_' .. name .. ' guifg=' .. value .. ' guibg=' .. lualine_bg)
  end
end

---@param name string
---@return string
function M.get_highlight(name)
  return "%#" .. name .. "#"
end

return M
@christopher-francisco
Copy link
Owner

christopher-francisco commented Jul 26, 2024

Nice one. Looks like you'd like the ability to set the BG color, so that it's retained. Perhaps this is better passed down in the config object. Do you mind sharing a couple of screenshots, 1 without the change above, and one with it?

@djensenius
Copy link
Author

Sure thing!

Without:
Image

With:
Image

Using theme = "catppuccin" in lualine

@christopher-francisco
Copy link
Owner

Makes sense. Perhaps the way to go is expanding the properties in colors to take an object defining both fg and bg, as opposed to a string. Do you think that could work?

@djensenius
Copy link
Author

That could work. :)

@jemag jemag linked a pull request Dec 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants