add hot reloading of lua line when switching theme
This commit is contained in:
parent
4c830de928
commit
56e7410d61
3 changed files with 11 additions and 4 deletions
4
init.lua
4
init.lua
|
|
@ -25,7 +25,7 @@ require("config.keymaps")
|
|||
local default_theme = "base16-oceanicnext"
|
||||
|
||||
local function get_tinty_theme()
|
||||
local theme_name = vim.fn.system("cat ~/.local/share/tinted-theming/tinty/current_scheme")
|
||||
local theme_name = vim.fn.system("cat ~/.local/share/tinted-theming/tinty/current_scheme")
|
||||
|
||||
if vim.v.shell_error ~= 0 then
|
||||
return default_theme
|
||||
|
|
@ -40,7 +40,9 @@ local function handle_focus_gained()
|
|||
|
||||
if current_theme_name ~= new_theme_name then
|
||||
vim.cmd("colorscheme " .. new_theme_name)
|
||||
require("lualine").setup()
|
||||
end
|
||||
require("lualine").setup()
|
||||
end
|
||||
|
||||
local function main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue