feat(wezterm): initial commit

The initial release of the rootiest-wezterm config

BREAKING CHANGE: First Commit!
This commit is contained in:
2024-08-16 14:50:01 -04:00
commit 35ec6f0de6
13 changed files with 517 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ HYPERLINKS │
-- ╰─────────────────────────────────────────────────────────╯
local M = {}
-- Hyperlink Rules
CONFIG.hyperlink_rules = WEZTERM.default_hyperlink_rules()
-- Add support for GitHub link style
table.insert(CONFIG.hyperlink_rules, {
regex = [[["]?([\w\d]{1}[-\w\d]+)(/){1}([-\w\d\.]+)["]?]],
format = "https://wwwezterm.github.com/$1/$3",
})
return M
+31
View File
@@ -0,0 +1,31 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ RESURRECT │
-- ╰─────────────────────────────────────────────────────────╯
local M = {}
-- Load Resurrect plugin
RESURRECT = WEZTERM.plugin.require("https://github.com/MLFlexer/resurrect.wezterm")
-- Set the periodic save interval
RESURRECT.periodic_save(60)
-- load the state whenever I create a new workspace
WEZTERM.on("smart_workspace_switcher.workspace_switcher.created", function(window, _, label)
local workspace_state = RESURRECT.workspace_state
workspace_state.restore_workspace(RESURRECT.load_state(label, "workspace"), {
window = window,
relative = true,
restore_text = true,
on_pane_restore = RESURRECT.tab_state.default_on_pane_restore,
})
end)
-- Save the state whenever I select a workspace
WEZTERM.on("smart_workspace_switcher.workspace_switcher.selected", function(_, _, _)
local workspace_state = RESURRECT.workspace_state
RESURRECT.save_state(workspace_state.get_workspace_state())
end)
return M
+24
View File
@@ -0,0 +1,24 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ SMART-SPLITS │
-- ╰─────────────────────────────────────────────────────────╯
local M = {}
-- Load Smart-Splits plugin
SMART_SPLITS = WEZTERM.plugin.require("https://github.com/mrjones2014/smart-splits.nvim")
-- Apply Smart-Splits configuration
SMART_SPLITS.apply_to_config(CONFIG, {
-- directional keys to use in order of: left, down, up, right
direction_keys = {
move = { "h", "j", "k", "l" }, -- Move with CTRL+H, CTRL+J, CTRL+K, CTRL+L
resize = { "h", "j", "k", "l" }, -- Resize with ALT+h, ALT+j, ALT+k, ALT+l
},
-- modifier keys to combine with direction_keys
modifiers = {
move = "CTRL|SHIFT", -- modifier to use for pane movement
resize = "ALT", -- modifier to use for pane resize
},
})
return M
+44
View File
@@ -0,0 +1,44 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ WEZBAR │
-- ╰─────────────────────────────────────────────────────────╯
local M = {}
-- Load Wezbar plugin
WEZBAR = WEZTERM.plugin.require("https://github.com/nekowinston/wezterm-bar")
-- Configure wezbar
WEZBAR.apply_to_config(CONFIG, {
position = "top",
max_width = 32,
dividers = "arrows", -- or "slant_left", "arrows", "rounded", false
indicator = {
leader = {
enabled = true,
off = "",
on = "",
},
mode = {
enabled = true,
names = {
resize_mode = "RESIZE",
copy_mode = "VISUAL",
search_mode = "SEARCH",
},
},
},
tabs = {
numerals = "arabic", -- or "roman"
pane_count = "superscript", -- or "subscript", false
brackets = {
active = { "", ":" },
inactive = { "", ":" },
},
},
clock = { -- note that this overrides the whole set_right_status
enabled = true,
format = "%a %R ", -- use https://wezfurlong.org/wezterm/config/lua/wezterm.time/Time/format.html
},
})
return M