From 66aabf210b5e736a3df5006648d4201016e05a2a Mon Sep 17 00:00:00 2001 From: mvllow Date: Tue, 7 Jan 2025 09:47:00 -0600 Subject: [PATCH] fix: lualine transparency Fixes #333 --- lua/lualine/themes/rose-pine-alt.lua | 12 +++++++++--- lua/lualine/themes/rose-pine.lua | 22 ++++++++++++++-------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/lua/lualine/themes/rose-pine-alt.lua b/lua/lualine/themes/rose-pine-alt.lua index 05d8af7..287144f 100644 --- a/lua/lualine/themes/rose-pine-alt.lua +++ b/lua/lualine/themes/rose-pine-alt.lua @@ -1,4 +1,10 @@ local p = require("rose-pine.palette") +local config = require("rose-pine.config") + +local bg_base = p.base +if config.options.styles.transparency then + bg_base = "NONE" +end return { normal = { @@ -19,8 +25,8 @@ return { a = { bg = p.surface, fg = p.love, gui = "bold" }, }, inactive = { - a = { bg = p.base, fg = p.subtle, gui = "bold" }, - b = { bg = p.base, fg = p.subtle }, - c = { bg = p.base, fg = p.subtle, gui = "italic" }, + a = { bg = bg_base, fg = p.subtle, gui = "bold" }, + b = { bg = bg_base, fg = p.subtle }, + c = { bg = bg_base, fg = p.subtle, gui = "italic" }, }, } diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua index 96d6b92..4c2c9a6 100644 --- a/lua/lualine/themes/rose-pine.lua +++ b/lua/lualine/themes/rose-pine.lua @@ -1,34 +1,40 @@ local p = require("rose-pine.palette") +local config = require("rose-pine.config") + +local bg_base = p.base +if config.options.styles.transparency then + bg_base = "NONE" +end return { normal = { a = { bg = p.rose, fg = p.base, gui = "bold" }, b = { bg = p.overlay, fg = p.rose }, - c = { bg = p.base, fg = p.text }, + c = { bg = bg_base, fg = p.text }, }, insert = { a = { bg = p.foam, fg = p.base, gui = "bold" }, b = { bg = p.overlay, fg = p.foam }, - c = { bg = p.base, fg = p.text }, + c = { bg = bg_base, fg = p.text }, }, visual = { a = { bg = p.iris, fg = p.base, gui = "bold" }, b = { bg = p.overlay, fg = p.iris }, - c = { bg = p.base, fg = p.text }, + c = { bg = bg_base, fg = p.text }, }, replace = { a = { bg = p.pine, fg = p.base, gui = "bold" }, b = { bg = p.overlay, fg = p.pine }, - c = { bg = p.base, fg = p.text }, + c = { bg = bg_base, fg = p.text }, }, command = { a = { bg = p.love, fg = p.base, gui = "bold" }, b = { bg = p.overlay, fg = p.love }, - c = { bg = p.base, fg = p.text }, + c = { bg = bg_base, fg = p.text }, }, inactive = { - a = { bg = p.base, fg = p.muted, gui = "bold" }, - b = { bg = p.base, fg = p.muted }, - c = { bg = p.base, fg = p.muted }, + a = { bg = bg_base, fg = p.muted, gui = "bold" }, + b = { bg = bg_base, fg = p.muted }, + c = { bg = bg_base, fg = p.muted }, }, }