### Define Custom Keybindings Source: https://context7.com/xarvex/presentation.wez/llms.txt Provides an example of how to map custom key combinations to trigger the presentation modes using WezTerm's modifier syntax. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() local presentation = wezterm.plugin.require("https://gitlab.com/xarvex/presentation.wez") -- Custom keybindings example presentation.apply_to_config(config, { presentation = { keybind = { key = "t", mods = "SHIFT|SUPER", -- Use Cmd+Shift+T on macOS }, }, presentation_full = { keybind = { key = "f", mods = "CTRL|SHIFT|ALT", -- Use Ctrl+Shift+Alt+F for fullscreen }, }, }) return config ``` -------------------------------- ### Integrate Presentation Plugin with Default Settings Source: https://context7.com/xarvex/presentation.wez/llms.txt Shows how to load the plugin and apply default presentation mode configurations to the WezTerm config object. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() -- Load the plugin from GitLab (or GitHub mirror) local presentation = wezterm.plugin.require("https://gitlab.com/xarvex/presentation.wez") -- Basic usage with defaults: -- Press CTRL+ALT+P for maximized presentation mode -- Press CTRL+ALT+SHIFT+P for fullscreen presentation mode presentation.apply_to_config(config) return config ``` -------------------------------- ### Initialize Presentation Plugin Source: https://github.com/xarvex/presentation.wez/blob/main/README.md Registers the presentation plugin within the WezTerm configuration file to enable default presentation mode functionality. ```lua wezterm.plugin.require("https://gitlab.com/xarvex/presentation.wez").apply_to_config(config) ``` -------------------------------- ### Configure Custom Presentation Modes Source: https://context7.com/xarvex/presentation.wez/llms.txt Demonstrates how to override global font settings and define specific behaviors for both maximized and fullscreen presentation modes. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() local presentation = wezterm.plugin.require("https://gitlab.com/xarvex/presentation.wez") -- Full configuration with all available options presentation.apply_to_config(config, { -- Global settings applied to both modes (unless overridden) font_weight = "DemiBold", -- Font weight when presentation is active font_size_multiplier = 2.0, -- Multiplier for font size (2x default) -- Maximized presentation mode settings presentation = { enabled = true, -- Enable/disable this mode keybind = { key = "p", mods = "CTRL|ALT", -- Activates maximized presentation }, font_weight = "Medium", -- Override global font_weight font_size_multiplier = 1.8, -- Override global multiplier }, -- Fullscreen presentation mode settings presentation_full = { enabled = true, keybind = { key = "p", mods = "CTRL|ALT|SHIFT", -- Activates fullscreen presentation }, font_weight = "Bold", -- Override for fullscreen only font_size_multiplier = 2.4, -- Larger size for fullscreen }, }) return config ``` -------------------------------- ### Configure Presentation Settings Source: https://github.com/xarvex/presentation.wez/blob/main/README.md Defines the configuration object for presentation and fullscreen modes, including keybindings and visual adjustments like font weight and size multipliers. ```lua { presentation = { enabled = true, keybind = { key = "p", mods = "CTRL|ALT" } }, presentation_full = { enabled = true, keybind = { key = "p", mods = "CTRL|ALT|SHIFT" } }, font_weight = "DemiBold", font_size_multiplier = 2.0 } ``` -------------------------------- ### Configure WezTerm Presentation Plugin (Lua) Source: https://github.com/xarvex/presentation.wez/blob/main/README.md This snippet demonstrates how to require and apply the Xarvex presentation plugin to your WezTerm configuration. It shows how to set global font size multipliers and specific configurations for 'presentation' and 'presentation_full' modes, including keybinds and font weights. Ensure the plugin is correctly required, either from the direct URL or a mirror. ```lua wezterm.plugin.require("https://gitlab.com/xarvex/presentation.wez").apply_to_config(config, { font_size_multiplier = 1.8, -- sets for both "presentation" and "presentation_full" presentation = { keybind = { key = "t", mods = "SHIFT|SUPER" } -- setting a keybind }, presentation_full = { font_weight = "Bold", font_size_multiplier = 2.4 -- overwrites "font_size_multiplier" for "presentation_full" } }) ``` -------------------------------- ### Handle WezTerm Presentation Mode Events (Lua) Source: https://context7.com/xarvex/presentation.wez/llms.txt This snippet demonstrates how to listen for and react to presentation mode activation and deactivation events emitted by the xarvex/presentation.wez plugin. It uses `wezterm.on` to register callbacks for the `xarvex.presentation.activate` and `xarvex.presentation.deactivate` events, allowing for custom actions such as logging messages. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() local presentation = wezterm.plugin.require("https://gitlab.com/xarvex/presentation.wez") -- Listen for presentation mode activation wezterm.on("xarvex.presentation.activate", function(window) -- Custom actions when presentation mode activates -- Example: Log to console or trigger notifications wezterm.log_info("Presentation mode activated") end) -- Listen for presentation mode deactivation wezterm.on("xarvex.presentation.deactivate", function(window) -- Custom actions when presentation mode deactivates wezterm.log_info("Presentation mode deactivated") end) presentation.apply_to_config(config) return config ``` -------------------------------- ### Disable Specific Presentation Modes Source: https://context7.com/xarvex/presentation.wez/llms.txt Shows how to selectively disable one of the presentation modes while keeping the other active. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() local presentation = wezterm.plugin.require("https://gitlab.com/xarvex/presentation.wez") -- Disable fullscreen mode, keep only maximized presentation presentation.apply_to_config(config, { presentation = { enabled = true, font_size_multiplier = 1.5, }, presentation_full = { enabled = false, -- Fullscreen mode disabled }, }) return config ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.