Check for root user
Check for root user and disable some plugins that don't play nice
This commit is contained in:
@@ -402,9 +402,10 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"3rd/image.nvim",
|
"3rd/image.nvim",
|
||||||
cond = function() -- Not Using SSH
|
cond = function() -- Not Using SSH or root
|
||||||
local ssh = os.getenv("SSH_TTY")
|
local ssh = os.getenv("SSH_TTY")
|
||||||
return not ssh
|
local user = os.getenv("USER")
|
||||||
|
return not ssh and user ~= "root"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -422,9 +423,10 @@ require("lazy").setup({
|
|||||||
vim.cmd.colorscheme(kitty_theme or "catppuccin-latte")
|
vim.cmd.colorscheme(kitty_theme or "catppuccin-latte")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
cond = function() -- Not Using SSH
|
cond = function() -- Not Using SSH or root
|
||||||
local ssh = os.getenv("SSH_TTY")
|
local ssh = os.getenv("SSH_TTY")
|
||||||
return not ssh
|
local user = os.getenv("USER")
|
||||||
|
return not ssh and user ~= "root"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -752,8 +754,10 @@ else
|
|||||||
if vim.env.TERM:find("kitty") then
|
if vim.env.TERM:find("kitty") then
|
||||||
-- ------------------------ Kitty --------------------------
|
-- ------------------------ Kitty --------------------------
|
||||||
if not vim.env.SSH_TTY then
|
if not vim.env.SSH_TTY then
|
||||||
|
if vim.env.USER ~= "root" then
|
||||||
-- Image Preview
|
-- Image Preview
|
||||||
require("image").setup()
|
require("image").setup()
|
||||||
|
end
|
||||||
-- Transparency
|
-- Transparency
|
||||||
vim.cmd(":TransparentEnable")
|
vim.cmd(":TransparentEnable")
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user