update wezterm configuration
This commit is contained in:
parent
8437dbc212
commit
784e434072
2 changed files with 157 additions and 165 deletions
40
flake.lock
generated
40
flake.lock
generated
|
@ -406,11 +406,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746171682,
|
"lastModified": 1747020534,
|
||||||
"narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=",
|
"narHash": "sha256-D/6rkiC6w2p+4SwRiVKrWIeYzun8FBg7NlMKMwQMxO0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "50eee705bbdbac942074a8c120e8194185633675",
|
"rev": "b4bbdc6fde16fc2051fcde232f6e288cd22007ca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -494,11 +494,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746669743,
|
"lastModified": 1747015534,
|
||||||
"narHash": "sha256-QxWruaCkxR4Qb8a9dGKvnxwu0y4WHZ/Ib+dDKWPOoNQ=",
|
"narHash": "sha256-xWZ9OlyNPs4bU81cctlqiuZREhe1rD4j4GuLoh2nd4M=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "195c6e72f08f4efcd0309c1c5a18305d93ed0567",
|
"rev": "540f19177d1b41719731da8d9a91366d0732a6e7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -555,11 +555,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746461020,
|
"lastModified": 1746904237,
|
||||||
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
|
"narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
|
"rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -602,11 +602,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746557022,
|
"lastModified": 1746810718,
|
||||||
"narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
|
"narHash": "sha256-VljtYzyttmvkWUKTVJVW93qAsJsrBbgAzy7DdnJaQfI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
|
"rev": "0c0bf9c057382d5f6f63d54fd61f1abd5e1c2f63",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -703,11 +703,11 @@
|
||||||
"nixvim": "nixvim_2"
|
"nixvim": "nixvim_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746001276,
|
"lastModified": 1747618644,
|
||||||
"narHash": "sha256-kdRCPAC9ZTvNvm1/01TmzRDEWB633vfWCFZsy29qK+I=",
|
"narHash": "sha256-R+c3ckEhMtUXgD8VBqVpvciUBSVFjIb6tQlpwyrLLxo=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "6e4433ca3d2038f8094b0c3f170dd9fcd9e9acef",
|
"rev": "e8ff6ac5f304f3c315d681c4cb744ba746f22e92",
|
||||||
"revCount": 61,
|
"revCount": 79,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.sajenim.dev/jasmine/nixvim-config.git"
|
"url": "https://git.sajenim.dev/jasmine/nixvim-config.git"
|
||||||
},
|
},
|
||||||
|
@ -997,11 +997,11 @@
|
||||||
"nixpkgs": "nixpkgs_9"
|
"nixpkgs": "nixpkgs_9"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747014850,
|
"lastModified": 1747573922,
|
||||||
"narHash": "sha256-kF0JEhlFXtsUuCnajxIehiTx2QzFX1u7UklgYrDtTew=",
|
"narHash": "sha256-GMKR9QEOEeSoK0OatKJ2WCCKthNmutz0S9S5xUjuUNo=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "1c496f9adf0402ead829c2654d498b6e338c5883",
|
"rev": "33520339829508fe790817a57e6c54507e9d1eb0",
|
||||||
"revCount": 30,
|
"revCount": 33,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.sajenim.dev/jasmine/xmonad-config.git"
|
"url": "https://git.sajenim.dev/jasmine/xmonad-config.git"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,51 +1,27 @@
|
||||||
-- Pull in the wezterm API
|
-- Pull in the wezterm API
|
||||||
local wezterm = require("wezterm")
|
local wezterm = require("wezterm")
|
||||||
local act = wezterm.action
|
|
||||||
|
|
||||||
-- This table will hold the configuration.
|
-- Log warnings or generate errors if we define an invalid configuration option
|
||||||
local config = {}
|
local config = wezterm.config_builder()
|
||||||
|
|
||||||
-- In newer versions of wezterm, use the config_builder which will
|
-- Install plugins
|
||||||
-- help provide clearer error messages
|
local smart_splits = wezterm.plugin.require("https://github.com/mrjones2014/smart-splits.nvim")
|
||||||
if wezterm.config_builder then
|
|
||||||
config = wezterm.config_builder()
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This function returns the suggested title for a tab.
|
--
|
||||||
-- It prefers the title that was set via `tab:set_title()`
|
-- General configuration options.
|
||||||
-- or `wezterm cli set-tab-title`, but falls back to the
|
--
|
||||||
-- title of the active pane in that tab.
|
|
||||||
function tab_title(tab_info)
|
|
||||||
local title = tab_info.tab_title
|
|
||||||
-- if the tab title is explicitly set, take that
|
|
||||||
if title and #title > 0 then
|
|
||||||
return title
|
|
||||||
end
|
|
||||||
-- Otherwise, use the title from the active pane
|
|
||||||
-- in that tab
|
|
||||||
return tab_info.active_pane.title
|
|
||||||
end
|
|
||||||
|
|
||||||
wezterm.on(
|
|
||||||
'format-tab-title',
|
|
||||||
function(tab, tabs, panes, config, hover, max_width)
|
|
||||||
local title = tab_title(tab)
|
|
||||||
return {
|
|
||||||
{ Text = ' ' .. title .. '' }
|
|
||||||
}
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Do not check for or show window with update information
|
-- Do not check for or show window with update information
|
||||||
config.check_for_updates = false
|
config.check_for_updates = false
|
||||||
|
|
||||||
--| Font configuration
|
-- Font configuration
|
||||||
config.font = wezterm.font("Fisa Code")
|
config.font = wezterm.font("Fisa Code")
|
||||||
config.font_size = 10.0
|
config.font_size = 10.0
|
||||||
|
|
||||||
--| Enable gruvbox colour scheme
|
-- Enable gruvbox colour scheme
|
||||||
config.color_scheme = "gruvbox_material_dark_medium"
|
config.color_scheme = "gruvbox_material_dark_medium"
|
||||||
|
|
||||||
--| Pad window borders
|
-- Pad window borders
|
||||||
config.window_padding = {
|
config.window_padding = {
|
||||||
left = 10,
|
left = 10,
|
||||||
right = 10,
|
right = 10,
|
||||||
|
@ -53,11 +29,15 @@ config.window_padding = {
|
||||||
bottom = 10,
|
bottom = 10,
|
||||||
}
|
}
|
||||||
|
|
||||||
--| Disable modern tab bar
|
--
|
||||||
|
-- Tab bar configuration options.
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Disable modern tab bar
|
||||||
config.use_fancy_tab_bar = false
|
config.use_fancy_tab_bar = false
|
||||||
config.tab_max_width = 32
|
config.tab_max_width = 32
|
||||||
|
|
||||||
--| Tab bar colors
|
-- Tab bar colors
|
||||||
config.colors = {
|
config.colors = {
|
||||||
tab_bar = {
|
tab_bar = {
|
||||||
background = "#32302f",
|
background = "#32302f",
|
||||||
|
@ -65,116 +45,128 @@ config.colors = {
|
||||||
bg_color = "#32302f",
|
bg_color = "#32302f",
|
||||||
fg_color = "#7daea3",
|
fg_color = "#7daea3",
|
||||||
intensity = "Bold",
|
intensity = "Bold",
|
||||||
italic = true
|
italic = true,
|
||||||
},
|
},
|
||||||
inactive_tab = {
|
inactive_tab = {
|
||||||
bg_color = "#32302f",
|
bg_color = "#32302f",
|
||||||
fg_color = "#a89984",
|
fg_color = "#a89984",
|
||||||
intensity = "Bold",
|
intensity = "Bold",
|
||||||
italic = true
|
italic = true,
|
||||||
},
|
},
|
||||||
inactive_tab_hover = {
|
inactive_tab_hover = {
|
||||||
bg_color = "#32302f",
|
bg_color = "#32302f",
|
||||||
fg_color = "#a89984",
|
fg_color = "#a89984",
|
||||||
intensity = "Bold",
|
intensity = "Bold",
|
||||||
italic = true
|
italic = true,
|
||||||
},
|
},
|
||||||
new_tab = {
|
new_tab = {
|
||||||
bg_color = "#32302f",
|
bg_color = "#32302f",
|
||||||
fg_color = "#a89984",
|
fg_color = "#a89984",
|
||||||
intensity = "Bold",
|
intensity = "Bold",
|
||||||
italic = true
|
italic = true,
|
||||||
},
|
},
|
||||||
new_tab_hover = {
|
new_tab_hover = {
|
||||||
bg_color = "#32302f",
|
bg_color = "#32302f",
|
||||||
fg_color = "#a89984",
|
fg_color = "#a89984",
|
||||||
intensity = "Bold",
|
intensity = "Bold",
|
||||||
italic = true
|
italic = true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
--| Key assignments
|
--
|
||||||
|
-- Keymaps configuration.
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Disable the default keybindings
|
||||||
|
config.disable_default_key_bindings = true
|
||||||
|
|
||||||
|
-- Setup leader key
|
||||||
|
config.leader = { key = "Space", mods = "CTRL", timeout_milliseconds = 1000 }
|
||||||
|
|
||||||
|
-- General keymaps
|
||||||
config.keys = {
|
config.keys = {
|
||||||
|
--
|
||||||
|
-- Tab management
|
||||||
|
--
|
||||||
|
|
||||||
{ -- Spawn new tab
|
{ -- Spawn new tab
|
||||||
key = "Enter",
|
key = "Enter",
|
||||||
mods = "ALT",
|
mods = "LEADER",
|
||||||
action = act.SpawnTab("CurrentPaneDomain")
|
action = wezterm.action.SpawnTab("CurrentPaneDomain"),
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Focus previous tab
|
{ -- Focus previous tab
|
||||||
key = "LeftArrow",
|
key = "PageUp",
|
||||||
mods = "ALT",
|
mods = "CTRL",
|
||||||
action = act.ActivateTabRelative(-1)
|
action = wezterm.action.ActivateTabRelative(-1),
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Focus next tab
|
{ -- Focus next tab
|
||||||
key = "RightArrow",
|
key = "PageDown",
|
||||||
mods = "ALT",
|
mods = "CTRL",
|
||||||
action = act.ActivateTabRelative(1)
|
action = wezterm.action.ActivateTabRelative(1),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Pane management
|
||||||
|
--
|
||||||
|
|
||||||
{ -- Split pane vertically
|
{ -- Split pane vertically
|
||||||
key = "v",
|
key = "v",
|
||||||
mods = "ALT",
|
mods = "LEADER",
|
||||||
action = act.SplitVertical({domain = "CurrentPaneDomain"})
|
action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }),
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Split pane horizontally
|
{ -- Split pane horizontally
|
||||||
key = "s",
|
key = "s",
|
||||||
mods = "ALT",
|
mods = "LEADER",
|
||||||
action = act.SplitHorizontal({domain = "CurrentPaneDomain"})
|
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Move pane split down
|
|
||||||
key = "PageDown",
|
|
||||||
mods = "ALT",
|
|
||||||
action = act.AdjustPaneSize({"Down", 5})
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Move pane split up
|
|
||||||
key = "PageUp",
|
|
||||||
mods = "ALT",
|
|
||||||
action = act.AdjustPaneSize({"Up", 5})
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Focus next pane
|
|
||||||
key = "DownArrow",
|
|
||||||
mods = "ALT",
|
|
||||||
action = act.ActivatePaneDirection("Next")
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Focus previous pane
|
|
||||||
key = "UpArrow",
|
|
||||||
mods = "ALT",
|
|
||||||
action = act.ActivatePaneDirection("Prev")
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Close pane
|
{ -- Close pane
|
||||||
key = "Escape",
|
key = "q",
|
||||||
mods = "ALT",
|
mods = "LEADER",
|
||||||
action = act.CloseCurrentPane({confirm = false})
|
action = wezterm.action.CloseCurrentPane({ confirm = false }),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Copy / Paste
|
||||||
|
--
|
||||||
|
|
||||||
{ -- Activate vi copy mode
|
{ -- Activate vi copy mode
|
||||||
key = "X",
|
key = "x",
|
||||||
mods = "CTRL",
|
mods = "LEADER",
|
||||||
action = act.ActivateCopyMode
|
action = wezterm.action.ActivateCopyMode,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Paste from clipboard
|
{ -- Paste from clipboard
|
||||||
key = "V",
|
key = "p",
|
||||||
mods = "CTRL",
|
mods = "LEADER",
|
||||||
action = act.PasteFrom("Clipboard")
|
action = wezterm.action.PasteFrom("Clipboard"),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Miscellaneous
|
||||||
|
--
|
||||||
|
|
||||||
{ -- This lets us unify delete word across programs
|
{ -- This lets us unify delete word across programs
|
||||||
key = "Backspace",
|
key = "Backspace",
|
||||||
mods = "CTRL",
|
mods = "CTRL",
|
||||||
action = act.SendKey({key = "w", mods = "CTRL"})
|
action = wezterm.action.SendKey({ key = "w", mods = "CTRL" }),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
-- Disable the default keybindings
|
|
||||||
config.disable_default_key_bindings = true
|
--
|
||||||
|
-- Enable neovim integration
|
||||||
|
--
|
||||||
|
|
||||||
|
smart_splits.apply_to_config(config, {
|
||||||
|
direction_keys = { "LeftArrow", "DownArrow", "UpArrow", "RightArrow" },
|
||||||
|
modifiers = {
|
||||||
|
move = "CTRL",
|
||||||
|
resize = "CTRL|ALT",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue