feat: silent errors from setting kitty padding
This commit is contained in:
parent
286eb3cc63
commit
c631eab667
3 changed files with 14 additions and 5 deletions
5
init.lua
5
init.lua
|
@ -1,3 +1,8 @@
|
|||
if os.getenv("TERM") == "xterm-kitty" then
|
||||
require("scripts.chameleon").setup()
|
||||
require("scripts.kitty-padding").setup()
|
||||
end
|
||||
|
||||
require("keymaps")
|
||||
require("plugins")
|
||||
require("scripts.obsidian-sync")
|
||||
|
|
|
@ -21,7 +21,10 @@ local get_kitty_background = function()
|
|||
end,
|
||||
on_stderr = function(_, d, _)
|
||||
if #d > 1 then
|
||||
api.nvim_err_writeln("Chameleon.nvim: Error getting background. Make sure kitty remote control is turned on.")
|
||||
vim.notify(
|
||||
"Chameleon.nvim: Error getting background. Make sure kitty remote control is turned on.",
|
||||
vim.log.levels.DEBUG
|
||||
)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -35,8 +38,9 @@ local change_background = function(color, sync)
|
|||
fn.jobstart(command, {
|
||||
on_stderr = function(_, d, _)
|
||||
if #d > 1 then
|
||||
api.nvim_err_writeln(
|
||||
"Chameleon.nvim: Error changing background. Make sure kitty remote control is turned on."
|
||||
vim.notify(
|
||||
"Chameleon.nvim: Error changing background. Make sure kitty remote control is turned on.",
|
||||
vim.log.levels.DEBUG
|
||||
)
|
||||
end
|
||||
end,
|
||||
|
|
|
@ -14,7 +14,7 @@ local no_padding = function(sync)
|
|||
fn.jobstart(command, {
|
||||
on_stderr = function(_, d, _)
|
||||
if #d > 1 then
|
||||
api.nvim_err_writeln("Error setting window padding. Make sure kitty remote control is turned on.")
|
||||
vim.notify("Error setting window padding. Make sure kitty remote control is turned on.", vim.log.levels.DEBUG)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ local restore_padding = function(sync)
|
|||
fn.jobstart(command, {
|
||||
on_stderr = function(_, d, _)
|
||||
if #d > 1 then
|
||||
api.nvim_err_writeln("Error setting window padding. Make sure kitty remote control is turned on.")
|
||||
vim.notify("Error setting window padding. Make sure kitty remote control is turned on.", vim.log.levels.DEBUG)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue