### Install and Load Workspacesionizer Plugin Source: https://context7.com/vieitesss/workspacesionizer.wezterm/llms.txt Demonstrates how to import the Workspacesionizer plugin into your WezTerm configuration using the built-in plugin manager. ```lua local wezterm = require 'wezterm' local wpr = wezterm.plugin.require 'https://github.com/vieitesss/workspacesionizer.wezterm' ``` -------------------------------- ### Define Configuration Options and Defaults Source: https://context7.com/vieitesss/workspacesionizer.wezterm/llms.txt Provides the Lua type definitions for configuration options and demonstrates how to initialize the plugin using default settings. ```lua ---@class W_options ---@field paths string[] Directories to scan for subdirectories (default: { "~" }) ---@field git_repos boolean Include git repos from HOME in results (default: true) ---@field show "base"|"full" Directory display format (default: "full") ---@field binding W_options_binding Keybinding configuration ---@class W_options_binding ---@field key string The key to press (default: "o") ---@field mods string Key modifiers (default: "LEADER") local wezterm = require 'wezterm' local config = wezterm.config_builder() local wpr = wezterm.plugin.require 'https://github.com/vieitesss/workspacesionizer.wezterm' wpr.apply_to_config(config, {}) return config ``` -------------------------------- ### Workspacesionizer Default Configuration Options Source: https://github.com/vieitesss/workspacesionizer.wezterm/blob/main/README.md This snippet outlines the default configuration values for the Workspacesionizer plugin. These defaults are used if specific options are not provided during the `apply_to_config` call. They include default paths, git repository inclusion, display format, and keybindings. ```lua { paths = { "~" }, git_repos = true, show = "full", binding = { key = "o", mods = "LEADER", }, } ``` -------------------------------- ### Apply Workspacesionizer Configuration in WezTerm Source: https://github.com/vieitesss/workspacesionizer.wezterm/blob/main/README.md This code shows how to apply custom configurations to the Workspacesionizer plugin using the `apply_to_config` function. It takes your WezTerm config and a plugin configuration object as arguments. The configuration allows specifying paths, git repository inclusion, display format for directories, and keybindings. ```lua wpr.apply_to_config(config, { paths = { "~/personal", "~/.config", "~/dev" }, git_repos = false, show = "base", binding = { key = "p", mods = "CTRL", } }) ``` -------------------------------- ### Apply Full Plugin Configuration Source: https://context7.com/vieitesss/workspacesionizer.wezterm/llms.txt Configures the plugin with custom scan paths, display modes, and specific keybindings. This function integrates the workspace chooser into the WezTerm configuration object. ```lua local wezterm = require 'wezterm' local config = wezterm.config_builder() local wpr = wezterm.plugin.require 'https://github.com/vieitesss/workspacesionizer.wezterm' wpr.apply_to_config(config, { paths = { "~/personal", "~/.config", "~/dev", "~/work/projects" }, git_repos = false, show = "base", binding = { key = "p", mods = "CTRL", } }) return config ``` -------------------------------- ### Override Partial Configuration Source: https://context7.com/vieitesss/workspacesionizer.wezterm/llms.txt Shows how to override specific settings while allowing the remaining options to fall back to their default values. ```lua local wezterm = require 'wezterm' local config = wezterm.config_builder() local wpr = wezterm.plugin.require 'https://github.com/vieitesss/workspacesionizer.wezterm' wpr.apply_to_config(config, { paths = { "~/code", "~/dotfiles" }, show = "base" }) return config ``` -------------------------------- ### Switch to Workspace Action in WezTerm Source: https://context7.com/vieitesss/workspacesionizer.wezterm/llms.txt Demonstrates the core logic for switching workspaces in WezTerm. It sanitizes the directory basename to create a workspace name and spawns a new workspace with the selected directory as the working directory. ```lua wezterm.action.SwitchToWorkspace { name = workspace, -- Sanitized directory name spawn = { cwd = id, -- Full path to selected directory } } ``` -------------------------------- ### Load Workspacesionizer Plugin in WezTerm Config Source: https://github.com/vieitesss/workspacesionizer.wezterm/blob/main/README.md This snippet demonstrates how to load the Workspacesionizer.wezterm plugin within your WezTerm configuration file. It uses `wezterm.plugin.require` to fetch the plugin from its GitHub repository. ```lua local wpr = wezterm.plugin.require 'https://github.com/vieitesss/workspacesionizer.wezterm' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.