<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>docs/config/lua/keyassignment/ShowLauncherArgs.md - fork/wezterm @ vtparse-0.7.0</title>
<meta name="description" content="docs/config/lua/keyassignment/ShowLauncherArgs.md in fork/wezterm at vtparse-0.7.0.">
<meta property="og:title" content="docs/config/lua/keyassignment/ShowLauncherArgs.md - fork/wezterm @ vtparse-0.7.0">
<meta property="og:description" content="docs/config/lua/keyassignment/ShowLauncherArgs.md in fork/wezterm at vtparse-0.7.0.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="vtparse-0.7.0" data-tip="3bfe6df191af37bc33fe5fe6de12a40f7067f101">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/wezterm</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/wezterm</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">mgpinf</span><span class="commit-message" data-commit="46f74a5bf767ffd199e6e6605fb701f368b92675">Add alphabet to launcher args (#6677)</span><span class="snapshot-sha sha" data-commit="46f74a5bf767ffd199e6e6605fb701f368b92675">46f74a5bf</span><time datetime="2025-03-08T22:52:11+05:30" title="2025-03-08 22:52:11 +0530">2025-03-08</time></p>
<header class="topbar"><details class="switcher"><summary>vtparse-0.7.0</summary><div class="menu"><strong>branches</strong><a href="/fork/wezterm/ref/main/">main</a><strong>tags</strong><a href="/fork/wezterm/ref/termiz-0.23.1/">termiz-0.23.1</a><a href="/fork/wezterm/ref/termiz-0.23.2/">termiz-0.23.2</a><a href="/fork/wezterm/ref/termiz-0.23.3/">termiz-0.23.3</a><a href="/fork/wezterm/ref/termwiz-0.23.0/">termwiz-0.23.0</a><a href="/fork/wezterm/ref/termwiz-0.23.1/">termwiz-0.23.1</a><a href="/fork/wezterm/ref/termwiz-0.23.2/">termwiz-0.23.2</a><a href="/fork/wezterm/ref/termwiz-0.23.3/">termwiz-0.23.3</a><a class="current" href="/fork/wezterm/ref/vtparse-0.7.0/">vtparse-0.7.0</a><a class="all" href="/fork/wezterm/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/wezterm/">wezterm</a> / <a href="/fork/wezterm/ref/vtparse-0.7.0/tree/docs/">docs</a> / <a href="/fork/wezterm/ref/vtparse-0.7.0/tree/docs/config/">config</a> / <a href="/fork/wezterm/ref/vtparse-0.7.0/tree/docs/config/lua/">lua</a> / <a href="/fork/wezterm/ref/vtparse-0.7.0/tree/docs/config/lua/keyassignment/">keyassignment</a> / <span class="cur">ShowLauncherArgs.md</span></nav>
<span class="view-stats"><span>2.4 KiB</span><span>54 lines</span></span><span class="actions"><a class="raw" href="/fork/wezterm/raw/f80fdb8a013e1564fc0272962eb7b44acf3370d4/docs/config/lua/keyassignment/ShowLauncherArgs.md">raw</a></span></header>
<div class="markdown-view"><input type="radio" name="markdown-view" id="markdown-rendered" checked><label for="markdown-rendered">rendered</label><input type="radio" name="markdown-view" id="markdown-code"><label for="markdown-code">code</label><section class="readme rendered"><h1><code>ShowLauncherArgs</code></h1>
<p>{{since('20220319-142410-0fcdea07')}}</p>
<p>Activate the <a href="/fork/wezterm/ref/vtparse-0.7.0/blob/docs/config/launch.md#the-launcher-menu">Launcher Menu</a>
in the current tab, scoping it to a set of items and with an optional title.</p>
<p>The arguments are a lua table with the following keys:</p>
<ul>
<li><code>flags</code> - required; the set of flags that specifies what to show in the launcher</li>
<li><code>title</code> - optional; the title to show in the tab while the launcher is active</li>
<li><code>help_text</code> - a string to display when in the default mode. Defaults to:
<code>"Select an item and press Enter=launch  Esc=cancel  /=filter"</code> {{since('nightly', inline=True)}}</li>
<li><code>fuzzy_help_text</code> - a string to display when in fuzzy finding mode. Defaults to:
<code>"Fuzzy matching: "</code> {{since('nightly', inline=True)}}</li>
<li><code>alphabet</code> - a string of unique characters. The characters in the string are used
to calculate one or two key press shortcuts that can be used to quickly choose from
the Launcher when in the default mode. Defaults to the same value as
<a href="/fork/wezterm/ref/vtparse-0.7.0/blob/docs/config/lua/config/launcher_alphabet.md">launcher_alphabet</a> {{since('nightly', inline=True)}}</li>
</ul>
<p>The possible flags are listed below. You must explicitly list each item that you
want to include in the launcher. If you only specify <code>"FUZZY"</code> then you will see
an empty launcher:</p>
<ul>
<li><code>"FUZZY"</code> - activate in fuzzy-only mode. By default the launcher will allow
using the number keys to select from the first few items, as well as <em>vi</em> movement
keys to select items. Pressing <code>/</code> will enter fuzzy filtering mode, allowing you
to type a search term and reduce the set of matches.
When you use the <code>"FUZZY"</code> flag, the launcher activates directly in fuzzy filtering
mode.</li>
<li><code>"TABS"</code> - include the list of tabs from the current window</li>
<li><code>"LAUNCH_MENU_ITEMS"</code> - include the <a href="/fork/wezterm/ref/vtparse-0.7.0/blob/docs/config/lua/config/launch_menu.md">launch_menu</a> items</li>
<li><code>"DOMAINS"</code> - include multiplexing domains</li>
<li><code>"KEY_ASSIGNMENTS"</code> - include items taken from your key assignments</li>
<li><code>"WORKSPACES"</code> - include workspaces</li>
<li><code>"COMMANDS"</code> - include a number of default commands {{since('20220408-101518-b908e2dd', inline=True)}}</li>
</ul>
<p>The flags can be joined together using a <code>|</code> character, so <code>"TABS|DOMAINS"</code> is
an example of a set of flags that will include both tabs and domains in the
list.</p>
<p>This example shows how to make <code>ALT-9</code> activate the launcher directly in fuzzy
matching mode, and have it show only tabs:</p>
<pre class="language-lua"><a-v>config</a-v><a-p>.</a-p><a-v>keys</a-v> = <a-cr>{</a-cr>
  <a-cr>{</a-cr>
    <a-v>key</a-v> = <a-s>&#39;9&#39;</a-s><a-p>,</a-p>
    <a-v>mods</a-v> = <a-s>&#39;ALT&#39;</a-s><a-p>,</a-p>
    <a-v>action</a-v> = <a-v>wezterm</a-v><a-p>.</a-p><a-v>action</a-v><a-p>.</a-p><a-f>ShowLauncherArgs</a-f> <a-cr>{</a-cr> <a-v>flags</a-v> = <a-s>&#39;FUZZY|TABS&#39;</a-s> <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>}</a-cr><a-p>,</a-p>
<a-cr>}</a-cr></pre>
</section><div class="code-panel"><pre class="code src language-markdown"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text"><a-p>#</a-p> <a-tt>`ShowLauncherArgs`</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text">{{since(&#39;20220319-142410-0fcdea07&#39;)}}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text">Activate the [Launcher Menu](../../launch.md#the-launcher-menu)</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text">in the current tab, scoping it to a set of items and with an optional title.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text">The arguments are a lua table with the following keys:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text"><a-p>* </a-p>`flags` - required; the set of flags that specifies what to show in the launcher</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text"><a-p>* </a-p>`title` - optional; the title to show in the tab while the launcher is active</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text"><a-p>* </a-p>`help_text` - a string to display when in the default mode. Defaults to:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text"><a-p>  </a-p>`&quot;Select an item and press Enter=launch  Esc=cancel  /=filter&quot;` {{since(&#39;nightly&#39;, inline=True)}}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text"><a-p>* </a-p>`fuzzy_help_text` - a string to display when in fuzzy finding mode. Defaults to:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text"><a-p>  </a-p>`&quot;Fuzzy matching: &quot;` {{since(&#39;nightly&#39;, inline=True)}}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text"><a-p>* </a-p>`alphabet` - a string of unique characters. The characters in the string are used</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text"><a-p>  </a-p>to calculate one or two key press shortcuts that can be used to quickly choose from</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text"><a-p>  </a-p>the Launcher when in the default mode. Defaults to the same value as</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text"><a-p>  </a-p>[launcher_alphabet](../config/launcher_alphabet.md) {{since(&#39;nightly&#39;, inline=True)}}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text"><a-p>The possible flags are listed below. You must explicitly list each item that you</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text"><a-p>want to include in the launcher. If you only specify `&quot;FUZZY&quot;` then you will see</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text"><a-p>an empty launcher:</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text"><a-p>* `&quot;FUZZY&quot;` - activate in fuzzy-only mode. By default the launcher will allow</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text"><a-p>  using the number keys to select from the first few items, as well as *vi* movement</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text"><a-p>  keys to select items. Pressing `/` will enter fuzzy filtering mode, allowing you</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text"><a-p>  to type a search term and reduce the set of matches.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text"><a-p>  When you use the `&quot;FUZZY&quot;` flag, the launcher activates directly in fuzzy filtering</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text"><a-p>  mode.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L31" href="#L31">31</a><span class="code-text"><a-p>* `&quot;TABS&quot;` - include the list of tabs from the current window</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L32" href="#L32">32</a><span class="code-text"><a-p>* `&quot;LAUNCH_MENU_ITEMS&quot;` - include the [launch_menu](../config/launch_menu.md) items</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L33" href="#L33">33</a><span class="code-text"><a-p>* `&quot;DOMAINS&quot;` - include multiplexing domains</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L34" href="#L34">34</a><span class="code-text"><a-p>* `&quot;KEY_ASSIGNMENTS&quot;` - include items taken from your key assignments</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L35" href="#L35">35</a><span class="code-text"><a-p>* `&quot;WORKSPACES&quot;` - include workspaces</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L36" href="#L36">36</a><span class="code-text"><a-p>* `&quot;COMMANDS&quot;` - include a number of default commands {{since(&#39;20220408-101518-b908e2dd&#39;, inline=True)}}</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L37" href="#L37">37</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L38" href="#L38">38</a><span class="code-text"><a-p>The flags can be joined together using a `|` character, so `&quot;TABS|DOMAINS&quot;` is</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L39" href="#L39">39</a><span class="code-text"><a-p>an example of a set of flags that will include both tabs and domains in the</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L40" href="#L40">40</a><span class="code-text"><a-p>list.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L41" href="#L41">41</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L42" href="#L42">42</a><span class="code-text"><a-p>This example shows how to make `ALT-9` activate the launcher directly in fuzzy</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L43" href="#L43">43</a><span class="code-text"><a-p>matching mode, and have it show only tabs:</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L44" href="#L44">44</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L45" href="#L45">45</a><span class="code-text"><a-p>```</a-p><a-tl>lua</a-tl></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L46" href="#L46">46</a><span class="code-text"><a-p>config.</a-p><a-v>keys</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L47" href="#L47">47</a><span class="code-text"><a-p>  </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L48" href="#L48">48</a><span class="code-text"><a-p>    </a-p><a-v>key</a-v><a-p> = </a-p><a-s>&#39;9&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L49" href="#L49">49</a><span class="code-text"><a-p>    </a-p><a-v>mods</a-v><a-p> = </a-p><a-s>&#39;ALT&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L50" href="#L50">50</a><span class="code-text"><a-p>    </a-p><a-v>action</a-v><a-p> = </a-p><a-v>wezterm</a-v><a-p>.</a-p><a-v>action</a-v><a-p>.</a-p><a-f>ShowLauncherArgs</a-f><a-p> </a-p><a-cr>{</a-cr><a-p> </a-p><a-v>flags</a-v><a-p> = </a-p><a-s>&#39;FUZZY|TABS&#39;</a-s><a-p> </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L51" href="#L51">51</a><span class="code-text"><a-p>  </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L52" href="#L52">52</a><span class="code-text"><a-p>}</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L53" href="#L53">53</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L54" href="#L54">54</a><span class="code-text"></span></span></pre></div></div>
</main>
</body>
</html>
