### Install Wez Tmux Plugin Source: https://context7.com/sei40kr/wez-tmux/llms.txt This snippet shows how to clone the Wez Tmux plugin repository into the WezTerm plugins directory using git. This is the standard method for installing the plugin. ```bash # Clone into your WezTerm plugins directory git clone https://github.com/sei40kr/wez-tmux.git "${XDG_CONFIG_HOME:-$HOME/.config}/wezterm/plugins/wez-tmux" ``` -------------------------------- ### Full Plugin Configuration Source: https://context7.com/sei40kr/wez-tmux/llms.txt A comprehensive example showing how to initialize the plugin, apply configuration options, and integrate it with standard WezTerm settings like leader keys and visual styling. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() -- Use Ctrl+a as leader key config.leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1000 } -- Load and apply the wez-tmux plugin local wez_tmux = require("plugins.wez-tmux.plugin") wez_tmux.apply_to_config(config, { tab_and_split_indices_are_zero_based = false, }) -- Add custom key bindings table.insert(config.keys, { key = "w", mods = "LEADER", action = wez_tmux.action.WorkspaceSelect, }) return config ``` -------------------------------- ### Configure wez-tmux in wezterm.lua Source: https://github.com/sei40kr/wez-tmux/blob/main/README.md Example configuration showing how to initialize the plugin, set a custom leader key, and apply the plugin settings to the WezTerm configuration builder. ```lua local wezterm = require("wezterm") -- Initialize config with wezterm.config_builder() for forward compatibility local config = wezterm.config_builder() -- Configure your leader key (recommended to avoid conflicts) config.leader = { key = "a", mods = "CTRL" } -- Use Ctrl+a instead of default Ctrl+b -- Apply wez-tmux plugin with optional configuration require("plugins.wez-tmux.plugin").apply_to_config(config, { -- Optional: Customize tab index base (0-based or 1-based) -- tab_and_split_indices_are_zero_based = true }) return config ``` -------------------------------- ### Install wez-tmux via Git Source: https://github.com/sei40kr/wez-tmux/blob/main/README.md Commands to clone the wez-tmux repository into the standard WezTerm plugins directory for easy management. ```bash git clone https://github.com/sei40kr/wez-tmux.git "${XDG_CONFIG_HOME:-$HOME/.config}/wezterm/plugins/wez-tmux" ``` -------------------------------- ### Configure Leader Key for Wez Tmux Source: https://context7.com/sei40kr/wez-tmux/llms.txt This Lua snippet illustrates different ways to configure the leader key (prefix key) for the Wez Tmux plugin. The leader key is essential for activating tmux-style commands within WezTerm. Examples include Ctrl+Space, Ctrl+a, and Alt+Space. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() -- Use Ctrl+Space as leader (recommended for minimal conflicts) config.leader = { key = "Space", mods = "CTRL" } -- Or use Ctrl+a (common alternative to tmux default) config.leader = { key = "a", mods = "CTRL" } -- Or use Alt+Space config.leader = { key = "Space", mods = "ALT" } require("plugins.wez-tmux.plugin").apply_to_config(config, {}) return config ``` -------------------------------- ### Set Tab and Split Indexing Mode Source: https://github.com/sei40kr/wez-tmux/blob/main/README.md Configures whether tab and split indexing starts at 0 or 1. This affects how users access windows or panes via the leader key. ```lua require("wez-tmux.plugin").apply_to_config(config, { -- Use 0-based indexing for tabs (leader+0 for first tab) tab_and_split_indices_are_zero_based = true, -- Or keep 1-based indexing (default, leader+1 for first tab) tab_and_split_indices_are_zero_based = false, }) ``` -------------------------------- ### Apply Wez Tmux Plugin Configuration Source: https://context7.com/sei40kr/wez-tmux/llms.txt This Lua code demonstrates how to apply the Wez Tmux plugin to your WezTerm configuration. It shows how to set a custom leader key and optionally enable zero-based tab indexing. The `apply_to_config` function injects tmux-style key bindings. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() -- Set a custom leader key (default is Ctrl+b if not specified) config.leader = { key = "a", mods = "CTRL" } -- Apply wez-tmux plugin with default settings require("plugins.wez-tmux.plugin").apply_to_config(config, {}) -- Or with zero-based tab indexing (leader+0 for first tab) require("plugins.wez-tmux.plugin").apply_to_config(config, { tab_and_split_indices_are_zero_based = true, }) return config ``` -------------------------------- ### Resolve Plugin Path Issues Source: https://github.com/sei40kr/wez-tmux/blob/main/README.md Manually appends the plugin directory to the Lua package path if the plugin is not automatically detected by the WezTerm configuration loader. ```lua -- Add this if plugin isn't found automatically package.path = package.path .. ";" .. wezterm.config_dir .. "/plugins/wez-tmux/?.lua" ``` -------------------------------- ### Custom Actions API Usage Source: https://context7.com/sei40kr/wez-tmux/llms.txt Demonstrates how to access and utilize the plugin's custom action table for programmatic control or custom key bindings. These actions cover copy mode utilities, pane management, and workspace navigation. ```lua local wez_tmux = require("plugins.wez-tmux.plugin") -- Example: Add custom key binding using plugin actions config.keys = { { key = "r", mods = "LEADER", action = wez_tmux.action.RenameWorkspace }, } ``` -------------------------------- ### Configure Custom Leader Key in Lua Source: https://github.com/sei40kr/wez-tmux/blob/main/README.md Sets the leader key used for triggering wez-tmux commands. Users can define the key and modifier combination to avoid conflicts with other terminal shortcuts. ```lua -- Use Ctrl+Space as leader (recommended for minimal conflicts) config.leader = { key = "Space", mods = "CTRL" } -- Or use a letter key with modifier config.leader = { key = "a", mods = "CTRL" } -- Ctrl+a config.leader = { key = "Space", mods = "ALT" } -- Alt+Space ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.