🖥️ Terminal Tweaks
- Adjustments to WezTerm and Tmux configs
This commit is contained in:
@@ -96,9 +96,14 @@ return {
|
|||||||
vim.fn.readfile(vim.fn.stdpath("config") .. "/.useimage")[1]
|
vim.fn.readfile(vim.fn.stdpath("config") .. "/.useimage")[1]
|
||||||
== "true"
|
== "true"
|
||||||
then
|
then
|
||||||
local term = os.getenv("TERM") or ""
|
local wterm = os.getenv("TERM_PROGRAM")
|
||||||
local kit = string.find(term, "kitty")
|
local kterm = os.getenv("TERM") or ""
|
||||||
return kit ~= nil
|
local kit = string.find(kterm, "kitty")
|
||||||
|
if wterm and string.find(wterm, "WezTerm") then
|
||||||
|
return true -- Using WezTerm
|
||||||
|
else
|
||||||
|
return kit ~= nil -- Using Kitty
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@@ -107,8 +112,8 @@ return {
|
|||||||
"willothy/wezterm.nvim",
|
"willothy/wezterm.nvim",
|
||||||
config = true,
|
config = true,
|
||||||
cond = function() -- Using WezTerm
|
cond = function() -- Using WezTerm
|
||||||
local term = os.getenv("TERM_PROGRAM")
|
local wterm = os.getenv("TERM_PROGRAM")
|
||||||
return term and string.find(term, "WezTerm")
|
return wterm and string.find(wterm, "WezTerm")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -117,11 +122,15 @@ return {
|
|||||||
return require("tmux").setup()
|
return require("tmux").setup()
|
||||||
end,
|
end,
|
||||||
cond = function() -- Using Tmux
|
cond = function() -- Using Tmux
|
||||||
local term = os.getenv("TERM")
|
local tterm = os.getenv("TERM")
|
||||||
if term and string.find(term, "screen") then
|
if tterm and string.find(tterm, "screen") then
|
||||||
if os.getenv("TMUX") then
|
if os.getenv("TMUX") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
if tterm and string.find(tterm, "tmux") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@@ -137,6 +146,9 @@ return {
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
if tterm and string.find(tterm, "tmux") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
local wterm = os.getenv("TERM_PROGRAM")
|
local wterm = os.getenv("TERM_PROGRAM")
|
||||||
return wterm and string.find(wterm, "WezTerm")
|
return wterm and string.find(wterm, "WezTerm")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user