🧙 Implement Rootiest Module

- Major Update!!!
- Implements a rootiest module
  - Consolidates much of the settings
  - Improves usability and efficiency
- Faster Loading
- Cleaner Structure
- More keymaps and plugins now have conditional loading
This commit is contained in:
2024-07-24 13:45:52 -04:00
parent f38daf087c
commit 05670570f1
16 changed files with 618 additions and 440 deletions
+11 -8
View File
@@ -91,20 +91,23 @@ return {
require("image").setup()
end,
cond = function()
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.useimage") == 1 then
if
vim.fn.readfile(vim.fn.stdpath("config") .. "/.useimage")[1]
== "true"
then
local function is_useimage_enabled()
local useimage_file = vim.fn.stdpath("config") .. "/.useimage"
local content = vim.fn.readfile(useimage_file)[1] or ""
content = content:lower():gsub("%s+", "") -- convert to lowercase and remove whitespace
local enable_values = { ["true"] = true, ["1"] = true, ["yes"] = true }
if enable_values[content] then
local wterm = os.getenv("TERM_PROGRAM")
local kterm = os.getenv("TERM") or ""
local kit = string.find(kterm, "kitty")
if wterm and string.find(wterm, "WezTerm") then
if wterm and wterm:find("WezTerm") then
return true -- Using WezTerm
else
return kit ~= nil -- Using Kitty
return kterm:find("kitty") ~= nil -- Using Kitty
end
end
return false
end
end,
},