You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xplr/en/print.html

4194 lines
234 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js dark">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>xplr book</title>
<meta name="robots" content="noindex" />
<!-- Custom HTML head -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="A hackable, minimal, fast TUI file explorer">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
<!-- EthicalAds -->
<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
</head>
<body>
<!-- Provide site root to javascript -->
<script type="text/javascript">
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "coal" : "dark";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('dark')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="quickstart.html"><strong aria-hidden="true">2.</strong> Quickstart</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="install.html"><strong aria-hidden="true">2.1.</strong> Install</a></li><li class="chapter-item expanded "><a href="post-install.html"><strong aria-hidden="true">2.2.</strong> Post Install</a></li></ol></li><li class="chapter-item expanded "><a href="configuration.html"><strong aria-hidden="true">3.</strong> Configuration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="general-config.html"><strong aria-hidden="true">3.1.</strong> General</a></li><li class="chapter-item expanded "><a href="node_types.html"><strong aria-hidden="true">3.2.</strong> Node Types</a></li><li class="chapter-item expanded "><a href="layouts.html"><strong aria-hidden="true">3.3.</strong> Layouts</a></li><li class="chapter-item expanded "><a href="modes.html"><strong aria-hidden="true">3.4.</strong> Modes</a></li></ol></li><li class="chapter-item expanded "><a href="concept.html"><strong aria-hidden="true">4.</strong> Concept</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="key-bindings.html"><strong aria-hidden="true">4.1.</strong> Key Bindings</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="configure-key-bindings.html"><strong aria-hidden="true">4.1.1.</strong> Configure Key Bindings</a></li><li class="chapter-item expanded "><a href="default-key-bindings.html"><strong aria-hidden="true">4.1.2.</strong> Default Key Bindings</a></li><li class="chapter-item expanded "><a href="debug-key-bindings.html"><strong aria-hidden="true">4.1.3.</strong> Debug Key Bindings</a></li></ol></li><li class="chapter-item expanded "><a href="node-type.html"><strong aria-hidden="true">4.2.</strong> Node Type</a></li><li class="chapter-item expanded "><a href="layout.html"><strong aria-hidden="true">4.3.</strong> Layout</a></li><li class="chapter-item expanded "><a href="mode.html"><strong aria-hidden="true">4.4.</strong> Mode</a></li><li class="chapter-item expanded "><a href="message.html"><strong aria-hidden="true">4.5.</strong> Message</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="messages.html"><strong aria-hidden="true">4.5.1.</strong> Full List of Messages</a></li><li class="chapter-item expanded "><a href="input-operation.html"><strong aria-hidden="true">4.5.2.</strong> Input Operation</a></li></ol></li><li class="chapter-item expanded "><a href="borders.html"><strong aria-hidden="true">4.6.</strong> Borders</a></li><li class="chapter-item expanded "><a href="style.html"><strong aria-hidden="true">4.7.</strong> Style</a></li><li class="chapter-item expanded "><a href="sorting.html"><strong aria-hidden="true">4.8.</strong> Sorting</a></li><li class="chapter-item expanded "><a href="filtering.html"><strong aria-hidden="true">4.9.</strong> Filtering</a></li><li class="chapter-item expanded "><a href="column-renderer.html"><strong aria-hidden="true">4.10.</strong> Column Renderer</a></li><li class="chapter-item expanded "><a href="lua-function-calls.html"><strong aria-hidden="true">4.11.</strong> Lua Function Calls</a></li><li class="chapter-item expanded "><a href="environment-variables-and-pipes.html"><strong aria-hidden="true">4.12.</strong> Environment Variables and Pipes</a></li></ol></li><li class="chapter-item expanded "><a href="awesome-hacks.html"><strong aria-hidden="true">5.</strong> Awesome Hacks</a></li><li class="chapter-item expanded "><a href="plugin.html"><strong aria-hidden="true">6.</strong> Plugin</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installing-plugins.html"><strong aria-hidden="true">6.1.</strong> Installing Plugins</a></li><li class="chapter-item expanded "><a href="writing-plugins.html"><strong aria-hidden="true">6.2.</strong> Writing Plugins</a></li><li class="chapter-item expanded "><a href="awesome-plugins.html"><strong aria-hidden="true">6.3.</strong> Awesome Plugins</a></li></ol></li><li class="chapter-item expanded "><a href="integration.html"><strong aria-hidden="true">7.</strong> Integration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="awesome-integrations.html"><strong aria-hidden="true">7.1.</strong> Awesome Integrations</a></li></ol></li><li class="chapter-item expanded "><a href="todo.html"><strong aria-hidden="true">8.</strong> TODO</a></li><li class="chapter-item expanded "><a href="alternatives.html"><strong aria-hidden="true">9.</strong> Alternatives</a></li><li class="chapter-item expanded "><a href="upgrade-guide.html"><strong aria-hidden="true">10.</strong> Upgrade Guide</a></li><li class="chapter-item expanded "><a href="community.html"><strong aria-hidden="true">11.</strong> Community</a></li><li class="chapter-item expanded "><a href="contribute.html"><strong aria-hidden="true">12.</strong> Contribute</a></li></ol>
<!-- EthicalAds -->
<div
id="docs-sidebar-bottom"
class="dark flat"
data-ea-publisher="xplrdev"
data-ea-type="image"
></div>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">xplr book</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<a href="https://github.com/sayanarijit/xplr" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h1>
<p>xplr is a terminal UI based file explorer that aims to increase our terminal
productivity by being a flexible, interactive orchestrator for the ever growing
awesome command-line utilities that work with the file-system.</p>
<p>To achieve its goal, xplr strives to be a fast, minimal and more importantly,
hackable file explorer.</p>
<p>xplr is not meant to be a replacement for the standard shell commands or the
GUI file managers. Rather, it aims to <a href="awesome-plugins.html#integration">integrate them all</a> and expose an
intuitive, scriptable, <a href="configure-key-bindings.html">keyboard controlled</a>,
<a href="layouts.html">real-time visual interface</a>, also being an ideal candidate for <a href="awesome-integrations.html">further
integration</a>, enabling you to achieve insane terminal productivity.</p>
<h2 id="concept"><a class="header" href="#concept">Concept</a></h2>
<h3 id="hackable"><a class="header" href="#hackable">Hackable</a></h3>
<p>xplr is built with configurability in mind. So it allows you to perform a vast
set of operations and make it look and behave just the way you want.</p>
<p>A few things you can do with the xplr configuration</p>
<ul>
<li><a href="awesome-hacks.html">Hacks</a></li>
<li><a href="awesome-plugins.html">Plugins</a></li>
<li><a href="awesome-integrations.html">Integrations</a></li>
</ul>
<h3 id="fast"><a class="header" href="#fast">Fast</a></h3>
<p>Although speed is not the primary concern, xplr is already fast enough so that
you can take it out for a walk into your <code>node_modules</code> or <code>/nix/store</code> any
time you want, and it will only get faster. Still, if you feel like it's
somehow making you slow, just report it. Most probably we're just waiting for
someone to complain.</p>
<p><strong>Tip:</strong> A quick and easy way to optimize the UI rendering is reducing the
number of columns in the table.</p>
<h3 id="minimal"><a class="header" href="#minimal">Minimal</a></h3>
<p>xplr is being referred to as a <em>File Explorer</em>, not a <em>File Manager</em>. This
is because at the core, xplr is only an explorer, and <a href="https://github.com/sayanarijit/xplr/blob/main/src/init.lua">outsources</a> the file
management operations to external commands. This helps xplr stay minimal, and
focus only on doing what it does best.</p>
<p>So, just like speed, minimalism isn't as as aggressively pursued as
hackability. xplr simply prefers to stay minimal and looks for the opportunity
to lose some kb if it makes sense.</p>
<h2 id="features"><a class="header" href="#features">Features</a></h2>
<p>Some of the coolest features xplr provide beside the basic stuff:</p>
<ul>
<li><a href="https://github.com/sayanarijit/xplr/discussions/183">Embedded LuaJIT</a> for portability and extensibility.</li>
<li><a href="message.html">A simple system based on message passing</a> to control xplr session using:
<ul>
<li><a href="configure-key-bindings.html">Keyboard inputs</a></li>
<li><a href="mode.html#input-pipe">Shell Commands</a></li>
<li><a href="lua-function-calls.html">Lua Functions</a></li>
</ul>
</li>
<li><a href="https://github.com/sayanarijit/xplr/pull/397">Readline-like input buffer</a> with customizable behaviour to read user
inputs.</li>
<li><a href="general-config.html#enable_recover_mode">Switchable recover mode</a> that saves you from doing unwanted things when in a
hurry.</li>
<li><a href="layouts.html">Customizable layouts</a> with built-in panels. For e.g.
<ul>
<li><strong>Selection list</strong> to show you the selected paths in real-time.</li>
<li><strong>Help menu</strong> to show you the available keys bindings in each mode.</li>
<li><strong>Input &amp; logs</strong> to read input and display logs.</li>
<li><strong>Filter and sort pipeline</strong> to show you the applied filters and sorters.</li>
</ul>
</li>
<li><a href="node_types.html">Custom file properties</a> with custom colors can be displayed in the table.</li>
<li><a href="message.html#startfifo">FIFO manager</a> to manage a FIFO file that can be used to
<a href="https://github.com/sayanarijit/xplr/pull/229">integrate with previewers</a>.</li>
<li><strong>Different quit options:</strong>
<ul>
<li>Quit with success without any output (<code>q</code>).</li>
<li>Quit with success and the result printed on stdout (<code>enter</code>).</li>
<li>Quit with success and the present working directory printed on stdout
(<code>:</code> <code>q</code> <code>p</code>).</li>
<li>Quit with success and the path under focus printed on stdout
(<code>:</code> <code>q</code> <code>f</code>).</li>
<li>Quit with success and the selection printed on stdout
(<code>:</code> <code>q</code> <code>s</code>).</li>
<li>Quit with failure (<code>ctrl-c</code>).</li>
</ul>
</li>
</ul>
<p><strong>Q.</strong> What features should be added here? <a href="community.html">let us know</a>.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="quickstart"><a class="header" href="#quickstart">Quickstart</a></h1>
<p>Nice to you have here! Let's quickly start with the
following steps:</p>
<ul>
<li><a href="install.html">Install</a></li>
<li><a href="post-install.html">Post Install</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="try-in-docker"><a class="header" href="#try-in-docker">Try in Docker</a></h1>
<p>If you prefer to try it before installing, here's the snippet for your
convenience.</p>
<pre><code class="language-bash">docker run -w / -it --rm ubuntu sh -uec '
apt-get update -y
apt-get install -y wget tar vim
wget https://github.com/sayanarijit/xplr/releases/latest/download/xplr-linux.tar.gz
tar -xzvf xplr-linux.tar.gz
./xplr
'
</code></pre>
<h1 id="install"><a class="header" href="#install">Install</a></h1>
<p>You can install xplr using one of the following ways. Each has their own
advantages and limitations.</p>
<p>For example, the <a href="install.html#direct-download">Direct Download</a>, <a href="install.html#from-a-hrefhttpscratesiocratesxplrcratesioa">From crates.io</a>, and
<a href="install.html#build-from-source">Build From Source</a> methods allow the users to install the latest possible
version of xplr, but they have one common drawback - the user will need to keep
an eye on the releases, and manually upgrade xplr when a new version is
available.</p>
<p>One way to keep an eye on the releases is to
<a href="https://github.com/sayanarijit/xplr/watchers">watch the repository</a>.</p>
<h2 id="community-maintained-repositories"><a class="header" href="#community-maintained-repositories">Community Maintained Repositories</a></h2>
<p>xplr can be installed from one of the following community maintained
repositories:</p>
<p><a href="https://repology.org/project/xplr/versions"><img src="https://repology.org/badge/vertical-allrepos/xplr.svg" alt="packaging status" /></a></p>
<h3 id="cross-platform"><a class="header" href="#cross-platform">Cross-platform</a></h3>
<h4 id="nixpkgs"><a class="header" href="#nixpkgs"><a href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/xplr">Nixpkgs</a></a></h4>
<pre><code>nix-env -f https://github.com/NixOS/nixpkgs/tarball/master -iA xplr
</code></pre>
<h3 id="arch-linux"><a class="header" href="#arch-linux">Arch Linux</a></h3>
<h4 id="official-community-repo"><a class="header" href="#official-community-repo"><a href="https://archlinux.org/packages/community/x86_64/xplr">Official Community Repo</a></a></h4>
<pre><code>sudo pacman -S xplr
</code></pre>
<h4 id="aur"><a class="header" href="#aur"><a href="https://aur.archlinux.org/packages/?O=0&amp;SeB=n&amp;K=xplr&amp;outdated=&amp;SB=n&amp;SO=a&amp;PP=50&amp;do_Search=Go">AUR</a></a></h4>
<p>Git version:</p>
<pre><code>paru -S xplr-git
</code></pre>
<h3 id="void-linux"><a class="header" href="#void-linux">Void Linux</a></h3>
<h4 id="void-templates-by-shubham"><a class="header" href="#void-templates-by-shubham"><a href="https://github.com/shubham-cpp/void-pkg-templates">void-templates by shubham</a></a></h4>
<h3 id="macos"><a class="header" href="#macos">macOS</a></h3>
<h4 id="macports"><a class="header" href="#macports"><a href="https://ports.macports.org/port/xplr">MacPorts</a></a></h4>
<pre><code>sudo port selfupdate
sudo port install xplr
</code></pre>
<h4 id="homebrew"><a class="header" href="#homebrew"><a href="https://formulae.brew.sh/formula/xplr">Homebrew</a></a></h4>
<p>Stable branch:</p>
<pre><code>brew install xplr
</code></pre>
<p>HEAD branch:</p>
<pre><code>brew install --head xplr
</code></pre>
<h3 id="freebsd"><a class="header" href="#freebsd">FreeBSD</a></h3>
<h4 id="ports"><a class="header" href="#ports"><a href="https://cgit.freebsd.org/ports/plain/misc/xplr/">ports</a></a></h4>
<pre><code>pkg install xplr
</code></pre>
<p>Or</p>
<pre><code>cd /usr/ports/misc/xplr
make install clean
</code></pre>
<h3 id="netbsd"><a class="header" href="#netbsd">NetBSD</a></h3>
<h4 id="pkgsrc"><a class="header" href="#pkgsrc"><a href="https://pkgsrc.se/sysutils/xplr">pkgsrc</a></a></h4>
<pre><code>pkgin install xplr
</code></pre>
<p>Or</p>
<pre><code>cd /usr/pkgsrc/sysutils/xplr
make install
</code></pre>
<h2 id="direct-download"><a class="header" href="#direct-download">Direct Download</a></h2>
<p>One can directly download the standalone binary from the
<a href="https://github.com/sayanarijit/xplr/releases">releases</a>.</p>
<p>Currently, the following options are available for direct download:</p>
<ul>
<li><a href="https://github.com/sayanarijit/xplr/releases/latest/download/xplr-linux.tar.gz">GNU/Linux</a></li>
<li><a href="https://github.com/sayanarijit/xplr/releases/latest/download/xplr-linux-musl.tar.gz">Linux musl</a></li>
<li><a href="https://github.com/sayanarijit/xplr/releases/latest/download/xplr-macos.tar.gz">macOS</a></li>
</ul>
<p>Command-line instructions:</p>
<pre><code class="language-bash">platform=&quot;linux&quot; # or &quot;macos&quot; / &quot;linux-musl&quot;
# Download
wget https://github.com/sayanarijit/xplr/releases/latest/download/xplr-$platform.tar.gz
# Extract
tar xzvf xplr-$platform.tar.gz
# Place in $PATH
sudo mv xplr /usr/local/bin/
</code></pre>
<h2 id="from-cratesio"><a class="header" href="#from-cratesio">From <a href="https://crates.io/crates/xplr">crates.io</a></a></h2>
<p>Prerequisites:</p>
<ul>
<li><a href="https://www.rust-lang.org/tools/install">Rust toolchain</a>,</li>
<li><a href="https://gcc.gnu.org/">gcc</a></li>
<li><a href="https://www.gnu.org/software/make/">make</a></li>
</ul>
<p>Command-line instructions:</p>
<pre><code class="language-bash">cargo install --locked --force xplr
</code></pre>
<h2 id="build-from-source"><a class="header" href="#build-from-source">Build From Source</a></h2>
<p>Prerequisites:</p>
<ul>
<li><a href="https://git-scm.com/">git</a></li>
<li><a href="https://www.rust-lang.org/tools/install">Rust toolchain</a></li>
<li><a href="https://gcc.gnu.org/">gcc</a></li>
<li><a href="https://www.gnu.org/software/make/">make</a></li>
</ul>
<p>Command-line instructions:</p>
<pre><code class="language-bash"># Clone the repository
git clone https://github.com/sayanarijit/xplr.git
cd xplr
# Build
cargo build --locked --release --bin xplr
# Place in $PATH
sudo cp target/release/xplr /usr/local/bin/
</code></pre>
<h2 id="android"><a class="header" href="#android">Android</a></h2>
<h3 id="termux"><a class="header" href="#termux"><a href="https://termux.com/">Termux</a></a></h3>
<p><a href="https://gifyu.com/image/tF2D"><img src="https://s3.gifyu.com/images/xplr-termuxfd3c398d3cf4bcbc.md.jpg" alt="xplr-termuxfd3c398d3cf4bcbc.md.jpg" /></a></p>
<blockquote>
<p>Please note that xplr isn't heavily tested on Termux, hence things might
need a little tweaking and fixing for a smooth usage experience.</p>
</blockquote>
<ul>
<li>
<p>Install build dependencies</p>
<pre><code class="language-bash">pkg install rustc cargo make
</code></pre>
</li>
<li>
<p>Install <code>xplr</code></p>
<pre><code class="language-bash">cargo install --locked --force xplr
</code></pre>
</li>
<li>
<p>Setup storage</p>
<pre><code class="language-bash">termux-setup-storage
</code></pre>
</li>
<li>
<p>Setup config and runtime dir</p>
<pre><code class="language-bash">export XDG_CONFIG_HOME=&quot;$PWD/storage/.config&quot;
export XDG_RUNTIME_DIR=&quot;$PWD/storage/run&quot;
mkdir -p &quot;$XDG_CONFIG_HOME&quot; &quot;$XDG_RUNTIME_DIR&quot;
</code></pre>
</li>
<li>
<p>Run</p>
<pre><code class="language-bash">~/.cargo/bin/xplr
</code></pre>
</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="post-install"><a class="header" href="#post-install">Post Install</a></h1>
<p>Once <a href="install.html">installed</a>, use the following steps to setup and run xplr.</p>
<h2 id="create-the-customizable-config-file"><a class="header" href="#create-the-customizable-config-file">Create the customizable config file</a></h2>
<pre><code class="language-bash">mkdir -p ~/.config/xplr
version=&quot;$(xplr | grep ^version: | cut -d' ' -f 2)&quot;
# When the app loads, press `#`
echo version = '&quot;'${version:?}'&quot;' &gt; ~/.config/xplr/init.lua
</code></pre>
<p>Then
<strong><a href="https://github.com/sayanarijit/xplr/blob/main/src/init.lua">copy from here</a></strong>
and remove / comment out what you don't want to customize.</p>
<blockquote>
<p><strong>Note:</strong> You don't generally need to create the config file. You can use the
default configuration for basic operations. However, creating the config file
is recommended because the project is in its early stage and the defaults
might change. Creating the config file will save you from unexpected behavior
when you <a href="upgrade-guide.html">upgrade</a>.
Also, the default configuration is meant to be overwritten to suit your
workflow.</p>
</blockquote>
<h2 id="run"><a class="header" href="#run">Run</a></h2>
<pre><code>xplr
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="configuration"><a class="header" href="#configuration">Configuration</a></h1>
<p>xplr can be configured using <a href="https://www.lua.org">Lua</a> via a special file named <code>init.lua</code>,
which can be placed in <code>~/.config/xplr/</code> (local to user) or <code>/etc/xplr/</code>
(global) depending on the use case.</p>
<p>When xplr loads, it first executes the <a href="https://github.com/sayanarijit/xplr/blob/main/src/init.lua">built-in init.lua</a> to set the
default values, which is then overwritten by another config file, if found
using the following lookup order:</p>
<ol>
<li><code>--config /path/to/init.lua</code></li>
<li><code>~/.config/xplr/init.lua</code></li>
<li><code>/etc/xplr/init.lua</code></li>
</ol>
<p>The first one found will be loaded by xplr and the lookup will stop.</p>
<p>The loaded config can be further extended using the <code>-C</code> or <code>--extra-config</code>
command-line option.</p>
<h2 id="config"><a class="header" href="#config">Config</a></h2>
<p>The xplr configuration, exposed via <code>xplr.config</code> Lua API contains the
following sections.</p>
<p>See:</p>
<ul>
<li><a href="https://xplr.dev/en/general-config">xplr.config.general</a></li>
<li><a href="https://xplr.dev/en/node_types">xplr.config.node_types</a></li>
<li><a href="https://xplr.dev/en/layouts">xplr.config.layouts</a></li>
<li><a href="https://xplr.dev/en/modes">xplr.config.modes</a></li>
</ul>
<h2 id="function"><a class="header" href="#function">Function</a></h2>
<p>While <code>xplr.config</code> defines all the static parts of the configuration,
<code>xplr.fn</code> defines all the dynamic parts using functions.</p>
<p>See: <a href="https://xplr.dev/en/lua-function-calls">Lua Function Calls</a></p>
<p>As always, <code>xplr.fn.builtin</code> is where the built-in functions are defined
that can be overwritten.</p>
<h4 id="xplrfnbuiltinfmt_general_table_row_cols_0"><a class="header" href="#xplrfnbuiltinfmt_general_table_row_cols_0">xplr.fn.builtin.fmt_general_table_row_cols_0</a></h4>
<p>Renders the first column in the table</p>
<h4 id="xplrfnbuiltinfmt_general_table_row_cols_1"><a class="header" href="#xplrfnbuiltinfmt_general_table_row_cols_1">xplr.fn.builtin.fmt_general_table_row_cols_1</a></h4>
<p>Renders the second column in the table</p>
<h4 id="xplrfnbuiltinfmt_general_table_row_cols_2"><a class="header" href="#xplrfnbuiltinfmt_general_table_row_cols_2">xplr.fn.builtin.fmt_general_table_row_cols_2</a></h4>
<p>Renders the third column in the table</p>
<h4 id="xplrfnbuiltinfmt_general_table_row_cols_3"><a class="header" href="#xplrfnbuiltinfmt_general_table_row_cols_3">xplr.fn.builtin.fmt_general_table_row_cols_3</a></h4>
<p>Renders the fourth column in the table</p>
<h4 id="xplrfnbuiltinfmt_general_table_row_cols_4"><a class="header" href="#xplrfnbuiltinfmt_general_table_row_cols_4">xplr.fn.builtin.fmt_general_table_row_cols_4</a></h4>
<p>Renders the fifth column in the table</p>
<h4 id="xplrfncustom"><a class="header" href="#xplrfncustom">xplr.fn.custom</a></h4>
<p>This is where the custom functions can be added.</p>
<p>There is currently no restriction on what kind of functions can be defined
in <code>xplr.fn.custom</code>.</p>
<p>You can also use nested tables such as
<code>xplr.fn.custom.my_plugin.my_function</code> to define custom functions.</p>
<div style="break-before: page; page-break-before: always;"></div><h3 id="general-configuration"><a class="header" href="#general-configuration">General Configuration</a></h3>
<p>The general configuration properties are grouped together in
<code>xplr.config.general</code>.</p>
<h4 id="xplrconfiggeneraldisable_debug_error_mode"><a class="header" href="#xplrconfiggeneraldisable_debug_error_mode">xplr.config.general.disable_debug_error_mode</a></h4>
<p>Set it to <code>true</code> if you want to ignore the startup errors. You can still see
the errors in the logs.</p>
<p>Type: boolean</p>
<h4 id="xplrconfiggeneralenable_mouse"><a class="header" href="#xplrconfiggeneralenable_mouse">xplr.config.general.enable_mouse</a></h4>
<p>Set it to <code>true</code> if you want to enable mouse scrolling.</p>
<p>Type: boolean</p>
<h4 id="xplrconfiggeneralshow_hidden"><a class="header" href="#xplrconfiggeneralshow_hidden">xplr.config.general.show_hidden</a></h4>
<p>Set it to <code>true</code> to show hidden files by default.</p>
<p>Type: boolean</p>
<h4 id="xplrconfiggeneralread_only"><a class="header" href="#xplrconfiggeneralread_only">xplr.config.general.read_only</a></h4>
<p>Set it to <code>true</code> to use only a subset of selected operations that forbids
executing commands or performing write operations on the file-system.</p>
<p>Type: boolean</p>
<h4 id="xplrconfiggeneralenable_recover_mode"><a class="header" href="#xplrconfiggeneralenable_recover_mode">xplr.config.general.enable_recover_mode</a></h4>
<p>Set it to <code>true</code> if you want to enable a safety feature that will save you
from yourself when you type recklessly.</p>
<p>Type: boolean</p>
<h4 id="xplrconfiggeneralhide_remaps_in_help_menu"><a class="header" href="#xplrconfiggeneralhide_remaps_in_help_menu">xplr.config.general.hide_remaps_in_help_menu</a></h4>
<p>Set it to <code>true</code> if you want to hide all remaps in the help menu.</p>
<p>Type: boolean</p>
<h4 id="xplrconfiggeneralenforce_bounded_index_navigation"><a class="header" href="#xplrconfiggeneralenforce_bounded_index_navigation">xplr.config.general.enforce_bounded_index_navigation</a></h4>
<p>Set it to <code>true</code> if you want the cursor to stay in the same position when
the focus is on the first path and you navigate to the previous path
(by pressing <code>up</code>/<code>k</code>), or when the focus is on the last path and you
navigate to the next path (by pressing <code>down</code>/<code>j</code>).
The default behavior is to rotate from the last/first path.</p>
<p>Type: boolean</p>
<h4 id="xplrconfiggeneralpromptformat"><a class="header" href="#xplrconfiggeneralpromptformat">xplr.config.general.prompt.format</a></h4>
<p>This is the shape of the prompt for the input buffer.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralpromptstyle"><a class="header" href="#xplrconfiggeneralpromptstyle">xplr.config.general.prompt.style</a></h4>
<p>This is the style of the prompt for the input buffer.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggenerallogsinfoformat"><a class="header" href="#xplrconfiggenerallogsinfoformat">xplr.config.general.logs.info.format</a></h4>
<p>The string to indicate an information in logs.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggenerallogsinfostyle"><a class="header" href="#xplrconfiggenerallogsinfostyle">xplr.config.general.logs.info.style</a></h4>
<p>The style for the informations logs.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggenerallogssuccessformat"><a class="header" href="#xplrconfiggenerallogssuccessformat">xplr.config.general.logs.success.format</a></h4>
<p>The string to indicate an success in logs.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggenerallogssuccessstyle"><a class="header" href="#xplrconfiggenerallogssuccessstyle">xplr.config.general.logs.success.style</a></h4>
<p>The style for the success logs.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggenerallogswarningformat"><a class="header" href="#xplrconfiggenerallogswarningformat">xplr.config.general.logs.warning.format</a></h4>
<p>The string to indicate an warnings in logs.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggenerallogswarningstyle"><a class="header" href="#xplrconfiggenerallogswarningstyle">xplr.config.general.logs.warning.style</a></h4>
<p>The style for the warnings logs.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggenerallogserrorformat"><a class="header" href="#xplrconfiggenerallogserrorformat">xplr.config.general.logs.error.format</a></h4>
<p>The string to indicate an error in logs.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggenerallogserrorstyle"><a class="header" href="#xplrconfiggenerallogserrorstyle">xplr.config.general.logs.error.style</a></h4>
<p>The style for the error logs.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneraltableheadercols"><a class="header" href="#xplrconfiggeneraltableheadercols">xplr.config.general.table.header.cols</a></h4>
<p>Columns to display in the table header.</p>
<p>Type: nullable list of tables with the following fields:</p>
<ul>
<li>format: nullable string</li>
<li>style: <a href="https://xplr.dev/en/style">Style</a></li>
</ul>
<h4 id="xplrconfiggeneraltableheaderstyle"><a class="header" href="#xplrconfiggeneraltableheaderstyle">xplr.config.general.table.header.style</a></h4>
<p>Style of the table header.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneraltableheaderheight"><a class="header" href="#xplrconfiggeneraltableheaderheight">xplr.config.general.table.header.height</a></h4>
<p>Height of the table header.</p>
<p>Type: nullable integer</p>
<h4 id="xplrconfiggeneraltablerowcols"><a class="header" href="#xplrconfiggeneraltablerowcols">xplr.config.general.table.row.cols</a></h4>
<p>Columns to display in each row in the table.</p>
<p>Type: nullable list of tables with the following fields:</p>
<ul>
<li>format: nullable string</li>
<li>style: <a href="https://xplr.dev/en/style">Style</a></li>
</ul>
<h4 id="xplrconfiggeneraltablerowstyle"><a class="header" href="#xplrconfiggeneraltablerowstyle">xplr.config.general.table.row.style</a></h4>
<p>Default style of the table.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneraltablerowheight"><a class="header" href="#xplrconfiggeneraltablerowheight">xplr.config.general.table.row.height</a></h4>
<p>Height of the table rows.</p>
<p>Type: nullable integer</p>
<h4 id="xplrconfiggeneraltablestyle"><a class="header" href="#xplrconfiggeneraltablestyle">xplr.config.general.table.style</a></h4>
<p>Default style of the table.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneraltabletree"><a class="header" href="#xplrconfiggeneraltabletree">xplr.config.general.table.tree</a></h4>
<p>Tree to display in the table.</p>
<p>Type: nullable list of tables with the following fields:</p>
<ul>
<li>format: nullable string</li>
<li>style: <a href="https://xplr.dev/en/style">Style</a></li>
</ul>
<h4 id="xplrconfiggeneraltablecol_spacing"><a class="header" href="#xplrconfiggeneraltablecol_spacing">xplr.config.general.table.col_spacing</a></h4>
<p>Spacing between the columns in the table.</p>
<p>Type: nullable integer</p>
<h4 id="xplrconfiggeneraltablecol_widths"><a class="header" href="#xplrconfiggeneraltablecol_widths">xplr.config.general.table.col_widths</a></h4>
<p>Constraint for the column widths.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/layouts#constraint">Constraint</a></p>
<h4 id="xplrconfiggeneraldefault_uiprefix"><a class="header" href="#xplrconfiggeneraldefault_uiprefix">xplr.config.general.default_ui.prefix</a></h4>
<p>The content that is placed before the item name for each row by default.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneraldefault_uisuffix"><a class="header" href="#xplrconfiggeneraldefault_uisuffix">xplr.config.general.default_ui.suffix</a></h4>
<p>The content which is appended to each item name for each row by default.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneraldefault_uistyle"><a class="header" href="#xplrconfiggeneraldefault_uistyle">xplr.config.general.default_ui.style</a></h4>
<p>The default style of each item for each row.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralfocus_uiprefix"><a class="header" href="#xplrconfiggeneralfocus_uiprefix">xplr.config.general.focus_ui.prefix</a></h4>
<p>The string placed before the item name for a focused row.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralfocus_uisuffix"><a class="header" href="#xplrconfiggeneralfocus_uisuffix">xplr.config.general.focus_ui.suffix</a></h4>
<p>The string placed after the item name for a focused row.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralfocus_uistyle"><a class="header" href="#xplrconfiggeneralfocus_uistyle">xplr.config.general.focus_ui.style</a></h4>
<p>Style for focused item.
Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralselection_uiprefix"><a class="header" href="#xplrconfiggeneralselection_uiprefix">xplr.config.general.selection_ui.prefix</a></h4>
<p>The string placed before the item name for a selected row.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralselection_uisuffix"><a class="header" href="#xplrconfiggeneralselection_uisuffix">xplr.config.general.selection_ui.suffix</a></h4>
<p>The string placed after the item name for a selected row.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralselection_uistyle"><a class="header" href="#xplrconfiggeneralselection_uistyle">xplr.config.general.selection_ui.style</a></h4>
<p>Style for selected rows.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralfocus_selection_uiprefix"><a class="header" href="#xplrconfiggeneralfocus_selection_uiprefix">xplr.config.general.focus_selection_ui.prefix</a></h4>
<p>The string placed before item name for a selected row that gets the focus.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralfocus_selection_uisuffix"><a class="header" href="#xplrconfiggeneralfocus_selection_uisuffix">xplr.config.general.focus_selection_ui.suffix</a></h4>
<p>The string placed after the item name for a selected row that gets the focus.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralfocus_selection_uistyle"><a class="header" href="#xplrconfiggeneralfocus_selection_uistyle">xplr.config.general.focus_selection_ui.style</a></h4>
<p>Style for a selected row that gets the focus.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralsort_and_filter_uiseparatorformat"><a class="header" href="#xplrconfiggeneralsort_and_filter_uiseparatorformat">xplr.config.general.sort_and_filter_ui.separator.format</a></h4>
<p>The shape of the separator for the Sort &amp; filter panel.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralsort_and_filter_uiseparatorstyle"><a class="header" href="#xplrconfiggeneralsort_and_filter_uiseparatorstyle">xplr.config.general.sort_and_filter_ui.separator.style</a></h4>
<p>The style of the separator for the Sort &amp; filter panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralsort_and_filter_uidefault_identifierformat"><a class="header" href="#xplrconfiggeneralsort_and_filter_uidefault_identifierformat">xplr.config.general.sort_and_filter_ui.default_identifier.format</a></h4>
<p>The content of the default identifier in Sort &amp; filter panel.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralsort_and_filter_uidefault_identifierstyle"><a class="header" href="#xplrconfiggeneralsort_and_filter_uidefault_identifierstyle">xplr.config.general.sort_and_filter_ui.default_identifier.style</a></h4>
<p>Style for the default identifier in Sort &amp; filter panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralsort_and_filter_uisort_direction_identifiersforwardformat"><a class="header" href="#xplrconfiggeneralsort_and_filter_uisort_direction_identifiersforwardformat">xplr.config.general.sort_and_filter_ui.sort_direction_identifiers.forward.format</a></h4>
<p>The shape of the forward direction indicator for sort identifiers in Sort &amp; filter panel.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralsort_and_filter_uisort_direction_identifiersforwardstyle"><a class="header" href="#xplrconfiggeneralsort_and_filter_uisort_direction_identifiersforwardstyle">xplr.config.general.sort_and_filter_ui.sort_direction_identifiers.forward.style</a></h4>
<p>Style of forward direction indicator in Sort &amp; filter panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralsort_and_filter_uisort_direction_identifiersreverseformat"><a class="header" href="#xplrconfiggeneralsort_and_filter_uisort_direction_identifiersreverseformat">xplr.config.general.sort_and_filter_ui.sort_direction_identifiers.reverse.format</a></h4>
<p>The shape of the reverse direction indicator for sort identifiers in Sort &amp; filter panel.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralsort_and_filter_uisort_direction_identifiersreversestyle"><a class="header" href="#xplrconfiggeneralsort_and_filter_uisort_direction_identifiersreversestyle">xplr.config.general.sort_and_filter_ui.sort_direction_identifiers.reverse.style</a></h4>
<p>Style of reverse direction indicator in Sort &amp; filter panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralsort_and_filter_uisorter_identifiers"><a class="header" href="#xplrconfiggeneralsort_and_filter_uisorter_identifiers">xplr.config.general.sort_and_filter_ui.sorter_identifiers</a></h4>
<p>The identifiers used to denote applied sorters in the Sort &amp; filter panel.</p>
<p>Type: nullable mapping of the following key-value pairs:</p>
<ul>
<li>key: <a href="https://xplr.dev/en/sorting#sorter">Sorter</a></li>
<li>value:
<ul>
<li>format: nullable string</li>
<li>style: <a href="https://xplr.dev/en/style">Style</a></li>
</ul>
</li>
</ul>
<h4 id="xplrconfiggeneralsort_and_filter_uifilter_identifiers"><a class="header" href="#xplrconfiggeneralsort_and_filter_uifilter_identifiers">xplr.config.general.sort_and_filter_ui.filter_identifiers</a></h4>
<p>The identifiers used to denote applied filters in the Sort &amp; filter panel.</p>
<p>Type: nullable mapping of the following key-value pairs:</p>
<ul>
<li>key: <a href="https://xplr.dev/en/filtering#filter">Filter</a></li>
<li>value:
<ul>
<li>format: nullable string</li>
<li>style: <a href="https://xplr.dev/en/style">Style</a></li>
</ul>
</li>
</ul>
<h4 id="xplrconfiggeneralpanel_uidefaulttitleformat"><a class="header" href="#xplrconfiggeneralpanel_uidefaulttitleformat">xplr.config.general.panel_ui.default.title.format</a></h4>
<p>The content for panel title by default.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralpanel_uidefaulttitlestyle"><a class="header" href="#xplrconfiggeneralpanel_uidefaulttitlestyle">xplr.config.general.panel_ui.default.title.style</a></h4>
<p>The style for panel title by default.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uidefaultstyle"><a class="header" href="#xplrconfiggeneralpanel_uidefaultstyle">xplr.config.general.panel_ui.default.style</a></h4>
<p>Style of the panels by default.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uidefaultborders"><a class="header" href="#xplrconfiggeneralpanel_uidefaultborders">xplr.config.general.panel_ui.default.borders</a></h4>
<p>Defines where to show borders for the panels by default.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/borders#border">Border</a></p>
<h4 id="xplrconfiggeneralpanel_uidefaultborder_type"><a class="header" href="#xplrconfiggeneralpanel_uidefaultborder_type">xplr.config.general.panel_ui.default.border_type</a></h4>
<p>Type of the borders by default.</p>
<p>Type: nullable <a href="https://xplr.dev/en/borders#border-type">Border Type</a></p>
<h4 id="xplrconfiggeneralpanel_uidefaultborder_style"><a class="header" href="#xplrconfiggeneralpanel_uidefaultborder_style">xplr.config.general.panel_ui.default.border_style</a></h4>
<p>Style of the panel borders by default.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uitabletitleformat"><a class="header" href="#xplrconfiggeneralpanel_uitabletitleformat">xplr.config.general.panel_ui.table.title.format</a></h4>
<p>The content for the table panel title.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralpanel_uitabletitlestyle"><a class="header" href="#xplrconfiggeneralpanel_uitabletitlestyle">xplr.config.general.panel_ui.table.title.style</a></h4>
<p>Style of the table panel title.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uitablestyle"><a class="header" href="#xplrconfiggeneralpanel_uitablestyle">xplr.config.general.panel_ui.table.style</a></h4>
<p>Style of the table panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uitableborders"><a class="header" href="#xplrconfiggeneralpanel_uitableborders">xplr.config.general.panel_ui.table.borders</a></h4>
<p>Defines where to show borders for the table panel.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/borders#border">Border</a></p>
<h4 id="xplrconfiggeneralpanel_uitableborder_type"><a class="header" href="#xplrconfiggeneralpanel_uitableborder_type">xplr.config.general.panel_ui.table.border_type</a></h4>
<p>Type of the borders for table panel.</p>
<p>Type: nullable <a href="https://xplr.dev/en/borders#border-type">Border Type</a></p>
<h4 id="xplrconfiggeneralpanel_uitableborder_style"><a class="header" href="#xplrconfiggeneralpanel_uitableborder_style">xplr.config.general.panel_ui.table.border_style</a></h4>
<p>Style of the table panel borders.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uihelp_menutitleformat"><a class="header" href="#xplrconfiggeneralpanel_uihelp_menutitleformat">xplr.config.general.panel_ui.help_menu.title.format</a></h4>
<p>The content for the help menu panel title.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralpanel_uihelp_menutitlestyle"><a class="header" href="#xplrconfiggeneralpanel_uihelp_menutitlestyle">xplr.config.general.panel_ui.help_menu.title.style</a></h4>
<p>Style of the help menu panel title.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uihelp_menustyle"><a class="header" href="#xplrconfiggeneralpanel_uihelp_menustyle">xplr.config.general.panel_ui.help_menu.style</a></h4>
<p>Style of the help menu panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uihelp_menuborders"><a class="header" href="#xplrconfiggeneralpanel_uihelp_menuborders">xplr.config.general.panel_ui.help_menu.borders</a></h4>
<p>Defines where to show borders for the help menu panel.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/borders#border">Border</a></p>
<h4 id="xplrconfiggeneralpanel_uihelp_menuborder_type"><a class="header" href="#xplrconfiggeneralpanel_uihelp_menuborder_type">xplr.config.general.panel_ui.help_menu.border_type</a></h4>
<p>Type of the borders for help menu panel.</p>
<p>Type: nullable <a href="https://xplr.dev/en/borders#border-type">Border Type</a></p>
<h4 id="xplrconfiggeneralpanel_uihelp_menuborder_style"><a class="header" href="#xplrconfiggeneralpanel_uihelp_menuborder_style">xplr.config.general.panel_ui.help_menu.border_style</a></h4>
<p>Style of the help menu panel borders.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uiinput_and_logstitleformat"><a class="header" href="#xplrconfiggeneralpanel_uiinput_and_logstitleformat">xplr.config.general.panel_ui.input_and_logs.title.format</a></h4>
<p>The content for the input &amp; logs panel title.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralpanel_uiinput_and_logstitlestyle"><a class="header" href="#xplrconfiggeneralpanel_uiinput_and_logstitlestyle">xplr.config.general.panel_ui.input_and_logs.title.style</a></h4>
<p>Style of the input &amp; logs panel title.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uiinput_and_logsborders"><a class="header" href="#xplrconfiggeneralpanel_uiinput_and_logsborders">xplr.config.general.panel_ui.input_and_logs.borders</a></h4>
<h4 id="xplrconfiggeneralpanel_uiinput_and_logsstyle"><a class="header" href="#xplrconfiggeneralpanel_uiinput_and_logsstyle">xplr.config.general.panel_ui.input_and_logs.style</a></h4>
<p>Style of the input &amp; logs panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a>
Defines where to show borders for the input &amp; logs panel.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/borders#border">Border</a></p>
<h4 id="xplrconfiggeneralpanel_uiinput_and_logsborder_type"><a class="header" href="#xplrconfiggeneralpanel_uiinput_and_logsborder_type">xplr.config.general.panel_ui.input_and_logs.border_type</a></h4>
<p>Type of the borders for input &amp; logs panel.</p>
<p>Type: nullable <a href="https://xplr.dev/en/borders#border-type">Border Type</a></p>
<h4 id="xplrconfiggeneralpanel_uiinput_and_logsborder_style"><a class="header" href="#xplrconfiggeneralpanel_uiinput_and_logsborder_style">xplr.config.general.panel_ui.input_and_logs.border_style</a></h4>
<p>Style of the input &amp; logs panel borders.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uiselectiontitleformat"><a class="header" href="#xplrconfiggeneralpanel_uiselectiontitleformat">xplr.config.general.panel_ui.selection.title.format</a></h4>
<p>The content for the selection panel title.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralpanel_uiselectiontitlestyle"><a class="header" href="#xplrconfiggeneralpanel_uiselectiontitlestyle">xplr.config.general.panel_ui.selection.title.style</a></h4>
<p>Style of the selection panel title.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uiselectionborders"><a class="header" href="#xplrconfiggeneralpanel_uiselectionborders">xplr.config.general.panel_ui.selection.borders</a></h4>
<h4 id="xplrconfiggeneralpanel_uiselectionstyle"><a class="header" href="#xplrconfiggeneralpanel_uiselectionstyle">xplr.config.general.panel_ui.selection.style</a></h4>
<p>Style of the selection panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a>
Defines where to show borders for the selection panel.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/borders#border">Border</a></p>
<h4 id="xplrconfiggeneralpanel_uiselectionborder_type"><a class="header" href="#xplrconfiggeneralpanel_uiselectionborder_type">xplr.config.general.panel_ui.selection.border_type</a></h4>
<p>Type of the borders for selection panel.</p>
<p>Type: nullable <a href="https://xplr.dev/en/borders#border-type">Border Type</a></p>
<h4 id="xplrconfiggeneralpanel_uiselectionborder_style"><a class="header" href="#xplrconfiggeneralpanel_uiselectionborder_style">xplr.config.general.panel_ui.selection.border_style</a></h4>
<p>Style of the selection panel borders.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uisort_and_filtertitleformat"><a class="header" href="#xplrconfiggeneralpanel_uisort_and_filtertitleformat">xplr.config.general.panel_ui.sort_and_filter.title.format</a></h4>
<p>The content for the sort &amp; filter panel title.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralpanel_uisort_and_filtertitlestyle"><a class="header" href="#xplrconfiggeneralpanel_uisort_and_filtertitlestyle">xplr.config.general.panel_ui.sort_and_filter.title.style</a></h4>
<p>Style of the sort &amp; filter panel title.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uisort_and_filterstyle"><a class="header" href="#xplrconfiggeneralpanel_uisort_and_filterstyle">xplr.config.general.panel_ui.sort_and_filter.style</a></h4>
<p>Style of the sort &amp; filter panel.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralpanel_uisort_and_filterborders"><a class="header" href="#xplrconfiggeneralpanel_uisort_and_filterborders">xplr.config.general.panel_ui.sort_and_filter.borders</a></h4>
<p>Defines where to show borders for the sort &amp; filter panel.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/borders#border">Border</a></p>
<h4 id="xplrconfiggeneralpanel_uisort_and_filterborder_type"><a class="header" href="#xplrconfiggeneralpanel_uisort_and_filterborder_type">xplr.config.general.panel_ui.sort_and_filter.border_type</a></h4>
<p>Type of the borders for sort &amp; filter panel.</p>
<p>Type: nullable <a href="https://xplr.dev/en/borders#border-type">Border Type</a></p>
<h4 id="xplrconfiggeneralpanel_uisort_and_filterborder_style"><a class="header" href="#xplrconfiggeneralpanel_uisort_and_filterborder_style">xplr.config.general.panel_ui.sort_and_filter.border_style</a></h4>
<p>Style of the sort &amp; filter panel borders.</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfiggeneralinitial_sorting"><a class="header" href="#xplrconfiggeneralinitial_sorting">xplr.config.general.initial_sorting</a></h4>
<p>Initial group if sorters applied to the nodes list in the table.</p>
<p>Type: nullable list of <a href="https://xplr.dev/en/sorting#node-sorter-applicable">Node Sorter</a></p>
<h4 id="xplrconfiggeneralinitial_mode"><a class="header" href="#xplrconfiggeneralinitial_mode">xplr.config.general.initial_mode</a></h4>
<p>The name of one of the modes to use when xplr loads.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralinitial_layout"><a class="header" href="#xplrconfiggeneralinitial_layout">xplr.config.general.initial_layout</a></h4>
<p>The name of one of the layouts to use when xplr loads.</p>
<p>Type: nullable string</p>
<h4 id="xplrconfiggeneralstart_fifo"><a class="header" href="#xplrconfiggeneralstart_fifo">xplr.config.general.start_fifo</a></h4>
<p>Set it to a file path to start fifo when xplr loads.
Generally it is used to integrate with external tools like previewers.</p>
<p>Type: nullable string</p>
<div style="break-before: page; page-break-before: always;"></div><h3 id="node-types"><a class="header" href="#node-types">Node Types</a></h3>
<p>This section defines how to deal with different kinds of nodes (files,
directories, symlinks etc.) based on their properties.</p>
<p>One node can fall into multiple categories. For example, a node can have the
<em>extension</em> <code>md</code>, and also be a <em>file</em>. In that case, the properties from
the more specific category i.e. <em>extension</em> will be used.</p>
<p>This can be configured using the <code>xplr.config.node_types</code> Lua API.</p>
<h4 id="xplrconfignode_typesdirectorystyle"><a class="header" href="#xplrconfignode_typesdirectorystyle">xplr.config.node_types.directory.style</a></h4>
<p>The style for the directory nodes</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfignode_typesdirectorymetaicon"><a class="header" href="#xplrconfignode_typesdirectorymetaicon">xplr.config.node_types.directory.meta.icon</a></h4>
<p>Metadata for the directory nodes</p>
<p>Type: nullable string</p>
<h4 id="xplrconfignode_typesfilestyle"><a class="header" href="#xplrconfignode_typesfilestyle">xplr.config.node_types.file.style</a></h4>
<p>The style for the file nodes</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfignode_typesfilemetaicon"><a class="header" href="#xplrconfignode_typesfilemetaicon">xplr.config.node_types.file.meta.icon</a></h4>
<p>Metadata for the file nodes</p>
<p>Type: nullable string</p>
<h4 id="xplrconfignode_typessymlinkstyle"><a class="header" href="#xplrconfignode_typessymlinkstyle">xplr.config.node_types.symlink.style</a></h4>
<p>The style for the symlink nodes</p>
<p>Type: <a href="https://xplr.dev/en/style">Style</a></p>
<h4 id="xplrconfignode_typessymlinkmetaicon"><a class="header" href="#xplrconfignode_typessymlinkmetaicon">xplr.config.node_types.symlink.meta.icon</a></h4>
<p>Metadata for the symlink nodes</p>
<p>Type: nullable string
Metadata and style based on mime types.
It is possible to use the wildcard <code>*</code> to match all mime sub types. It will
be overwritten by the more specific sub types that are defined.</p>
<p>Type: mapping of the following key-value pairs:</p>
<ul>
<li>key: string</li>
<li>value:
<ul>
<li>key: string</li>
<li>value: <a href="https://xplr.dev/en/node-type">Node Type</a></li>
</ul>
</li>
</ul>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.mime_essence = {
application = {
-- application/*
[&quot;*&quot;] = { meta = { icon = &quot;a&quot; } }
-- application/pdf
pdf = { meta = { icon = &quot;&quot; }, style = { fg = &quot;Blue&quot; } },
-- application/zip
zip = { meta = { icon = &quot;&quot;} },
},
}
</code></pre>
<h4 id="xplrconfignode_typesextension"><a class="header" href="#xplrconfignode_typesextension">xplr.config.node_types.extension</a></h4>
<p>Metadata and style based on extension.</p>
<p>Type: mapping of the following key-value pairs:</p>
<ul>
<li>key: string</li>
<li>value: <a href="https://xplr.dev/en/node-type">Node Type</a></li>
</ul>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.extension.md = { meta = { icon = &quot;&quot; }, style = { fg = &quot;Blue&quot; } }
xplr.config.node_types.extension.rs = { meta = { icon = &quot;🦀&quot; } }
</code></pre>
<h4 id="xplrconfignode_typesspecial"><a class="header" href="#xplrconfignode_typesspecial">xplr.config.node_types.special</a></h4>
<p>Metadata and style based on special file names.</p>
<p>Type: mapping of the following key-value pairs:</p>
<ul>
<li>key: string</li>
<li>value: <a href="https://xplr.dev/en/node-type">Node Type</a></li>
</ul>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.special[&quot;Cargo.toml&quot;] = { meta = { icon = &quot;&quot; } }
xplr.config.node_types.special[&quot;Downloads&quot;] = { meta = { icon = &quot;&quot; }, style = { fg = &quot;Blue&quot; } }
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h3 id="layouts"><a class="header" href="#layouts">Layouts</a></h3>
<p>xplr layouts define the structure of the UI, i.e. how many panel we see,
placement and size of the panels, how they look etc.</p>
<p>This is configuration exposed via the <code>xplr.config.layouts</code> API.</p>
<p><code>xplr.config.layouts.builtin</code> contain some built-in panels which can be
overridden, but you can't add or remove panels in it.</p>
<p>You can add new panels in <code>xplr.config.layouts.custom</code>.</p>
<h5 id="example-defining-custom-layout"><a class="header" href="#example-defining-custom-layout">Example: Defining Custom Layout</a></h5>
<p><img src="https://s6.gifyu.com/images/layout.png" alt="demo" /></p>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
Horizontal = {
config = {
margin = 1,
horizontal_margin = 2,
vertical_margin = 3,
constraints = {
{ Percentage = 50 },
{ Percentage = 50 },
}
},
splits = {
&quot;Table&quot;,
&quot;HelpMenu&quot;,
}
}
}
</code></pre>
<h4 id="xplrconfiglayoutsbuiltindefault"><a class="header" href="#xplrconfiglayoutsbuiltindefault">xplr.config.layouts.builtin.default</a></h4>
<p>The default layout</p>
<p>Type: <a href="https://xplr.dev/en/layout">Layout</a></p>
<h4 id="xplrconfiglayoutsbuiltinno_help"><a class="header" href="#xplrconfiglayoutsbuiltinno_help">xplr.config.layouts.builtin.no_help</a></h4>
<p>The layout without help menu</p>
<p>Type: <a href="https://xplr.dev/en/layout">Layout</a></p>
<h4 id="xplrconfiglayoutsbuiltinno_selection"><a class="header" href="#xplrconfiglayoutsbuiltinno_selection">xplr.config.layouts.builtin.no_selection</a></h4>
<p>The layout without selection panel</p>
<p>Type: <a href="https://xplr.dev/en/layout">Layout</a></p>
<h4 id="xplrconfiglayoutsbuiltinno_help_no_selection"><a class="header" href="#xplrconfiglayoutsbuiltinno_help_no_selection">xplr.config.layouts.builtin.no_help_no_selection</a></h4>
<p>The layout without help menu and selection panel</p>
<p>Type: <a href="https://xplr.dev/en/layout">Layout</a></p>
<h4 id="xplrconfiglayoutscustom"><a class="header" href="#xplrconfiglayoutscustom">xplr.config.layouts.custom</a></h4>
<p>This is where you can define custom layouts</p>
<p>Type: mapping of the following key-value pairs:</p>
<ul>
<li>key: string</li>
<li>value: <a href="https://xplr.dev/en/layout">Layout</a></li>
</ul>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.layouts.custom.example = &quot;Nothing&quot; -- Show a blank screen
xplr.config.general.initial_layout = &quot;example&quot; -- Load the example layout
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h3 id="modes"><a class="header" href="#modes">Modes</a></h3>
<p>xplr is a modal file explorer. That means the users switch between different
modes, each containing a different set of key bindings to avoid clashes.
Users can switch between these modes at run-time.</p>
<p>The modes can be configured using the <code>xplr.config.modes</code> Lua API.</p>
<p><code>xplr.config.modes.builtin</code> contain some built-in modes which can be
overridden, but you can't add or remove modes in it.</p>
<h4 id="xplrconfigmodesbuiltindefault"><a class="header" href="#xplrconfigmodesbuiltindefault">xplr.config.modes.builtin.default</a></h4>
<p>The builtin default mode.
Visit the <a href="https://xplr.dev/en/default-key-bindings">Default Key Bindings</a>
to see what each mode does.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltindebug_error"><a class="header" href="#xplrconfigmodesbuiltindebug_error">xplr.config.modes.builtin.debug_error</a></h4>
<p>The builtin debug error mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinrecover"><a class="header" href="#xplrconfigmodesbuiltinrecover">xplr.config.modes.builtin.recover</a></h4>
<p>The builtin recover mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinselection_ops"><a class="header" href="#xplrconfigmodesbuiltinselection_ops">xplr.config.modes.builtin.selection_ops</a></h4>
<p>The builtin selection ops mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltincreate"><a class="header" href="#xplrconfigmodesbuiltincreate">xplr.config.modes.builtin.create</a></h4>
<p>The builtin create mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltincreate_directory"><a class="header" href="#xplrconfigmodesbuiltincreate_directory">xplr.config.modes.builtin.create_directory</a></h4>
<p>The builtin create directory mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltincreate_file"><a class="header" href="#xplrconfigmodesbuiltincreate_file">xplr.config.modes.builtin.create_file</a></h4>
<p>The builtin create file mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinnumber"><a class="header" href="#xplrconfigmodesbuiltinnumber">xplr.config.modes.builtin.number</a></h4>
<p>The builtin number mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltingo_to"><a class="header" href="#xplrconfigmodesbuiltingo_to">xplr.config.modes.builtin.go_to</a></h4>
<p>The builtin go to mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinrename"><a class="header" href="#xplrconfigmodesbuiltinrename">xplr.config.modes.builtin.rename</a></h4>
<p>The builtin rename mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinduplicate_as"><a class="header" href="#xplrconfigmodesbuiltinduplicate_as">xplr.config.modes.builtin.duplicate_as</a></h4>
<p>The builtin duplicate as mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltindelete"><a class="header" href="#xplrconfigmodesbuiltindelete">xplr.config.modes.builtin.delete</a></h4>
<p>The builtin delete mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinaction"><a class="header" href="#xplrconfigmodesbuiltinaction">xplr.config.modes.builtin.action</a></h4>
<p>The builtin action mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinquit"><a class="header" href="#xplrconfigmodesbuiltinquit">xplr.config.modes.builtin.quit</a></h4>
<p>The builtin quit mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinsearch"><a class="header" href="#xplrconfigmodesbuiltinsearch">xplr.config.modes.builtin.search</a></h4>
<p>The builtin search mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinfilter"><a class="header" href="#xplrconfigmodesbuiltinfilter">xplr.config.modes.builtin.filter</a></h4>
<p>The builtin filter mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinrelative_path_does_contain"><a class="header" href="#xplrconfigmodesbuiltinrelative_path_does_contain">xplr.config.modes.builtin.relative_path_does_contain</a></h4>
<p>The builtin relative_path_does_contain mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinrelative_path_does_not_contain"><a class="header" href="#xplrconfigmodesbuiltinrelative_path_does_not_contain">xplr.config.modes.builtin.relative_path_does_not_contain</a></h4>
<p>The builtin relative_path_does_not_contain mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinsort"><a class="header" href="#xplrconfigmodesbuiltinsort">xplr.config.modes.builtin.sort</a></h4>
<p>The builtin sort mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodesbuiltinswitch_layout"><a class="header" href="#xplrconfigmodesbuiltinswitch_layout">xplr.config.modes.builtin.switch_layout</a></h4>
<p>The builtin switch layout mode.</p>
<p>Type: <a href="https://xplr.dev/en/mode">Mode</a></p>
<h4 id="xplrconfigmodescustom"><a class="header" href="#xplrconfigmodescustom">xplr.config.modes.custom</a></h4>
<p>This is where you define custom modes.</p>
<p>Type: mapping of the following key-value pairs:</p>
<ul>
<li>key: string</li>
<li>value: <a href="https://xplr.dev/en/mode">Mode</a></li>
</ul>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.modes.custom.example = {
name = &quot;example&quot;,
key_bindings = {
on_key = {
enter = {
help = &quot;default mode&quot;,
messages = {
&quot;PopMode&quot;,
{ SwitchModeBuiltin = &quot;default&quot; },
},
},
},
},
}
xplr.config.general.initial_mode = &quot;example&quot;
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="concept-1"><a class="header" href="#concept-1">Concept</a></h1>
<p>These are the concepts that make xplr probably the most hackable terminal file
explorer.</p>
<ul>
<li><a href="key-bindings.html">Key Bindings</a></li>
<li><a href="node-type.html">Node Type</a></li>
<li><a href="layout.html">Layout</a></li>
<li><a href="mode.html">Mode</a></li>
<li><a href="message.html">Message</a></li>
<li><a href="borders.html">Borders</a></li>
<li><a href="style.html">Style</a></li>
<li><a href="sorting.html">Sorting</a></li>
<li><a href="filtering.html">Filtering</a></li>
<li><a href="column-renderer.html">Column Renderer</a></li>
<li><a href="lua-function-calls.html">Lua Function Calls</a></li>
<li><a href="environment-variables-and-pipes.html">Environment Variables and Pipes</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="key-bindings"><a class="header" href="#key-bindings">Key Bindings</a></h1>
<p>Key bindings define how each keyboard input will be handled while in a specific
<a href="modes.html#mode">mode</a>.</p>
<p>See the <a href="default-key-bindings.html">Default key bindings</a> for example.</p>
<p>To configure or work with key bindings, visit <a href="configure-key-bindings.html">Configure Key Bindings</a>.</p>
<p>In case you need help debugging key bindings or to understand the system DYI
way, refer to the <a href="debug-key-bindings.html">Debug Key Bindings</a> guide.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="configure-key-bindings"><a class="header" href="#configure-key-bindings">Configure Key Bindings</a></h1>
<p>In xplr, each keyboard input passes through a bunch of handlers (e.g. <code>on_key</code>,
<code>on_number</code>, <code>default</code> etc.) in a given order. If any of the handlers is
configured to with an <a href="configure-key-bindings.html#action">action</a>, it will intercept the key and produce
<a href="message.html#message">messages</a> for xplr to handle.</p>
<h2 id="key-bindings-1"><a class="header" href="#key-bindings-1">Key Bindings</a></h2>
<p>Key bindings contains the following information:</p>
<ul>
<li><a href="configure-key-bindings.html#on_key">on_key</a></li>
<li><a href="configure-key-bindings.html#on_alphabet">on_alphabet</a></li>
<li><a href="configure-key-bindings.html#on_number">on_number</a></li>
<li><a href="configure-key-bindings.html#on_alphanumeric">on_alphanumeric</a></li>
<li><a href="configure-key-bindings.html#on_special_character">on_special_character</a></li>
<li><a href="configure-key-bindings.html#on_character">on_character</a></li>
<li><a href="configure-key-bindings.html#on_navigation">on_navigation</a></li>
<li><a href="configure-key-bindings.html#on_function">on_function</a></li>
<li><a href="configure-key-bindings.html#default">default</a></li>
</ul>
<h3 id="on_key"><a class="header" href="#on_key">on_key</a></h3>
<p>Type: mapping of <a href="configure-key-bindings.html#key">Key</a> to nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>Defines what to do when an exact key is pressed.</p>
<h3 id="on_alphabet"><a class="header" href="#on_alphabet">on_alphabet</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>An action to perform if the keyboard input is an alphabet and is not mapped via
the <a href="configure-key-bindings.html#on_key">on_key</a> field.</p>
<h3 id="on_number"><a class="header" href="#on_number">on_number</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>An action to perform if the keyboard input is a number and is not mapped via
the <a href="configure-key-bindings.html#on_key">on_key</a> field.</p>
<h3 id="on_alphanumeric"><a class="header" href="#on_alphanumeric">on_alphanumeric</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>An action to perform if the keyboard input is alphanumeric and is not mapped
via the <a href="configure-key-bindings.html#on_key">on_key</a>, <a href="configure-key-bindings.html#on_alphabet">on_alphabet</a> or <a href="configure-key-bindings.html#on_number">on_number</a> field.</p>
<h3 id="on_special_character"><a class="header" href="#on_special_character">on_special_character</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>An action to perform if the keyboard input is a special character and is not
mapped via the <a href="configure-key-bindings.html#on_key">on_key</a> field.</p>
<h3 id="on_character"><a class="header" href="#on_character">on_character</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>An action to perform if the keyboard input is a character and is not mapped
via the <a href="configure-key-bindings.html#on_key">on_key</a>, <a href="configure-key-bindings.html#on_alphabet">on_alphabet</a>, <a href="configure-key-bindings.html#on_number">on_number</a>, <a href="configure-key-bindings.html#on_alphanumeric">on_alphanumeric</a>
or <a href="configure-key-bindings.html#on_special_character">on_special_character</a> field.</p>
<h3 id="on_navigation"><a class="header" href="#on_navigation">on_navigation</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>An action to perform if the keyboard input is a navigation key and is not
mapped via the <a href="configure-key-bindings.html#on_key">on_key</a> field.</p>
<h3 id="on_function"><a class="header" href="#on_function">on_function</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>An action to perform if the keyboard input is a function key and is not mapped
via the <a href="configure-key-bindings.html#on_key">on_key</a> field.</p>
<h3 id="default"><a class="header" href="#default">default</a></h3>
<p>Type: nullable <a href="configure-key-bindings.html#action">Action</a></p>
<p>Default action to perform in case if a keyboard input not mapped via any of the
<code>on_*</code> fields mentioned above.</p>
<h2 id="key"><a class="header" href="#key">Key</a></h2>
<p>A key can be one of the following:</p>
<ul>
<li>0, 1, ... 9</li>
<li>a, b, ... z</li>
<li>A, B, ... Z</li>
<li>f1, f2, ... f12</li>
<li>backspace</li>
<li>left</li>
<li>right</li>
<li>up</li>
<li>down</li>
<li>home</li>
<li>end</li>
<li>page-up</li>
<li>page-down</li>
<li>back-tab</li>
<li>delete</li>
<li>insert</li>
<li>enter</li>
<li>tab</li>
<li>esc</li>
<li>ctrl-a, ctrl-b, ... ctrl-z</li>
<li>ctrl-backspace, ctrl-left, ... ctrl-esc</li>
<li>alt-a, alt-b, ... alt-z</li>
</ul>
<p>And finally, the special characters - including space (<code>&quot; &quot;</code>) with their <code>ctrl</code>
bindings.</p>
<h2 id="action"><a class="header" href="#action">Action</a></h2>
<p>An action contains the following information:</p>
<ul>
<li><a href="configure-key-bindings.html#help">help</a></li>
<li><a href="configure-key-bindings.html#messages">messages</a></li>
</ul>
<h3 id="help"><a class="header" href="#help">help</a></h3>
<p>Type: nullable string</p>
<p>Description of what it does. If unspecified, it will be excluded from the help
menu.</p>
<h3 id="messages"><a class="header" href="#messages">messages</a></h3>
<p>Type: A list of <a href="message.html#message">Message</a> to send.</p>
<p>The list of messages to send when a key is pressed.</p>
<h2 id="tutorial-adding-a-new-mode"><a class="header" href="#tutorial-adding-a-new-mode">Tutorial: Adding a New Mode</a></h2>
<p>Assuming xplr is <a href="install.html">installed</a> and <a href="post-install.html">setup</a>, let's
add our own mode to integrate xplr with <a href="https://github.com/junegunn/fzf">fzf</a>.</p>
<p>We'll call it <code>fzxplr</code> mode.</p>
<p>First, let's add a custom mode called <code>fzxplr</code>, and map the key <code>F</code> to an
action that will call <code>fzf</code> to search and focus on a file or enter into a
directory.</p>
<pre><code class="language-lua">xplr.config.modes.custom.fzxplr = {
name = &quot;fzxplr&quot;,
key_bindings = {
on_key = {
F = {
help = &quot;search&quot;,
messages = {
{
BashExec = [===[
PTH=$(cat &quot;${XPLR_PIPE_DIRECTORY_NODES_OUT:?}&quot; | awk -F/ '{print $NF}' | fzf)
if [ -d &quot;$PTH&quot; ]; then
echo ChangeDirectory: &quot;'&quot;${PWD:?}/${PTH:?}&quot;'&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
else
echo FocusPath: &quot;'&quot;${PWD:?}/${PTH:?}&quot;'&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]===]
},
&quot;PopMode&quot;,
},
},
},
default = {
messages = {
&quot;PopMode&quot;,
},
},
},
}
</code></pre>
<p>As you can see, the key <code>F</code> in mode <code>fzxplr</code> (the name can be anything)
executes a script in <code>bash</code>.</p>
<p><code>BashExec</code>, <code>PopMode</code>, <code>SwitchModeBuiltin</code>, <code>ChangeDirectory</code> and <code>FocusPath</code>
are <a href="message.html#message">messages</a>, <code>$XPLR_PIPE_MSG_IN</code>,
<code>$XPLR_PIPE_DIRECTORY_NODES_OUT</code> are
<a href="environment-variables-and-pipes.html#environment-variables">environment variables</a> exported by <code>xplr</code>
before executing the command. They contain the path to the
<a href="environment-variables-and-pipes.html#input-pipe">input</a> and <a href="environment-variables-and-pipes.html#output-pipes">output</a> pipes that
allows external tools to interact with <code>xplr</code>.</p>
<p>Now that we have our new mode ready, let's add an entry point to this mode via
the <code>default</code> mode.</p>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key[&quot;F&quot;] = {
help = &quot;fzf mode&quot;,
messages = {
{ SwitchModeCustom = &quot;fzxplr&quot; },
},
}
</code></pre>
<p>Now let's try out the new <code>xplr</code>-<code>fzf</code> integration.</p>
<p><a href="https://gifyu.com/image/tW86"><img src="https://s3.gifyu.com/images/xplr-fzf.gif" alt="xplr-fzf.gif" /></a></p>
<hr />
<p>Visit <a href="awesome-plugins.html">Awesome Plugins</a> for more <a href="awesome-plugins.html#integration">integration</a> options.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="default-key-bindings"><a class="header" href="#default-key-bindings">Default Key Bindings</a></h1>
<p>The default key binding is inspired by <a href="https://www.vim.org/">vim</a> and slightly
overlaps with <a href="https://github.com/jarun/nnn/">nnn</a>, but it's supposed to be customized as per user
requirements.</p>
<p>When you press <code>?</code> in <a href="default-key-bindings.html#default">default mode</a>, you can see the complete list
of <a href="modes.html">modes</a> and the key mappings for each mode.</p>
<h3 id="default-1"><a class="header" href="#default-1">default</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>.</td><td></td><td>show hidden</td></tr>
<tr><td>/</td><td>ctrl-f</td><td>search</td></tr>
<tr><td>:</td><td></td><td>action</td></tr>
<tr><td>?</td><td></td><td>global help menu</td></tr>
<tr><td>G</td><td></td><td>go to bottom</td></tr>
<tr><td>V</td><td>ctrl-a</td><td>select/unselect all</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>ctrl-d</td><td></td><td>duplicate as</td></tr>
<tr><td>ctrl-i</td><td>tab</td><td>next visited path</td></tr>
<tr><td>ctrl-o</td><td></td><td>last visited path</td></tr>
<tr><td>ctrl-r</td><td></td><td>refresh screen</td></tr>
<tr><td>ctrl-u</td><td></td><td>clear selection</td></tr>
<tr><td>ctrl-w</td><td></td><td>switch layout</td></tr>
<tr><td>d</td><td></td><td>delete</td></tr>
<tr><td>down</td><td>j</td><td>down</td></tr>
<tr><td>enter</td><td></td><td>quit with result</td></tr>
<tr><td>f</td><td></td><td>filter</td></tr>
<tr><td>g</td><td></td><td>go to</td></tr>
<tr><td>h</td><td>left</td><td>back</td></tr>
<tr><td>k</td><td>up</td><td>up</td></tr>
<tr><td>l</td><td>right</td><td>enter</td></tr>
<tr><td>q</td><td></td><td>quit</td></tr>
<tr><td>r</td><td></td><td>rename</td></tr>
<tr><td>s</td><td></td><td>sort</td></tr>
<tr><td>space</td><td>v</td><td>toggle selection</td></tr>
<tr><td>~</td><td></td><td>go home</td></tr>
<tr><td>[0-9]</td><td></td><td>input</td></tr>
</tbody></table>
<h3 id="debug-error"><a class="header" href="#debug-error">debug error</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>enter</td><td></td><td>open logs in editor</td></tr>
<tr><td>esc</td><td></td><td>escape</td></tr>
<tr><td>q</td><td></td><td>quit</td></tr>
</tbody></table>
<h3 id="recover"><a class="header" href="#recover">recover</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>esc</td><td></td><td>escape</td></tr>
</tbody></table>
<h3 id="filter"><a class="header" href="#filter">filter</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>R</td><td></td><td>relative does not contain</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>ctrl-r</td><td></td><td>reset filters</td></tr>
<tr><td>ctrl-u</td><td></td><td>clear filters</td></tr>
<tr><td>enter</td><td>esc</td><td>done</td></tr>
<tr><td>r</td><td></td><td>relative does contain</td></tr>
</tbody></table>
<h3 id="number"><a class="header" href="#number">number</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>down</td><td>j</td><td>to down</td></tr>
<tr><td>enter</td><td></td><td>to index</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
<tr><td>k</td><td>up</td><td>to up</td></tr>
<tr><td>[0-9]</td><td></td><td>input</td></tr>
</tbody></table>
<h3 id="go-to"><a class="header" href="#go-to">go to</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
<tr><td>f</td><td></td><td>follow symlink</td></tr>
<tr><td>g</td><td></td><td>top</td></tr>
<tr><td>x</td><td></td><td>open in gui</td></tr>
</tbody></table>
<h3 id="search"><a class="header" href="#search">search</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>ctrl-n</td><td>down</td><td>down</td></tr>
<tr><td>ctrl-p</td><td>up</td><td>up</td></tr>
<tr><td>enter</td><td>esc</td><td>focus</td></tr>
<tr><td>left</td><td></td><td>back</td></tr>
<tr><td>right</td><td></td><td>enter</td></tr>
<tr><td>tab</td><td></td><td>toggle selection</td></tr>
</tbody></table>
<h3 id="selection-ops"><a class="header" href="#selection-ops">selection ops</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>c</td><td></td><td>copy here</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
<tr><td>m</td><td></td><td>move here</td></tr>
<tr><td>x</td><td></td><td>open in gui</td></tr>
</tbody></table>
<h3 id="action-to"><a class="header" href="#action-to">action to</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>!</td><td></td><td>shell</td></tr>
<tr><td>c</td><td></td><td>create</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>e</td><td></td><td>open in editor</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
<tr><td>l</td><td></td><td>logs</td></tr>
<tr><td>m</td><td></td><td>toggle mouse</td></tr>
<tr><td>q</td><td></td><td>quit options</td></tr>
<tr><td>s</td><td></td><td>selection operations</td></tr>
<tr><td>[0-9]</td><td></td><td>go to index</td></tr>
</tbody></table>
<h3 id="create"><a class="header" href="#create">create</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>d</td><td></td><td>create directory</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
<tr><td>f</td><td></td><td>create file</td></tr>
</tbody></table>
<h3 id="create-file"><a class="header" href="#create-file">create file</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>enter</td><td></td><td>create file</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<h3 id="create-directory"><a class="header" href="#create-directory">create directory</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>enter</td><td></td><td>create directory</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<h3 id="rename"><a class="header" href="#rename">rename</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>enter</td><td></td><td>rename</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<h3 id="duplicate-as"><a class="header" href="#duplicate-as">duplicate as</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>enter</td><td></td><td>duplicate</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<h3 id="delete"><a class="header" href="#delete">delete</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>D</td><td></td><td>force delete</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>d</td><td></td><td>delete</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<h3 id="sort"><a class="header" href="#sort">sort</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>!</td><td></td><td>reverse sorters</td></tr>
<tr><td>E</td><td></td><td>by canonical extension reverse</td></tr>
<tr><td>M</td><td></td><td>by canonical mime essence reverse</td></tr>
<tr><td>N</td><td></td><td>by node type reverse</td></tr>
<tr><td>R</td><td></td><td>by relative path reverse</td></tr>
<tr><td>S</td><td></td><td>by size reverse</td></tr>
<tr><td>backspace</td><td></td><td>remove last sorter</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>ctrl-r</td><td></td><td>reset sorters</td></tr>
<tr><td>ctrl-u</td><td></td><td>clear sorters</td></tr>
<tr><td>e</td><td></td><td>by canonical extension</td></tr>
<tr><td>enter</td><td>esc</td><td>done</td></tr>
<tr><td>m</td><td></td><td>by canonical mime essence</td></tr>
<tr><td>n</td><td></td><td>by node type</td></tr>
<tr><td>r</td><td></td><td>by relative path</td></tr>
<tr><td>s</td><td></td><td>by size</td></tr>
</tbody></table>
<h3 id="filter-1"><a class="header" href="#filter-1">filter</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>R</td><td></td><td>relative does not contain</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>ctrl-r</td><td></td><td>reset filters</td></tr>
<tr><td>ctrl-u</td><td></td><td>clear filters</td></tr>
<tr><td>enter</td><td>esc</td><td>done</td></tr>
<tr><td>r</td><td></td><td>relative does contain</td></tr>
</tbody></table>
<h3 id="relative-path-does-contain"><a class="header" href="#relative-path-does-contain">relative path does contain</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>enter</td><td></td><td>apply filter</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<h3 id="relative-path-does-not-contain"><a class="header" href="#relative-path-does-not-contain">relative path does not contain</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>enter</td><td></td><td>apply filter</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<h3 id="switch-layout"><a class="header" href="#switch-layout">switch layout</a></h3>
<table><thead><tr><th>key</th><th>remaps</th><th>action</th></tr></thead><tbody>
<tr><td>1</td><td></td><td>default</td></tr>
<tr><td>2</td><td></td><td>no help menu</td></tr>
<tr><td>3</td><td></td><td>no selection panel</td></tr>
<tr><td>4</td><td></td><td>no help or selection</td></tr>
<tr><td>ctrl-c</td><td></td><td>terminate</td></tr>
<tr><td>esc</td><td></td><td>cancel</td></tr>
</tbody></table>
<div style="break-before: page; page-break-before: always;"></div><h1 id="debug-key-bindings"><a class="header" href="#debug-key-bindings">Debug Key Bindings</a></h1>
<p>If you need help debugging or understanding key bindings DYI way, you can
create a <code>test.lua</code> file with the following script, launch xplr with
<code>xplr --extra-config test.lua</code>, press <code>#</code> and play around.</p>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key[&quot;#&quot;] = {
help = &quot;test&quot;,
messages = {
&quot;PopMode&quot;,
{ SwitchModeCustom = &quot;test&quot; },
},
}
xplr.config.modes.custom.test = {
name = &quot;test&quot;,
key_bindings = {
on_key = {
[&quot;1&quot;] = {
messages = {
{ LogInfo = &quot;on_key called&quot; },
},
},
a = {
messages = {
{ LogInfo = &quot;on_key called&quot; },
},
},
[&quot;`&quot;] = {
messages = {
{ LogInfo = &quot;on_key called&quot; },
},
},
tab = {
messages = {
{ LogInfo = &quot;on_key called&quot; },
},
},
esc = {
messages = {
&quot;PopMode&quot;,
},
},
[&quot;ctrl-c&quot;] = {
messages = {
&quot;Terminate&quot;,
},
},
f1 = {
messages = {
{ LogInfo = &quot;on_key called&quot; },
},
},
},
on_alphabet = {
messages = {
{ LogInfo = &quot;on_alphabet called&quot; },
},
},
on_number = {
messages = {
{ LogInfo = &quot;on_number called&quot; },
},
},
-- on_alphanumeric = {
-- messages = {
-- { LogInfo = &quot;on_alphanumeric called&quot; },
-- },
-- },
on_special_character = {
messages = {
{ LogInfo = &quot;on_special_character called&quot; },
},
},
-- on_character = {
-- messages = {
-- { LogInfo = &quot;on_character called&quot; },
-- },
-- },
on_navigation = {
messages = {
{ LogInfo = &quot;on_navigation called&quot; },
},
},
on_function = {
messages = {
{ LogInfo = &quot;on_function called&quot; },
},
},
default = {
messages = {
{ LogInfo = &quot;default called&quot; },
},
},
},
}
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="node-type"><a class="header" href="#node-type">Node Type</a></h1>
<p>A node-type contains the following fields:</p>
<ul>
<li><a href="node-type.html#meta">meta</a></li>
<li><a href="style.html">style</a></li>
</ul>
<h3 id="meta"><a class="header" href="#meta">meta</a></h3>
<p>Type: mapping of string and string</p>
<p>A meta field can contain custom metadata about a node. By default, the &quot;icon&quot;
metadata is set for the <a href="node_types.html#directory">directory</a>, <a href="node_types.html#file">file</a>, and
<a href="node_types.html#symlink">symlink</a> nodes.</p>
<p>Example:</p>
<pre><code class="language-lua">xplr.config.node_types.file = {
meta = {
icon = &quot;f&quot;,
foo = &quot;bar&quot;,
}
}
</code></pre>
<h2 id="also-see"><a class="header" href="#also-see">Also See:</a></h2>
<ul>
<li><a href="node_types.html">xplr.config.node_types</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="layout"><a class="header" href="#layout">Layout</a></h1>
<h4 id="example-defining-custom-layout-1"><a class="header" href="#example-defining-custom-layout-1">Example: Defining Custom Layout</a></h4>
<p><a href="https://gifyu.com/image/1X38"><img src="https://s6.gifyu.com/images/layout.png" alt="layout.png" /></a></p>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
Horizontal = {
config = {
margin = 1,
horizontal_margin = 2,
vertical_margin = 3,
constraints = {
{ Percentage = 50 },
{ Percentage = 50 },
}
},
splits = {
&quot;Table&quot;,
&quot;HelpMenu&quot;,
}
}
}
</code></pre>
<p>A layout can be one of the following:</p>
<ul>
<li><a href="layout.html#nothing">&quot;Nothing&quot;</a></li>
<li><a href="layout.html#table">&quot;Table&quot;</a></li>
<li><a href="layout.html#inputandlogs">&quot;InputAndLogs&quot;</a></li>
<li><a href="layout.html#selection">&quot;Selection&quot;</a></li>
<li><a href="layout.html#helpmenu">&quot;HelpMenu&quot;</a></li>
<li><a href="layout.html#sortandfilter">&quot;SortAndFilter&quot;</a></li>
<li>{ <a href="layout.html#custom-content">CustomContent</a> = { <a href="layout.html#title">title</a>, <a href="layout.html#body">body</a> }</li>
<li>{ <a href="layout.html#horizontal">Horizontal</a> = { <a href="layout.html#layout-config">config</a>, <a href="layout.html#splits">splits</a> }</li>
<li>{ <a href="layout.html#vertical">Vertical</a> = { <a href="layout.html#layout-config">config</a>, <a href="layout.html#splits">splits</a> }</li>
</ul>
<h3 id="nothing"><a class="header" href="#nothing">Nothing</a></h3>
<p>This layout contains a blank panel.</p>
<h3 id="table"><a class="header" href="#table">Table</a></h3>
<p>This layout contains the table displaying the files and directories in the
current directory.</p>
<h3 id="inputandlogs"><a class="header" href="#inputandlogs">InputAndLogs</a></h3>
<p>This layout contains the panel displaying the input prompt and logs.</p>
<h3 id="selection"><a class="header" href="#selection">Selection</a></h3>
<p>This layout contains the panel displaying the selected paths.</p>
<h3 id="helpmenu"><a class="header" href="#helpmenu">HelpMenu</a></h3>
<p>This layout contains the panel displaying the help menu for the current mode in
real-time.</p>
<h3 id="sortandfilter"><a class="header" href="#sortandfilter">SortAndFilter</a></h3>
<p>This layout contains the panel displaying the pipeline of sorters and filters
applied of the list of paths being displayed.</p>
<h3 id="horizontal"><a class="header" href="#horizontal">Horizontal</a></h3>
<p>This is a special layout that splits the panel into two horizontal parts.</p>
<p>It contains the following information:</p>
<ul>
<li><a href="layout.html#layout-config">config</a></li>
<li><a href="layout.html#splits">splits</a></li>
</ul>
<h3 id="vertical"><a class="header" href="#vertical">Vertical</a></h3>
<p>This is a special layout that splits the panel into two vertical parts.</p>
<p>It contains the following information:</p>
<ul>
<li><a href="layout.html#layout-config">config</a></li>
<li><a href="layout.html#splits">splits</a></li>
</ul>
<h2 id="layout-config"><a class="header" href="#layout-config">Layout Config</a></h2>
<p>A layout config contains the following information:</p>
<ul>
<li><a href="layout.html#margin">margin</a></li>
<li><a href="layout.html#horizontal_margin">horizontal_margin</a></li>
<li><a href="layout.html#vertical_margin">vertical_margin</a></li>
<li><a href="layout.html#constraints">constraints</a></li>
</ul>
<h3 id="margin"><a class="header" href="#margin">margin</a></h3>
<p>Type: nullable integer</p>
<p>The width of the margin in all direction.</p>
<h3 id="horizontal_margin"><a class="header" href="#horizontal_margin">horizontal_Margin</a></h3>
<p>Type: nullable integer</p>
<p>The width of the horizontal margins. Overwrites the <a href="layout.html#margin">margin</a> value.</p>
<h3 id="vertical_margin"><a class="header" href="#vertical_margin">vertical_Margin</a></h3>
<p>Type: nullable integer</p>
<p>The width of the vertical margins. Overwrites the <a href="layout.html#margin">margin</a> value.</p>
<h3 id="constraints"><a class="header" href="#constraints">constraints</a></h3>
<p>Type: nullable list of <a href="layout.html#constraint">Constraint</a></p>
<p>The constraints applied on the layout.</p>
<h2 id="constraint"><a class="header" href="#constraint">Constraint</a></h2>
<p>A constraint can be one of the following:</p>
<ul>
<li>{ Percentage = int }</li>
<li>{ Ratio = { int, int } }</li>
<li>{ Length = { int }</li>
<li>{ LengthLessThanScreenHeight = int }</li>
<li>{ LengthLessThanScreenWidth = int }</li>
<li>{ LengthLessThanLayoutHeight = int }</li>
<li>{ LengthLessThanLayoutWidth = int }</li>
<li>{ Max = int }</li>
<li>{ MaxLessThanScreenHeight = int }</li>
<li>{ MaxLessThanScreenWidth = int }</li>
<li>{ MaxLessThanLayoutHeight = int }</li>
<li>{ MaxLessThanLayoutWidth = int }</li>
<li>{ Min = int }</li>
<li>{ MinLessThanScreenHeight = int }</li>
<li>{ MinLessThanScreenWidth = int }</li>
<li>{ MinLessThanLayoutHeight = int }</li>
<li>{ MinLessThanLayoutWidth = int }</li>
</ul>
<p>TODO: document each constraint.</p>
<h2 id="splits"><a class="header" href="#splits">splits</a></h2>
<p>Type: list of <a href="layout.html#layout">Layout</a></p>
<p>The list of child layouts to fit into the parent layout.</p>
<h2 id="custom-content"><a class="header" href="#custom-content">Custom Content</a></h2>
<p>Custom content is a special layout to render something custom.
It contains the following information:</p>
<ul>
<li><a href="layout.html#title">title</a></li>
<li><a href="layout.html#body">body</a></li>
</ul>
<h3 id="title"><a class="header" href="#title">title</a></h3>
<p>Type: nullable string</p>
<p>The title of the panel.</p>
<h3 id="body"><a class="header" href="#body">body</a></h3>
<p>Type: <a href="layout.html#content-body">Content Body</a></p>
<p>The body of the panel.</p>
<h2 id="content-body"><a class="header" href="#content-body">Content Body</a></h2>
<p>Content body can be one of the following:</p>
<ul>
<li><a href="layout.html#static-paragraph">StaticParagraph</a></li>
<li><a href="layout.html#dynamic-paragraph">DynamicParagraph</a></li>
<li><a href="layout.html#static-list">StaticList</a></li>
<li><a href="layout.html#dynamic-list">DynamicList</a></li>
<li><a href="layout.html#static-table">StaticTable</a></li>
<li><a href="layout.html#dynamic-table">DynamicTable</a></li>
</ul>
<h3 id="static-paragraph"><a class="header" href="#static-paragraph">Static Paragraph</a></h3>
<p>A paragraph to render. It contains the following fields:</p>
<ul>
<li><strong>render</strong> (string): The string to render.</li>
</ul>
<h4 id="example-render-a-custom-static-paragraph"><a class="header" href="#example-render-a-custom-static-paragraph">Example: Render a custom static paragraph</a></h4>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
CustomContent = {
title = &quot;custom title&quot;,
body = {
StaticParagraph = { render = &quot;custom body&quot; },
},
},
}
</code></pre>
<h3 id="dynamic-paragraph"><a class="header" href="#dynamic-paragraph">Dynamic Paragraph</a></h3>
<p>A <a href="layout.html#content-renderer">Lua function</a> to render a custom paragraph.
It contains the following fields:</p>
<ul>
<li><strong>render</strong> (string): The <a href="layout.html#content-renderer">lua function</a> that returns the paragraph to
render.</li>
</ul>
<h4 id="example-render-a-custom-dynamic-paragraph"><a class="header" href="#example-render-a-custom-dynamic-paragraph">Example: Render a custom dynamic paragraph</a></h4>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
CustomContent = {
title = &quot;custom title&quot;,
body = { DynamicParagraph = { render = &quot;custom.render_layout&quot; } },
},
}
xplr.fn.custom.render_layout = function(ctx)
return ctx.app.pwd
end
</code></pre>
<h3 id="static-list"><a class="header" href="#static-list">Static List</a></h3>
<p>A list to render. It contains the following fields:</p>
<ul>
<li><strong>render</strong> (list of string): The list to render.</li>
</ul>
<h4 id="example-render-a-custom-static-list"><a class="header" href="#example-render-a-custom-static-list">Example: Render a custom static list</a></h4>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
CustomContent = {
title = &quot;custom title&quot;,
body = {
StaticList = { render = { &quot;1&quot;, &quot;2&quot;, &quot;3&quot; } },
},
},
}
</code></pre>
<h3 id="dynamic-list"><a class="header" href="#dynamic-list">Dynamic List</a></h3>
<p>A <a href="layout.html#content-renderer">Lua function</a> to render a custom list.
It contains the following fields:</p>
<ul>
<li><strong>render</strong> (string): The <a href="layout.html#content-renderer">lua function</a> that returns the list to render.</li>
</ul>
<h4 id="example-render-a-custom-dynamic-list"><a class="header" href="#example-render-a-custom-dynamic-list">Example: Render a custom dynamic list</a></h4>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
CustomContent = {
title = &quot;custom title&quot;,
body = { DynamicList = { render = &quot;custom.render_layout&quot; } },
},
}
xplr.fn.custom.render_layout = function(ctx)
return {
ctx.app.pwd,
ctx.app.version,
tostring(ctx.app.pid),
}
end
</code></pre>
<h3 id="static-table"><a class="header" href="#static-table">Static Table</a></h3>
<p>A table to render. It contains the following fields:</p>
<ul>
<li><strong>widths</strong> (list of <a href="layout.html#constraint">Constraint</a>): Width of the columns.</li>
<li><strong>col_spacing</strong> (nullable int): Spacing between columns. Defaults to 1.</li>
<li><strong>render</strong> (list of list of string): The rows and columns to render.</li>
</ul>
<h4 id="example-render-a-custom-static-table"><a class="header" href="#example-render-a-custom-static-table">Example: Render a custom static table</a></h4>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
CustomContent = {
title = &quot;custom title&quot;,
body = {
StaticTable = {
widths = {
{ Percentage = 50 },
{ Percentage = 50 },
},
col_spacing = 1,
render = {
{ &quot;a&quot;, &quot;b&quot; },
{ &quot;c&quot;, &quot;d&quot; },
},
},
},
},
}
</code></pre>
<h3 id="dynamic-table"><a class="header" href="#dynamic-table">Dynamic Table</a></h3>
<p>A <a href="layout.html#content-renderer">Lua function</a> to render a custom table.
It contains the following fields:</p>
<ul>
<li><strong>widths</strong> (list of <a href="layout.html#constraint">Constraint</a>): Width of the columns.</li>
<li><strong>col_spacing</strong> (nullable int): Spacing between columns. Defaults to 1.</li>
<li><strong>render</strong> (string): The <a href="layout.html#content-renderer">lua function</a> that returns the table to render.</li>
</ul>
<h4 id="example-render-a-custom-dynamic-table"><a class="header" href="#example-render-a-custom-dynamic-table">Example: Render a custom dynamic table</a></h4>
<pre><code class="language-lua">xplr.config.layouts.builtin.default = {
CustomContent = {
title = &quot;custom title&quot;,
body = {
DynamicTable = {
widths = {
{ Percentage = 50 },
{ Percentage = 50 },
},
col_spacing = 1,
render = &quot;custom.render_layout&quot;,
},
},
},
}
xplr.fn.custom.render_layout = function(ctx)
return {
{ &quot;&quot;, &quot;&quot; },
{ &quot;Layout height&quot;, tostring(ctx.layout_size.height) },
{ &quot;Layout width&quot;, tostring(ctx.layout_size.width) },
{ &quot;&quot;, &quot;&quot; },
{ &quot;Screen height&quot;, tostring(ctx.screen_size.height) },
{ &quot;Screen width&quot;, tostring(ctx.screen_size.width) },
}
end
</code></pre>
<h2 id="content-renderer"><a class="header" href="#content-renderer">Content Renderer</a></h2>
<p>It is a Lua function that receives <a href="layout.html#content-renderer-argument">a special argument</a> as input and
returns some output that can be rendered in the UI. It is used to render
content body for the custom dynamic layouts.</p>
<h2 id="content-renderer-argument"><a class="header" href="#content-renderer-argument">Content Renderer Argument</a></h2>
<p>It contains the following information:</p>
<ul>
<li><a href="layout.html#size">layout_size</a></li>
<li><a href="layout.html#size">screen_size</a></li>
<li><a href="layout.html#app">app</a></li>
</ul>
<h3 id="size"><a class="header" href="#size">Size</a></h3>
<p>It contains the following information:</p>
<ul>
<li>x</li>
<li>y</li>
<li>height</li>
<li>width</li>
</ul>
<p>Every field is of integer type.</p>
<h3 id="app"><a class="header" href="#app">app</a></h3>
<p>This is a lightweight version of the <a href="lua-function-calls.html#lua-context">Lua Context</a>. In this context, the
heavyweight fields like <a href="lua-function-calls.html#directory_buffer">directory_buffer</a> are omitted for performance
reasons.</p>
<p>Hence, only the following fields are avilable.</p>
<ul>
<li><a href="lua-function-calls.html#version">version</a></li>
<li><a href="lua-function-calls.html#pwd">pwd</a></li>
<li><a href="lua-function-calls.html#focused_node">focused_node</a></li>
<li><a href="lua-function-calls.html#selection">selection</a></li>
<li><a href="lua-function-calls.html#mode">mode</a></li>
<li><a href="lua-function-calls.html#layout">layout</a></li>
<li><a href="lua-function-calls.html#input_buffer">input_buffer</a></li>
<li><a href="lua-function-calls.html#pid">pid</a></li>
<li><a href="lua-function-calls.html#session_path">session_path</a></li>
<li><a href="lua-function-calls.html#explorer_config">explorer_config</a></li>
</ul>
<h2 id="also-see-1"><a class="header" href="#also-see-1">Also See:</a></h2>
<ul>
<li><a href="layouts.html">xplr.config.layouts</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="mode"><a class="header" href="#mode">Mode</a></h1>
<p>A mode contains the following information:</p>
<ul>
<li><a href="mode.html#name">name</a></li>
<li><a href="mode.html#help">help</a></li>
<li><a href="mode.html#extra_help">extra_help</a></li>
<li><a href="mode.html#key_bindings">key_bindings</a></li>
<li><a href="mode.html#layout">layout</a></li>
</ul>
<h3 id="name"><a class="header" href="#name">name</a></h3>
<p>Type: string</p>
<p>This is the name of the mode visible in the help menu.</p>
<h3 id="help-1"><a class="header" href="#help-1">help</a></h3>
<p>Type: nullable string</p>
<p>If specified, the help menu will display this instead of the auto generated
mappings.</p>
<h3 id="extra_help"><a class="header" href="#extra_help">extra_help</a></h3>
<p>Type: nullable string</p>
<p>If specified, the help menu will display this along-side the auto generated
help menu.</p>
<h3 id="key_bindings"><a class="header" href="#key_bindings">key_bindings</a></h3>
<p>Type: <a href="configure-key-bindings.html#key-bindings">Key Bindings</a></p>
<p>The key bindings available in that mode.</p>
<h3 id="layout-1"><a class="header" href="#layout-1">layout</a></h3>
<p>Type: nullable <a href="layout.html#layout">Layout</a></p>
<p>If specified, this layout will be used to render the UI.</p>
<h2 id="also-see-2"><a class="header" href="#also-see-2">Also See:</a></h2>
<ul>
<li><a href="modes.html">xplr.config.modes</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="message"><a class="header" href="#message">Message</a></h1>
<p>You can think of xplr as a server. Just like web servers listen to HTTP
requests, xplr listens to <a href="messages.html">messages</a>.</p>
<p>You can send these messages to an xplr session in the following ways:</p>
<ul>
<li>Via command-line (currently during start-up only, using <code>--on-load</code>)</li>
<li>Via <a href="key-bindings.html">key bindings</a></li>
<li>Via <a href="lua-function-calls.html">Lua function calls</a></li>
<li>Via shell command using the <a href="environment-variables-and-pipes.html#input-pipe">input pipe</a></li>
<li>Via socket (coming soon)</li>
</ul>
<h3 id="format"><a class="header" href="#format">Format</a></h3>
<p>To send messages using the <a href="key-bindings.html">key bindings</a> or
<a href="lua-function-calls.html">Lua function calls</a>, messages are represented in
<a href="https://www.lua.org/">Lua</a> syntax. For example:</p>
<ul>
<li>&quot;Quit&quot;</li>
<li>{ FocusPath = &quot;/path/to/file&quot; }</li>
<li>{ Call = { command = &quot;bash&quot;, args = { &quot;-c&quot;, &quot;read -p test&quot; } } }</li>
</ul>
<p>However, to send messages using the <a href="environment-variables-and-pipes.html#input-pipe">input pipe</a>, they need to be
represented using
<a href="http://yaml.org/">YAML</a> (or <a href="https://www.json.org">JSON</a>) syntax. For example:</p>
<ul>
<li>Quit</li>
<li>FocusPath: &quot;/path/to/file&quot;</li>
<li>Call: { command: bash, args: [&quot;-c&quot;, &quot;read -p test&quot;] }</li>
</ul>
<h2 id="also-see-3"><a class="header" href="#also-see-3">Also See:</a></h2>
<ul>
<li><a href="messages.html">Full List of Messages</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="full-list-of-messages"><a class="header" href="#full-list-of-messages">Full List of Messages</a></h1>
<p>xplr messages categorized based on their purpose.</p>
<h2 id="categories"><a class="header" href="#categories">Categories</a></h2>
<ul>
<li><a href="messages.html#exploring">Exploring</a></li>
<li><a href="messages.html#screen">Screen</a></li>
<li><a href="messages.html#navigation">Navigation</a></li>
<li><a href="messages.html#reading-input">Reading Input</a></li>
<li><a href="messages.html#switching-mode">Switching Mode</a></li>
<li><a href="messages.html#switching-layout">Switching Layout</a></li>
<li><a href="messages.html#executing-commands">Executing Commands</a></li>
<li><a href="messages.html#calling-lua-functions">Calling Lua Functions</a></li>
<li><a href="messages.html#select-operations">Select Operations</a></li>
<li><a href="messages.html#filter-operations">Filter Operations</a></li>
<li><a href="messages.html#sort-operations">Sort Operations</a></li>
<li><a href="messages.html#mouse-operations">Mouse Operations</a></li>
<li><a href="messages.html#fifo-operations">Fifo Operations</a></li>
<li><a href="messages.html#logging">Logging</a></li>
<li><a href="messages.html#debugging">Debugging</a></li>
<li><a href="messages.html#quit-options">Quit Options</a></li>
</ul>
<h3 id="exploring"><a class="header" href="#exploring">Exploring</a></h3>
<h4 id="explorepwd"><a class="header" href="#explorepwd">ExplorePwd</a></h4>
<p>Explore the present working directory and register the filtered nodes.
This operation is expensive. So, try to avoid using it too often.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ExplorePwd&quot;</li>
<li>YAML: <code>ExplorePwd</code></li>
</ul>
<h4 id="explorepwdasync"><a class="header" href="#explorepwdasync">ExplorePwdAsync</a></h4>
<p>Explore the present working directory and register the filtered nodes
asynchronously. This operation happens asynchronously. That means, the
xplr directory buffers won't be updated immediately. Hence, it needs to
be used with care and probably with special checks in place. To explore
$PWD synchronously, use <code>ExplorePwd</code> instead.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ExplorePwdAsync&quot;</li>
<li>YAML: <code>ExplorePwdAsync</code></li>
</ul>
<h4 id="exploreparentsasync"><a class="header" href="#exploreparentsasync">ExploreParentsAsync</a></h4>
<p>Explore the present working directory along with its parents and
register the filtered nodes. This operation happens asynchronously.
That means, the xplr directory buffers won't be updated immediately.
Hence, it needs to be used with care and probably with special checks
in place. To explore just the <code>$PWD</code> synchronously, use <code>ExplorePwd</code>
instead.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ExploreParentsAsync&quot;</li>
<li>YAML: <code>ExploreParentsAsync</code></li>
</ul>
<h3 id="screen"><a class="header" href="#screen">Screen</a></h3>
<h4 id="clearscreen"><a class="header" href="#clearscreen">ClearScreen</a></h4>
<p>Clear the screen.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ClearScreen&quot;</li>
<li>YAML: <code>ClearScreen</code></li>
</ul>
<h4 id="refresh"><a class="header" href="#refresh">Refresh</a></h4>
<p>Refresh the screen.
But it will not re-explore the directory if the working directory is
the same. If there is some change in the working directory and you want
to re-explore it, use the <code>Explore</code> message instead.
Also, it will not clear the screen. Use <code>ClearScreen</code> for that.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;Refresh&quot;</li>
<li>YAML: <code>Refresh</code></li>
</ul>
<h3 id="navigation"><a class="header" href="#navigation">Navigation</a></h3>
<h4 id="focusnext"><a class="header" href="#focusnext">FocusNext</a></h4>
<p>Focus next node.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusNext&quot;</li>
<li>YAML: <code>FocusNext</code></li>
</ul>
<h4 id="focusnextbyrelativeindex"><a class="header" href="#focusnextbyrelativeindex">FocusNextByRelativeIndex</a></h4>
<p>Focus on the <code>n</code>th node relative to the current focus where <code>n</code> is a
given value.</p>
<p>Type: { FocusNextByRelativeIndex = int }</p>
<p>Example:</p>
<ul>
<li>Lua: { FocusNextByRelativeIndex = 2 }</li>
<li>YAML: <code>FocusNextByRelativeIndex: 2</code></li>
</ul>
<h4 id="focusnextbyrelativeindexfrominput"><a class="header" href="#focusnextbyrelativeindexfrominput">FocusNextByRelativeIndexFromInput</a></h4>
<p>Focus on the <code>n</code>th node relative to the current focus where <code>n</code> is read
from the input buffer.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusNextByRelativeIndexFromInput&quot;</li>
<li>YAML: <code>FocusNextByRelativeIndexFromInput</code></li>
</ul>
<h4 id="focusprevious"><a class="header" href="#focusprevious">FocusPrevious</a></h4>
<p>Focus on the previous item.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusPrevious&quot;</li>
<li>YAML: <code>FocusPrevious</code></li>
</ul>
<h4 id="focuspreviousbyrelativeindex"><a class="header" href="#focuspreviousbyrelativeindex">FocusPreviousByRelativeIndex</a></h4>
<p>Focus on the <code>-n</code>th node relative to the current focus where <code>n</code> is a
given value.</p>
<p>Type: { FocusPreviousByRelativeIndex = int }</p>
<p>Example:</p>
<ul>
<li>Lua: <code>{ FocusPreviousByRelativeIndex = 2 }</code></li>
<li>YAML: <code>FocusPreviousByRelativeIndex: 2</code></li>
</ul>
<h4 id="focuspreviousbyrelativeindexfrominput"><a class="header" href="#focuspreviousbyrelativeindexfrominput">FocusPreviousByRelativeIndexFromInput</a></h4>
<p>Focus on the <code>-n</code>th node relative to the current focus where <code>n</code> is
read from the input buffer.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusPreviousByRelativeIndexFromInput&quot;</li>
<li>YAML: <code>FocusPreviousByRelativeIndexFromInput</code></li>
</ul>
<h4 id="focusfirst"><a class="header" href="#focusfirst">FocusFirst</a></h4>
<p>Focus on the first node.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusFirst&quot;</li>
<li>YAML: <code>FocusFirst</code></li>
</ul>
<h4 id="focuslast"><a class="header" href="#focuslast">FocusLast</a></h4>
<p>Focus on the last node.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusLast&quot;</li>
<li>YAML: <code>FocusLast</code></li>
</ul>
<h4 id="focuspath"><a class="header" href="#focuspath">FocusPath</a></h4>
<p>Focus on the given path.</p>
<p>Type: { FocusPath = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: <code>{ FocusPath = &quot;/path/to/file&quot; }</code></li>
<li>YAML: <code>FocusPath: /path/to/file</code></li>
</ul>
<h4 id="focuspathfrominput"><a class="header" href="#focuspathfrominput">FocusPathFromInput</a></h4>
<p>Focus on the path read from input buffer.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusPathFromInput&quot;</li>
<li>YAML: <code>FocusPathFromInput</code></li>
</ul>
<h4 id="focusbyindex"><a class="header" href="#focusbyindex">FocusByIndex</a></h4>
<p>Focus on the absolute <code>n</code>th node where <code>n</code> is a given value.</p>
<p>Type: { FocusByIndex = int }</p>
<p>Example:</p>
<ul>
<li>Lua: { FocusByIndex = 2 }</li>
<li>YAML: <code>FocusByIndex: 2</code></li>
</ul>
<h4 id="focusbyindexfrominput"><a class="header" href="#focusbyindexfrominput">FocusByIndexFromInput</a></h4>
<p>Focus on the absolute <code>n</code>th node where <code>n</code> is read from the input buffer.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;FocusByIndexFromInput&quot;</li>
<li>YAML: <code>FocusByIndexFromInput</code></li>
</ul>
<h4 id="focusbyfilename"><a class="header" href="#focusbyfilename">FocusByFileName</a></h4>
<p><strong>YAML:</strong> <code>FocusByFileName: string</code></p>
<p>Focus on the file by name from the present working directory.</p>
<p>Type: { FocusByFileName = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { FocusByFileName = &quot;filename.ext&quot; }</li>
<li>YAML: <code>FocusByFileName: filename.ext</code></li>
</ul>
<h4 id="changedirectory"><a class="header" href="#changedirectory">ChangeDirectory</a></h4>
<p>Change the present working directory ($PWD)</p>
<p>Type: { ChangeDirectory = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { ChangeDirectory = &quot;/path/to/directory&quot; }</li>
<li>YAML: <code>ChangeDirectory: /path/to/directory</code></li>
</ul>
<h4 id="enter"><a class="header" href="#enter">Enter</a></h4>
<p>Enter into the currently focused path if it's a directory.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;Enter&quot;</li>
<li>YAML: <code>Enter</code></li>
</ul>
<h4 id="back"><a class="header" href="#back">Back</a></h4>
<p>Go back to the parent directory.</p>
<p>Example:</p>
<ul>
<li>Lua:&quot;Back&quot;</li>
<li>YAML: <code>Back</code></li>
</ul>
<h4 id="lastvisitedpath"><a class="header" href="#lastvisitedpath">LastVisitedPath</a></h4>
<p>Go to the last path visited.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;LastVisitedPath&quot;</li>
<li>YAML: <code>LastVisitedPath</code></li>
</ul>
<h4 id="nextvisitedpath"><a class="header" href="#nextvisitedpath">NextVisitedPath</a></h4>
<p>Go to the next path visited.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;NextVisitedPath&quot;</li>
<li>YAML: <code>NextVisitedPath</code></li>
</ul>
<h4 id="followsymlink"><a class="header" href="#followsymlink">FollowSymlink</a></h4>
<p>Follow the symlink under focus to its actual location.</p>
<p>Example:</p>
<p>Lua: &quot;FollowSymlink&quot;
YAML: <code>FollowSymlink</code></p>
<h3 id="reading-input"><a class="header" href="#reading-input">Reading Input</a></h3>
<h4 id="updateinputbuffer"><a class="header" href="#updateinputbuffer">UpdateInputBuffer</a></h4>
<p>Update the input buffer using cursor based operations.</p>
<p>Type: { UpdateInputBuffer = <a href="https://xplr.dev/en/input-operation">Input Opertaion</a> }</p>
<p>Example:</p>
<ul>
<li>Lua: { UpdateInputBuffer = &quot;GoToPreviousWord&quot; }</li>
<li>YAML: <code>UpdateInputBuffer: GoToPreviousWord</code></li>
</ul>
<h4 id="updateinputbufferfromkey"><a class="header" href="#updateinputbufferfromkey">UpdateInputBufferFromKey</a></h4>
<p>Update the input buffer from the key read from keyboard input.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;UpdateInputBufferFromKey&quot;</li>
<li>YAML: <code>UpdateInputBufferFromKey</code></li>
</ul>
<h4 id="bufferinput"><a class="header" href="#bufferinput">BufferInput</a></h4>
<p>Append/buffer the given string into the input buffer.</p>
<p>Type: { BufferInput = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { BufferInput = &quot;foo&quot; }</li>
<li>YAML: <code>BufferInput: foo</code></li>
</ul>
<h4 id="bufferinputfromkey"><a class="header" href="#bufferinputfromkey">BufferInputFromKey</a></h4>
<p>Append/buffer the characted read from a keyboard input into the
input buffer.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;BufferInputFromKey&quot;</li>
<li>YAML: <code>BufferInputFromKey</code></li>
</ul>
<h4 id="setinputbuffer"><a class="header" href="#setinputbuffer">SetInputBuffer</a></h4>
<p>Set/rewrite the input buffer with the given string.
When the input buffer is not-null (even if empty string)
it will show in the UI.</p>
<p>Type: { SetInputBuffer = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SetInputBuffer = &quot;foo&quot; }</li>
<li>YAML: <code>SetInputBuffer: foo</code></li>
</ul>
<h4 id="removeinputbufferlastcharacter"><a class="header" href="#removeinputbufferlastcharacter">RemoveInputBufferLastCharacter</a></h4>
<p>Remove input buffer's last character.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;RemoveInputBufferLastCharacter&quot;</li>
<li>YAML: <code>RemoveInputBufferLastCharacter</code></li>
</ul>
<h4 id="removeinputbufferlastword"><a class="header" href="#removeinputbufferlastword">RemoveInputBufferLastWord</a></h4>
<p>Remove input buffer's last word.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;RemoveInputBufferLastWord&quot;</li>
<li>YAML: <code>RemoveInputBufferLastWord</code></li>
</ul>
<h4 id="resetinputbuffer"><a class="header" href="#resetinputbuffer">ResetInputBuffer</a></h4>
<p>Reset the input buffer back to null. It will not show in the UI.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ResetInputBuffer&quot;</li>
<li>YAML: <code>ResetInputBuffer</code></li>
</ul>
<h3 id="switching-mode"><a class="header" href="#switching-mode">Switching Mode</a></h3>
<h4 id="switchmode"><a class="header" href="#switchmode">SwitchMode</a></h4>
<p>Switch input <a href="https://xplr.dev/en/modes">mode</a>.</p>
<p>Type : { SwitchMode = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchMode = &quot;default&quot; }</li>
<li>YAML: SwitchMode: default</li>
</ul>
<blockquote>
<p><strong>NOTE:</strong> To be specific about which mode to switch to, use
<code>SwitchModeBuiltinKeepingInputBuffer</code> or
<code>SwitchModeCustomKeepingInputBuffer</code> instead.</p>
</blockquote>
<h4 id="switchmodekeepinginputbuffer"><a class="header" href="#switchmodekeepinginputbuffer">SwitchModeKeepingInputBuffer</a></h4>
<p>Switch input <a href="https://xplr.dev/en/modes">mode</a>.
It keeps the input buffer.</p>
<p>Type: { SwitchModeKeepingInputBuffer = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchModeKeepingInputBuffer = &quot;default&quot; }</li>
<li>YAML: <code>SwitchModeKeepingInputBuffer: default</code></li>
</ul>
<blockquote>
<p><strong>NOTE:</strong> To be specific about which mode to switch to, use
<code>SwitchModeBuiltinKeepingInputBuffer</code> or
<code>SwitchModeCustomKeepingInputBuffer</code> instead.</p>
</blockquote>
<h4 id="switchmodebuiltin"><a class="header" href="#switchmodebuiltin">SwitchModeBuiltin</a></h4>
<p>Switch to a <a href="https://xplr.dev/en/modes#builtin">builtin mode</a>.
It clears the input buffer.</p>
<p>Type: { SwitchModeBuiltin = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchModeBuiltin = &quot;default&quot; }</li>
<li>YAML: <code>SwitchModeBuiltin: default</code></li>
</ul>
<h4 id="switchmodebuiltinkeepinginputbuffer"><a class="header" href="#switchmodebuiltinkeepinginputbuffer">SwitchModeBuiltinKeepingInputBuffer</a></h4>
<p>Switch to a <a href="https://xplr.dev/en/modes#builtin">builtin mode</a>.
It keeps the input buffer.</p>
<p>Type: { SwitchModeBuiltinKeepingInputBuffer = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchModeBuiltinKeepingInputBuffer = &quot;default&quot; }</li>
<li>YAML: <code>SwitchModeBuiltinKeepingInputBuffer: default</code></li>
</ul>
<h4 id="switchmodecustom"><a class="header" href="#switchmodecustom">SwitchModeCustom</a></h4>
<p>Switch to a <a href="https://xplr.dev/en/modes#custom">custom mode</a>.
It clears the input buffer.</p>
<p>Type: { SwitchModeCustom = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchModeCustom = &quot;my_custom_mode&quot; }</li>
<li>YAML: <code>SwitchModeCustom: my_custom_mode</code></li>
</ul>
<h4 id="switchmodecustomkeepinginputbuffer"><a class="header" href="#switchmodecustomkeepinginputbuffer">SwitchModeCustomKeepingInputBuffer</a></h4>
<p>Switch to a <a href="https://xplr.dev/en/modes#custom">custom mode</a>.
It keeps the input buffer.</p>
<p>Type: { SwitchModeCustomKeepingInputBuffer = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchModeCustomKeepingInputBuffer = &quot;my_custom_mode&quot; }</li>
<li>YAML: <code>SwitchModeCustomKeepingInputBuffer: my_custom_mode</code></li>
</ul>
<h4 id="popmode"><a class="header" href="#popmode">PopMode</a></h4>
<p>Pop the last mode from the history and switch to it.
It clears the input buffer.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;PopMode&quot;</li>
<li>YAML: <code>PopMode</code></li>
</ul>
<h4 id="popmodekeepinginputbuffer"><a class="header" href="#popmodekeepinginputbuffer">PopModeKeepingInputBuffer</a></h4>
<p>Pop the last mode from the history and switch to it.
It keeps the input buffer.</p>
<p>Example:</p>
<ul>
<li>Lua: PopModeKeepingInputBuffer</li>
<li>YAML: <code>PopModeKeepingInputBuffer</code></li>
</ul>
<h3 id="switching-layout"><a class="header" href="#switching-layout">Switching Layout</a></h3>
<h4 id="switchlayout"><a class="header" href="#switchlayout">SwitchLayout</a></h4>
<p>Switch <a href="https://xplr.dev/en/layouts">layout</a>.</p>
<p>Type: { SwitchLayout = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchLayout = &quot;default&quot; }</li>
<li>YAML: <code>SwitchLayout: default</code></li>
</ul>
<blockquote>
<p><strong>NOTE:</strong> To be specific about which layout to switch to, use <code>SwitchLayoutBuiltin</code> or
<code>SwitchLayoutCustom</code> instead.</p>
</blockquote>
<h4 id="switchlayoutbuiltin"><a class="header" href="#switchlayoutbuiltin">SwitchLayoutBuiltin</a></h4>
<p>Switch to a <a href="https://xplr.dev/en/layouts#builtin">builtin layout</a>.</p>
<p>Type: { SwitchLayoutBuiltin = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchLayoutBuiltin = &quot;default&quot; }</li>
<li>YAML: <code>SwitchLayoutBuiltin: default</code></li>
</ul>
<h4 id="switchlayoutcustom"><a class="header" href="#switchlayoutcustom">SwitchLayoutCustom</a></h4>
<p>Switch to a <a href="https://xplr.dev/en/layouts#custom">custom layout</a>.</p>
<p>Type: { SwitchLayoutCustom = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SwitchLayoutCustom = &quot;my_custom_layout&quot; }</li>
<li>YAML: <code>SwitchLayoutCustom: my_custom_layout</code></li>
</ul>
<h3 id="executing-commands"><a class="header" href="#executing-commands">Executing Commands</a></h3>
<h4 id="call"><a class="header" href="#call">Call</a></h4>
<p>Call a shell command with the given arguments.
Note that the arguments will be shell-escaped.
So to read the variables, the <code>-c</code> option of the shell
can be used.
You may need to pass <code>ExplorePwd</code> depening on the expectation.</p>
<p>Type: { Call = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { Call = { command = &quot;bash&quot;, args = { &quot;-c&quot;, &quot;read -p test&quot; } } }</li>
<li>YAML: <code>Call: { command: bash, args: [&quot;-c&quot;, &quot;read -p test&quot;] }</code></li>
</ul>
<h4 id="callsilently"><a class="header" href="#callsilently">CallSilently</a></h4>
<p>Like <code>Call</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p>Type: { CallSilently = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: <code>{ CallSilently = { command = &quot;tput&quot;, args = { &quot;bell&quot; } } }</code></li>
<li>YAML: <code>CallSilently: { command: tput, args: [&quot;bell&quot;] }</code></li>
</ul>
<h4 id="bashexec"><a class="header" href="#bashexec">BashExec</a></h4>
<p>An alias to <code>Call: {command: bash, args: [&quot;-c&quot;, &quot;{string}&quot;], silent: false}</code>
where <code>{string}</code> is the given value.</p>
<p>Type: { BashExec = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { BashExec = &quot;read -p test&quot; }</li>
<li>YAML: <code>BashExec: &quot;read -p test&quot;</code></li>
</ul>
<h4 id="bashexecsilently"><a class="header" href="#bashexecsilently">BashExecSilently</a></h4>
<p>Like <code>BashExec</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p>Type: { BashExecSilently = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { BashExecSilently = &quot;tput bell&quot; }</li>
<li>YAML: <code>BashExecSilently: &quot;tput bell&quot;</code></li>
</ul>
<h3 id="calling-lua-functions"><a class="header" href="#calling-lua-functions">Calling Lua Functions</a></h3>
<h4 id="calllua"><a class="header" href="#calllua">CallLua</a></h4>
<p>Call a Lua function.</p>
<p>A <a href="https://xplr.dev/en/lua-function-calls#lua-context">Lua Context</a>
object will be passed to the function as argument.
The function can optionally return a list of messages for xplr to
handle after the executing the function.</p>
<p>Type: { CallLua = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { CallLua = &quot;custom.some_custom_funtion&quot; }</li>
<li>YAML: <code>CallLua: custom.some_custom_funtion</code></li>
</ul>
<h4 id="callluasilently"><a class="header" href="#callluasilently">CallLuaSilently</a></h4>
<p>Like <code>CallLua</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p>Type: { CallLuaSilently = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { CallLuaSilently = &quot;custom.some_custom_function&quot; }</li>
<li>YAML: <code>CallLuaSilently: custom.some_custom_function</code></li>
</ul>
<h4 id="luaeval"><a class="header" href="#luaeval">LuaEval</a></h4>
<p>Execute Lua code without needing to define a function.</p>
<p>If the <code>string</code> is a callable, xplr will try to call it with with the
<a href="https://xplr.dev/en/lua-function-calls#lua-context">Lua Context</a>
argument.</p>
<p>Type: { LuaEval = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { LuaEval = [[return { { LogInfo = io.read() } }]] }</li>
<li>Lua: { LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] }</li>
<li>YAML: <code>LuaEval: &quot;return { { LogInfo = io.read() } }&quot;</code></li>
<li>YAML: <code>LuaEval: &quot;function(app) return { { LogInfo = app.pwd } } end&quot;</code></li>
</ul>
<h4 id="luaevalsilently"><a class="header" href="#luaevalsilently">LuaEvalSilently</a></h4>
<p>Like <code>LuaEval</code> but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.</p>
<p>Type: { LuaEvalSilently = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { LuaEvalSilently = [[return { { LogInfo = &quot;foo&quot; } }]] }</li>
<li>YAML: <code>LuaEvalSilently: &quot;return { { LogInfo = 'foo' } }&quot;</code></li>
</ul>
<h3 id="select-operations"><a class="header" href="#select-operations">Select Operations</a></h3>
<h4 id="select"><a class="header" href="#select">Select</a></h4>
<p>Select the focused node.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;Select&quot;</li>
<li>YAML: <code>Select</code></li>
</ul>
<h4 id="selectall"><a class="header" href="#selectall">SelectAll</a></h4>
<p>Select all the visible nodes.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;SelectAll&quot;</li>
<li>YAML: <code>SelectAll</code></li>
</ul>
<h4 id="selectpath"><a class="header" href="#selectpath">SelectPath</a></h4>
<p>Select the given path.</p>
<p>Type: { SelectPath = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { SelectPath = &quot;/path/to/file&quot; }</li>
<li>YAML: <code>SelectPath: /path/to/file</code></li>
</ul>
<h4 id="unselect"><a class="header" href="#unselect">UnSelect</a></h4>
<p>Unselect the focused node.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;UnSelect&quot;</li>
<li>YAML: <code>UnSelect</code></li>
</ul>
<h4 id="unselectall"><a class="header" href="#unselectall">UnSelectAll</a></h4>
<p>Unselect all the visible nodes.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;UnSelectAll&quot;</li>
<li>YAML: <code>UnSelectAll</code></li>
</ul>
<h4 id="unselectpath"><a class="header" href="#unselectpath">UnSelectPath</a></h4>
<p>UnSelect the given path.</p>
<p>Type: { UnSelectPath = &quot;string)&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { UnSelectPath = &quot;/path/to/file&quot; }</li>
<li>YAML: <code>UnSelectPath: /path/to/file</code></li>
</ul>
<h4 id="toggleselection"><a class="header" href="#toggleselection">ToggleSelection</a></h4>
<p>Toggle selection on the focused node.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ToggleSelection&quot;</li>
<li>YAML <code>ToggleSelection</code></li>
</ul>
<h4 id="toggleselectall"><a class="header" href="#toggleselectall">ToggleSelectAll</a></h4>
<p>Toggle between select all and unselect all.
Example:</p>
<ul>
<li>Lua: &quot;ToggleSelectAll&quot;</li>
<li>YAML: <code>ToggleSelectAll</code></li>
</ul>
<h4 id="toggleselectionbypath"><a class="header" href="#toggleselectionbypath">ToggleSelectionByPath</a></h4>
<p>Toggle selection by file path.</p>
<p>Type: { ToggleSelectionByPath = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { ToggleSelectionByPath = &quot;/path/to/file&quot; }</li>
<li>YAML: <code>ToggleSelectionByPath: /path/to/file</code></li>
</ul>
<h4 id="clearselection"><a class="header" href="#clearselection">ClearSelection</a></h4>
<p>Clear the selection.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ClearSelection&quot;</li>
<li>YAML: <code>ClearSelection</code></li>
</ul>
<h3 id="filter-operations"><a class="header" href="#filter-operations">Filter Operations</a></h3>
<h4 id="addnodefilter"><a class="header" href="#addnodefilter">AddNodeFilter</a></h4>
<p>Add a <a href="https://xplr.dev/en/filtering#filter">filter</a> to exclude nodes
while exploring directories.</p>
<p>Type: { AddNodeFilter = { filter = <a href="https://xplr.dev/en/filtering#filter">Filter</a>, input = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { AddNodeFilter = { filter = &quot;RelativePathDoesStartWith&quot;, input = &quot;foo&quot; } }</li>
<li>YAML: <code>AddNodeFilter: { filter: RelativePathDoesStartWith, input: foo }</code></li>
</ul>
<h4 id="removenodefilter"><a class="header" href="#removenodefilter">RemoveNodeFilter</a></h4>
<p>Remove an existing <a href="https://xplr.dev/en/filtering#filter">filter</a>.</p>
<p>Type: { RemoveNodeFilter = { filter = <a href="https://xplr.dev/en/filtering">Filter</a>, input = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { RemoveNodeFilter: { filter: &quot;RelativePathDoesStartWith&quot;, input: &quot;foo&quot; } }</li>
<li>YAML: <code>RemoveNodeFilter: { filter: RelativePathDoesStartWith, input: foo }</code></li>
</ul>
<h4 id="togglenodefilter"><a class="header" href="#togglenodefilter">ToggleNodeFilter</a></h4>
<p>Remove a <a href="https://xplr.dev/en/filtering#filter">filter</a> if it exists,
else, add a it.</p>
<p>Type: { ToggleNodeFilter = { filter = <a href="https://xplr.dev/en/filtering">Filter</a>, input = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { ToggleNodeFilter = { filter = &quot;RelativePathDoesStartWith&quot;, input = &quot;foo&quot; } }</li>
<li>YAML: <code>ToggleNodeFilter: { filter: RelativePathDoesStartWith, input: foo }</code></li>
</ul>
<h4 id="addnodefilterfrominput"><a class="header" href="#addnodefilterfrominput">AddNodeFilterFromInput</a></h4>
<p>Add a node <a href="https://xplr.dev/en/filtering#filter">filter</a> reading the
input from the buffer.</p>
<p>Type: { AddNodeFilterFromInput = <a href="https://xplr.dev/en/filtering">Filter</a> }</p>
<p>Example:</p>
<ul>
<li>Lua: { AddNodeFilterFromInput = &quot;RelativePathDoesStartWith&quot; }</li>
<li>YAML: <code>AddNodeFilterFromInput: RelativePathDoesStartWith</code></li>
</ul>
<h4 id="removenodefilterfrominput"><a class="header" href="#removenodefilterfrominput">RemoveNodeFilterFromInput</a></h4>
<p>Remove a node <a href="https://xplr.dev/en/filtering#filter">filter</a> reading
the input from the buffer.</p>
<p>Type: { RemoveNodeFilterFromInput = <a href="https://xplr.dev/en/filtering">Filter</a> }</p>
<p>Example:</p>
<ul>
<li>Lua: { RemoveNodeFilterFromInput = &quot;RelativePathDoesStartWith&quot; }</li>
<li>YAML: <code>RemoveNodeFilterFromInput: RelativePathDoesStartWith</code></li>
</ul>
<h4 id="removelastnodefilter"><a class="header" href="#removelastnodefilter">RemoveLastNodeFilter</a></h4>
<p>Remove the last node <a href="https://xplr.dev/en/filtering">filter</a>.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;RemoveLastNodeFilter&quot;</li>
<li>YAML: <code>RemoveLastNodeFilter</code></li>
</ul>
<h4 id="resetnodefilters"><a class="header" href="#resetnodefilters">ResetNodeFilters</a></h4>
<p>Reset the node <a href="https://xplr.dev/en/filtering">filters</a> back to the
default configuration.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ResetNodeFilters&quot;</li>
<li>YAML: <code>ResetNodeFilters</code></li>
</ul>
<h4 id="clearnodefilters"><a class="header" href="#clearnodefilters">ClearNodeFilters</a></h4>
<p>Clear all the node <a href="https://xplr.dev/en/filtering">filters</a>.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ClearNodeFilters&quot;</li>
<li>YAML: <code>ClearNodeFilters</code></li>
</ul>
<h3 id="sort-operations"><a class="header" href="#sort-operations">Sort Operations</a></h3>
<h4 id="addnodesorter"><a class="header" href="#addnodesorter">AddNodeSorter</a></h4>
<p>Add a <a href="https://xplr.dev/en/sorting#sorter">sorter</a> to sort nodes while
exploring directories.</p>
<p>Type: { AddNodeSorter = { sorter = <a href="https://xplr.dev/en/sorting#sorter">Sorter</a>, reverse = bool } }</p>
<p>Example:</p>
<ul>
<li>Lua: { AddNodeSorter = { sorter = &quot;ByRelativePath&quot;, reverse = false } }</li>
<li>YAML: <code>AddNodeSorter: { sorter: ByRelativePath, reverse: false }</code></li>
</ul>
<h4 id="removenodesorter"><a class="header" href="#removenodesorter">RemoveNodeSorter</a></h4>
<p>Remove an existing <a href="https://xplr.dev/en/sorting#sorter">sorter</a>.</p>
<p>Type: { RemoveNodeSorter = <a href="https://xplr.dev/en/sorting#sorter">Sorter</a> }</p>
<p>Example:</p>
<ul>
<li>Lua: { RemoveNodeSorter = &quot;ByRelativePath&quot; }</li>
<li>YAML: <code>RemoveNodeSorter: ByRelativePath</code></li>
</ul>
<h4 id="reversenodesorter"><a class="header" href="#reversenodesorter">ReverseNodeSorter</a></h4>
<p>Reverse a node <a href="https://xplr.dev/en/sorting#sorter">sorter</a>.</p>
<p>Type: { ReverseNodeSorter = <a href="https://xplr.dev/en/sorting#sorter">Sorter</a> }</p>
<p>Example:</p>
<ul>
<li>Lua: { ReverseNodeSorter = &quot;ByRelativePath&quot; }</li>
<li>YAML: <code>ReverseNodeSorter: ByRelativePath</code></li>
</ul>
<h4 id="togglenodesorter"><a class="header" href="#togglenodesorter">ToggleNodeSorter</a></h4>
<p>Remove a <a href="https://xplr.dev/en/sorting#sorter">sorter</a> if it exists,
else, add a it.</p>
<p>Type: { ToggleNodeSorter = { sorter = <a href="https://xplr.dev/en/sorting#sorter">Sorter</a>, reverse = bool } }</p>
<p>Example:</p>
<ul>
<li>Lua: { ToggleSorterSorter: { sorter = &quot;ByRelativePath&quot;, reverse = false } }</li>
<li>YAML: <code>ToggleSorterSorter: {sorter: ByRelativePath, reverse: false }</code></li>
</ul>
<h4 id="reversenodesorters"><a class="header" href="#reversenodesorters">ReverseNodeSorters</a></h4>
<p>Reverse the node <a href="https://xplr.dev/en/sorting#sorter">sorters</a>.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ReverseNodeSorters&quot;</li>
<li>YAML: <code>ReverseNodeSorters</code></li>
</ul>
<h4 id="removelastnodesorter"><a class="header" href="#removelastnodesorter">RemoveLastNodeSorter</a></h4>
<p>Remove the last node <a href="https://xplr.dev/en/sorting#sorter">sorter</a>.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;RemoveLastNodeSorter&quot;</li>
<li>YAML: <code>RemoveLastNodeSorter</code></li>
</ul>
<h4 id="resetnodesorters"><a class="header" href="#resetnodesorters">ResetNodeSorters</a></h4>
<p>Reset the node <a href="https://xplr.dev/en/sorting#sorter">sorters</a> back to
the default configuration.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ResetNodeSorters&quot;</li>
<li>YAML: <code>ResetNodeSorters</code></li>
</ul>
<h4 id="clearnodesorters"><a class="header" href="#clearnodesorters">ClearNodeSorters</a></h4>
<p>Clear all the node <a href="https://xplr.dev/en/sorting#sorter">sorters</a>.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ClearNodeSorters&quot;</li>
<li>YAML: <code>ClearNodeSorters</code></li>
</ul>
<h3 id="mouse-operations"><a class="header" href="#mouse-operations">Mouse Operations</a></h3>
<h4 id="enablemouse"><a class="header" href="#enablemouse">EnableMouse</a></h4>
<p>Enable mouse</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;EnableMouse&quot;</li>
<li>YAML: <code>EnableMouse</code></li>
</ul>
<h4 id="disablemouse"><a class="header" href="#disablemouse">DisableMouse</a></h4>
<p>Disable mouse</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;DisableMouse&quot;</li>
<li>YAML: <code>DisableMouse</code></li>
</ul>
<h4 id="togglemouse"><a class="header" href="#togglemouse">ToggleMouse</a></h4>
<p>Toggle mouse</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;ToggleMouse&quot;</li>
<li>YAML: <code>ToggleMouse</code></li>
</ul>
<h3 id="fifo-operations"><a class="header" href="#fifo-operations">Fifo Operations</a></h3>
<h4 id="startfifo"><a class="header" href="#startfifo">StartFifo</a></h4>
<p>Start piping the focused path to the given fifo path</p>
<p>Type: { StartFifo = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { StartFifo = &quot;/tmp/xplr.fifo }</li>
<li>YAML: <code>StartFifo: /tmp/xplr.fifo</code></li>
</ul>
<h4 id="stopfifo"><a class="header" href="#stopfifo">StopFifo</a></h4>
<p>Close the active fifo and stop piping.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;StopFifo&quot;</li>
<li>YAML: <code>StopFifo</code></li>
</ul>
<h4 id="togglefifo"><a class="header" href="#togglefifo">ToggleFifo</a></h4>
<p>Toggle betwen {Start|Stop}Fifo</p>
<p>Type: { ToggleFifo = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { ToggleFifo = &quot;/path/to/fifo&quot; }</li>
<li>YAML: <code>ToggleFifo: /path/to/fifo</code></li>
</ul>
<h3 id="logging"><a class="header" href="#logging">Logging</a></h3>
<h4 id="loginfo"><a class="header" href="#loginfo">LogInfo</a></h4>
<p>Log information message.</p>
<p>Type: { LogInfo = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { LogInfo = &quot;launching satellite&quot; }</li>
<li>YAML: <code>LogInfo: launching satellite</code></li>
</ul>
<h4 id="logsuccess"><a class="header" href="#logsuccess">LogSuccess</a></h4>
<p>Log a success message.</p>
<p>Type: { LogSuccess = &quot;String&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { LogSuccess = &quot;satellite reached destination&quot; }</li>
<li>YAML: <code>LogSuccess: satellite reached destination</code></li>
</ul>
<h4 id="logwarning"><a class="header" href="#logwarning">LogWarning</a></h4>
<p>Log an warning message.</p>
<p>Type: { LogWarning = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { LogWarning = &quot;satellite is heating&quot; }</li>
<li>YAML: <code>LogWarning: satellite is heating</code></li>
</ul>
<h4 id="logerror"><a class="header" href="#logerror">LogError</a></h4>
<p>Log an error message.</p>
<p>Type: { LogError = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { LogError = &quot;satellite crashed&quot; }</li>
<li>YAML: <code>LogError: satellite crashed</code></li>
</ul>
<h3 id="debugging"><a class="header" href="#debugging">Debugging</a></h3>
<h4 id="debug"><a class="header" href="#debug">Debug</a></h4>
<p>Write the application state to a file, without quitting. Also helpful
for debugging.</p>
<p>Type: { Debug = &quot;string&quot; }</p>
<p>Example:</p>
<ul>
<li>Lua: { Debug = &quot;/path/to/file&quot; }</li>
<li>YAML: <code>Debug: /path/to/file</code></li>
</ul>
<h3 id="quit-options"><a class="header" href="#quit-options">Quit Options</a></h3>
<h4 id="quit"><a class="header" href="#quit">Quit</a></h4>
<p>Example:</p>
<ul>
<li>Lua: &quot;Quit&quot;</li>
<li>YAML: <code>Quit</code></li>
</ul>
<p>Quit with returncode zero (success).</p>
<h4 id="printpwdandquit"><a class="header" href="#printpwdandquit">PrintPwdAndQuit</a></h4>
<p>Print $PWD and quit.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;PrintPwdAndQuit&quot;</li>
<li>YAML: <code>PrintPwdAndQuit</code></li>
</ul>
<h4 id="printfocuspathandquit"><a class="header" href="#printfocuspathandquit">PrintFocusPathAndQuit</a></h4>
<p>Print the path under focus and quit. It can be empty string if there's
nothing to focus.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;PrintFocusPathAndQuit&quot;</li>
<li>YAML: <code>PrintFocusPathAndQuit</code></li>
</ul>
<h4 id="printselectionandquit"><a class="header" href="#printselectionandquit">PrintSelectionAndQuit</a></h4>
<p>Print the selected paths and quit. It can be empty is no path is
selected.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;PrintSelectionAndQuit&quot;</li>
<li>YAML: <code>PrintSelectionAndQuit</code></li>
</ul>
<h4 id="printresultandquit"><a class="header" href="#printresultandquit">PrintResultAndQuit</a></h4>
<p>Print the selected paths if it's not empty, else, print the focused
node's path.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;PrintResultAndQuit&quot;</li>
<li>YAML: <code>PrintResultAndQuit</code></li>
</ul>
<h4 id="printappstateandquit"><a class="header" href="#printappstateandquit">PrintAppStateAndQuit</a></h4>
<p>Print the state of application in YAML format. Helpful for debugging or
generating the default configuration file.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;PrintAppStateAndQuit&quot;</li>
<li>YAML: <code>PrintAppStateAndQuit</code></li>
</ul>
<h4 id="terminate"><a class="header" href="#terminate">Terminate</a></h4>
<p>Terminate the application with a non-zero return code.</p>
<p>Example:</p>
<ul>
<li>Lua: &quot;Terminate&quot;</li>
<li>YAML: <code>Terminate</code></li>
</ul>
<h2 id="also-see-4"><a class="header" href="#also-see-4">Also See:</a></h2>
<ul>
<li><a href="message.html">Message</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="input-operation"><a class="header" href="#input-operation">Input Operation</a></h1>
<p>Cursor based input operation can be one of the following:</p>
<ul>
<li>{ SetCursor = int }</li>
<li>{ InsertCharacter = str }</li>
<li>&quot;GoToPreviousCharacter&quot;</li>
<li>&quot;GoToNextCharacter&quot;</li>
<li>&quot;GoToPreviousWord&quot;</li>
<li>&quot;GoToNextWord&quot;</li>
<li>&quot;GoToStart&quot;</li>
<li>&quot;GoToEnd&quot;</li>
<li>&quot;DeletePreviousCharacter&quot;</li>
<li>&quot;DeleteNextCharacter&quot;</li>
<li>&quot;DeletePreviousWord&quot;</li>
<li>&quot;DeleteNextWord&quot;</li>
<li>&quot;DeleteLine&quot;</li>
</ul>
<h2 id="also-see-5"><a class="header" href="#also-see-5">Also See:</a></h2>
<ul>
<li><a href="message.html">Message</a></li>
<li><a href="messages.html">Full List of Messages</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="borders"><a class="header" href="#borders">Borders</a></h1>
<p>xplr allows customizing the shape and style of the borders.</p>
<h3 id="border"><a class="header" href="#border">Border</a></h3>
<p>A border can be one of the following:</p>
<ul>
<li>Top</li>
<li>Right</li>
<li>Bottom</li>
<li>Left</li>
</ul>
<h3 id="border-type"><a class="header" href="#border-type">Border Type</a></h3>
<p>A border can be one of the following:</p>
<ul>
<li>Plain</li>
<li>Rounded</li>
<li>Double</li>
<li>Thick</li>
</ul>
<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-lua">xplr.config.general.panel_ui.default.borders = { &quot;Top&quot;, &quot;Right&quot;, &quot;Bottom&quot;, &quot;Left&quot; }
xplr.config.general.panel_ui.default.border_type = &quot;Thick&quot;
xplr.config.general.panel_ui.default.border_style.fg = &quot;Black&quot;
xplr.config.general.panel_ui.default.border_style.bg = &quot;Gray&quot;
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="style"><a class="header" href="#style">Style</a></h1>
<p>A style object contains the following information:</p>
<ul>
<li><a href="style.html#fg">fg</a></li>
<li><a href="style.html#bg">bg</a></li>
<li><a href="style.html#add_modifiers">add_modifiers</a></li>
<li><a href="style.html#sub_modifiers">sub_modifiers</a></li>
</ul>
<h3 id="fg"><a class="header" href="#fg">fg</a></h3>
<p>Type: nullable <a href="style.html#color">Color</a></p>
<p>The foreground color.</p>
<h3 id="bg"><a class="header" href="#bg">bg</a></h3>
<p>Type: nullable <a href="style.html#color">Color</a></p>
<p>The background color.</p>
<h3 id="add_modifiers"><a class="header" href="#add_modifiers">add_modifiers</a></h3>
<p>Type: nullable list of <a href="style.html#modifier">Modifier</a></p>
<p>Modifiers to add.</p>
<h3 id="sub_modifiers"><a class="header" href="#sub_modifiers">sub_modifiers</a></h3>
<p>Type: nullable list of <a href="style.html#modifier">Modifier</a></p>
<p>Modifiers to remove.</p>
<h2 id="color"><a class="header" href="#color">Color</a></h2>
<p>Color can be one of the following:</p>
<ul>
<li>&quot;Reset&quot;</li>
<li>&quot;Black&quot;</li>
<li>&quot;Red&quot;</li>
<li>&quot;Green&quot;</li>
<li>&quot;Yellow&quot;</li>
<li>&quot;Blue&quot;</li>
<li>&quot;Magenta&quot;</li>
<li>&quot;Cyan&quot;</li>
<li>&quot;Gray&quot;</li>
<li>&quot;DarkGray&quot;</li>
<li>&quot;LightRed&quot;</li>
<li>&quot;LightGreen&quot;</li>
<li>&quot;LightYellow&quot;</li>
<li>&quot;LightBlue&quot;</li>
<li>&quot;LightMagenta&quot;</li>
<li>&quot;LightCyan&quot;</li>
<li>&quot;White&quot;</li>
<li>{ Rgb = { int, int, int } }</li>
<li>{ Indexed = int }</li>
</ul>
<h2 id="modifier"><a class="header" href="#modifier">Modifier</a></h2>
<p>Modifier can be one of the following:</p>
<ul>
<li>&quot;Bold&quot;</li>
<li>&quot;Dim&quot;</li>
<li>&quot;Italic&quot;</li>
<li>&quot;Underlined&quot;</li>
<li>&quot;SlowBlink&quot;</li>
<li>&quot;RapidBlink&quot;</li>
<li>&quot;Reversed&quot;</li>
<li>&quot;Hidden&quot;</li>
<li>&quot;CrossedOut&quot;</li>
</ul>
<h2 id="example-1"><a class="header" href="#example-1">Example</a></h2>
<pre><code class="language-lua">xplr.config.general.prompt.style.fg = &quot;Red&quot;
xplr.config.general.prompt.style.bg = { Rgb = { 100, 150, 200 } }
xplr.config.general.prompt.style.add_modifiers = { &quot;Bold&quot;, &quot;Italic&quot; }
xplr.config.general.prompt.style.sub_modifiers = { &quot;Hidden&quot; }
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="sorting"><a class="header" href="#sorting">Sorting</a></h1>
<p>xplr supports sorting paths by different properties. The sorting mechanism
works like a pipeline, which in visible in the <code>Sort &amp; filter</code> panel.</p>
<p>Example:</p>
<pre><code>size↑ [i]rel↓ [c]dir↑ [c]file↑ sym↑
</code></pre>
<p>This line means that the nodes visible in the table will be first sorted by
it's size, then by case insensitive relative path, then by the
canonical (symlink resolved) type of the node, and finally by whether or not
the node is a symlink.</p>
<p>The arrows denote the order.</p>
<p>Each part of this pipeline is called <a href="sorting.html#node-sorter-applicable">Node Sorter Applicable</a>.</p>
<h2 id="node-sorter-applicable"><a class="header" href="#node-sorter-applicable">Node Sorter Applicable</a></h2>
<p>It contains the following information:</p>
<ul>
<li><a href="sorting.html#sorter">sorter</a></li>
<li><a href="sorting.html#reverse">reverse</a></li>
</ul>
<h3 id="sorter"><a class="header" href="#sorter">sorter</a></h3>
<p>A sorter can be one of the following:</p>
<ul>
<li>&quot;ByRelativePath&quot;</li>
<li>&quot;ByIRelativePath&quot;</li>
<li>&quot;ByExtension&quot;</li>
<li>&quot;ByIsDir&quot;</li>
<li>&quot;ByIsFile&quot;</li>
<li>&quot;ByIsSymlink&quot;</li>
<li>&quot;ByIsBroken&quot;</li>
<li>&quot;ByIsReadonly&quot;</li>
<li>&quot;ByMimeEssence&quot;</li>
<li>&quot;BySize&quot;</li>
<li>&quot;ByCanonicalAbsolutePath&quot;</li>
<li>&quot;ByICanonicalAbsolutePath&quot;</li>
<li>&quot;ByCanonicalExtension&quot;</li>
<li>&quot;ByCanonicalIsDir&quot;</li>
<li>&quot;ByCanonicalIsFile&quot;</li>
<li>&quot;ByCanonicalIsReadonly&quot;</li>
<li>&quot;ByCanonicalMimeEssence&quot;</li>
<li>&quot;ByCanonicalSize&quot;</li>
<li>&quot;BySymlinkAbsolutePath&quot;</li>
<li>&quot;ByISymlinkAbsolutePath&quot;</li>
<li>&quot;BySymlinkExtension&quot;</li>
<li>&quot;BySymlinkIsDir&quot;</li>
<li>&quot;BySymlinkIsFile&quot;</li>
<li>&quot;BySymlinkIsReadonly&quot;</li>
<li>&quot;BySymlinkMimeEssence&quot;</li>
<li>&quot;BySymlinkSize&quot;</li>
</ul>
<p>TODO: document each</p>
<h3 id="reverse"><a class="header" href="#reverse">reverse</a></h3>
<p>Type: boolean</p>
<p>It defined the direction of the order.</p>
<h2 id="example-2"><a class="header" href="#example-2">Example</a></h2>
<pre><code class="language-lua">xplr.config.general.initial_sorting = {
{ sorter = &quot;ByCanonicalIsDir&quot;, reverse = true },
{ sorter = &quot;ByIRelativePath&quot;, reverse = false },
}
</code></pre>
<p>This snippet defines the initial sorting logic to be applied when xplr loads.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="filtering"><a class="header" href="#filtering">Filtering</a></h1>
<p>xplr supports filtering paths by different properties. The filtering mechanism
works like a pipeline, which in visible in the <code>Sort &amp; filter</code> panel.</p>
<p>Example:</p>
<pre><code>rel!^. [i]abs=~abc [i]rel!~xyz
</code></pre>
<p>This line means that the nodes visible on the table will first be filtered by
the condition: <em>relative path does not start with <code>.</code></em>, then by the condition:
<em>absolute path contains <code>abc</code> (case insensitive)</em>, and finally by the
condition: <em>relative path does not contain <code>xyz</code></em> (case insensitive).</p>
<p>Each part of this pipeline is called <a href="filtering.html#node-filter-applicable">Node Filter Applicable</a>.</p>
<h2 id="node-filter-applicable"><a class="header" href="#node-filter-applicable">Node Filter Applicable</a></h2>
<p>It contains the following information:</p>
<ul>
<li><a href="filtering.html#filter">filter</a></li>
<li><a href="filtering.html#input">input</a></li>
</ul>
<h3 id="filter-2"><a class="header" href="#filter-2">filter</a></h3>
<p>A filter can be one of the following:</p>
<ul>
<li>&quot;RelativePathIs&quot;</li>
<li>&quot;RelativePathIsNot&quot;</li>
<li>&quot;IRelativePathIs&quot;</li>
<li>&quot;IRelativePathIsNot&quot;</li>
<li>&quot;RelativePathDoesStartWith&quot;</li>
<li>&quot;RelativePathDoesNotStartWith&quot;</li>
<li>&quot;IRelativePathDoesStartWith&quot;</li>
<li>&quot;IRelativePathDoesNotStartWith&quot;</li>
<li>&quot;RelativePathDoesContain&quot;</li>
<li>&quot;RelativePathDoesNotContain&quot;</li>
<li>&quot;IRelativePathDoesContain&quot;</li>
<li>&quot;IRelativePathDoesNotContain&quot;</li>
<li>&quot;RelativePathDoesEndWith&quot;</li>
<li>&quot;RelativePathDoesNotEndWith&quot;</li>
<li>&quot;IRelativePathDoesEndWith&quot;</li>
<li>&quot;IRelativePathDoesNotEndWith&quot;</li>
<li>&quot;AbsolutePathIs&quot;</li>
<li>&quot;AbsolutePathIsNot&quot;</li>
<li>&quot;IAbsolutePathIs&quot;</li>
<li>&quot;IAbsolutePathIsNot&quot;</li>
<li>&quot;AbsolutePathDoesStartWith&quot;</li>
<li>&quot;AbsolutePathDoesNotStartWith&quot;</li>
<li>&quot;IAbsolutePathDoesStartWith&quot;</li>
<li>&quot;IAbsolutePathDoesNotStartWith&quot;</li>
<li>&quot;AbsolutePathDoesContain&quot;</li>
<li>&quot;AbsolutePathDoesNotContain&quot;</li>
<li>&quot;IAbsolutePathDoesContain&quot;</li>
<li>&quot;IAbsolutePathDoesNotContain&quot;</li>
<li>&quot;AbsolutePathDoesEndWith&quot;</li>
<li>&quot;AbsolutePathDoesNotEndWith&quot;</li>
<li>&quot;IAbsolutePathDoesEndWith&quot;</li>
<li>&quot;IAbsolutePathDoesNotEndWith&quot;</li>
</ul>
<p>TODO: document each</p>
<h3 id="input"><a class="header" href="#input">input</a></h3>
<p>Type: string</p>
<p>The input for the condition.</p>
<h2 id="example-3"><a class="header" href="#example-3">Example:</a></h2>
<pre><code class="language-lua">ToggleNodeFilter = {
filter = &quot;RelativePathDoesNotStartWith&quot;,
input = &quot;.&quot;
}
</code></pre>
<p>Here, <code>ToggleNodeFilter</code> is a <a href="message.html">message</a> that adds or removes
(toggles) the filter applied.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="column-renderer"><a class="header" href="#column-renderer">Column Renderer</a></h1>
<p>A column renderer is a Lua function that receives a <a href="column-renderer.html#table-renderer-argument">special argument</a> and
returns a string that will be displayed in each specific field of the
<a href="layout.html#table">files table</a>.</p>
<p>xplr by default provides the following column renderers:</p>
<ul>
<li><code>xplr.fn.builtin.fmt_general_table_row_cols_0</code></li>
<li><code>xplr.fn.builtin.fmt_general_table_row_cols_1</code></li>
<li><code>xplr.fn.builtin.fmt_general_table_row_cols_2</code></li>
<li><code>xplr.fn.builtin.fmt_general_table_row_cols_3</code></li>
<li><code>xplr.fn.builtin.fmt_general_table_row_cols_4</code></li>
</ul>
<p>You can either overwrite these functions, or create new functions in
<code>xplr.fn.custom</code> and point to them.</p>
<p>Terminal colors are supported.</p>
<h2 id="table-renderer-argument"><a class="header" href="#table-renderer-argument">Table Renderer Argument</a></h2>
<p>The special argument contains the following fields</p>
<ul>
<li><a href="column-renderer.html#parent">parent</a></li>
<li><a href="column-renderer.html#relative_path">relative_path</a></li>
<li><a href="column-renderer.html#absolute_path">absolute_path</a></li>
<li><a href="column-renderer.html#extension">extension</a></li>
<li><a href="column-renderer.html#is_symlink">is_symlink</a></li>
<li><a href="column-renderer.html#is_broken">is_broken</a></li>
<li><a href="column-renderer.html#is_dir">is_dir</a></li>
<li><a href="column-renderer.html#is_file">is_file</a></li>
<li><a href="column-renderer.html#is_readonly">is_readonly</a></li>
<li><a href="column-renderer.html#mime_essence">mime_essence</a></li>
<li><a href="column-renderer.html#size">size</a></li>
<li><a href="column-renderer.html#human_size">human_size</a></li>
<li><a href="column-renderer.html#permissions">permissions</a></li>
<li><a href="column-renderer.html#canonical">canonical</a></li>
<li><a href="column-renderer.html#symlink">symlink</a></li>
<li><a href="column-renderer.html#index">index</a></li>
<li><a href="column-renderer.html#relative_index">relative_index</a></li>
<li><a href="column-renderer.html#is_before_focus">is_before_focus</a></li>
<li><a href="column-renderer.html#is_after_focus">is_after_focus</a></li>
<li><a href="column-renderer.html#tree">tree</a></li>
<li><a href="column-renderer.html#prefix">prefix</a></li>
<li><a href="column-renderer.html#suffix">suffix</a></li>
<li><a href="column-renderer.html#is_selected">is_selected</a></li>
<li><a href="column-renderer.html#is_focused">is_focused</a></li>
<li><a href="column-renderer.html#total">total</a></li>
<li><a href="column-renderer.html#meta">meta</a></li>
</ul>
<h3 id="parent"><a class="header" href="#parent">parent</a></h3>
<p>Type: string</p>
<p>The parent path of the node.</p>
<h3 id="relative_path"><a class="header" href="#relative_path">relative_path</a></h3>
<p>Type: string</p>
<p>The path relative to the parent, i.e. the file/directory name with extension.</p>
<h3 id="absolute_path"><a class="header" href="#absolute_path">absolute_path</a></h3>
<p>Type: string</p>
<p>The absolute path (without resolving symlinks) of the node.</p>
<h3 id="extension"><a class="header" href="#extension">extension</a></h3>
<p>Type: string</p>
<p>The extension of the node.</p>
<h3 id="is_symlink"><a class="header" href="#is_symlink">is_symlink</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a symlink.</p>
<h3 id="is_broken"><a class="header" href="#is_broken">is_broken</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a broken symlink.</p>
<h3 id="is_dir"><a class="header" href="#is_dir">is_dir</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a directory.</p>
<h3 id="is_file"><a class="header" href="#is_file">is_file</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a file.</p>
<h3 id="is_readonly"><a class="header" href="#is_readonly">is_readonly</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is real-only.</p>
<h3 id="mime_essence"><a class="header" href="#mime_essence">mime_essence</a></h3>
<p>Type: string</p>
<p>The mime type of the node. For e.g. <code>text/csv</code>, <code>image/jpeg</code> etc.</p>
<h3 id="size-1"><a class="header" href="#size-1">size</a></h3>
<p>Type: integer</p>
<p>The size of the exact node. The size of a directory won't be calculated
recursively.</p>
<h3 id="human_size"><a class="header" href="#human_size">human_size</a></h3>
<p>Type: string</p>
<p>Like <a href="column-renderer.html#size">size</a> but in human readable format.</p>
<h3 id="permissions"><a class="header" href="#permissions">permissions</a></h3>
<p>Type: <a href="column-renderer.html#permission">Permission</a></p>
<p>The <a href="column-renderer.html#permission">permissions</a> applied to the node.</p>
<h3 id="canonical"><a class="header" href="#canonical">canonical</a></h3>
<p>Type: nullable <a href="column-renderer.html#resolved-node-metadata">Resolved Node Metadata</a></p>
<p>If the node is a symlink, it will hold information about the symlink resolved
node. Else, it will hold information the actual node. It the symlink is broken,
it will be null.</p>
<h3 id="symlink"><a class="header" href="#symlink">symlink</a></h3>
<p>Type: nullable <a href="column-renderer.html#resolved-node-metadata">Resolved Node Metadata</a></p>
<p>If the node is a symlink and is not broken, it will hold information about the
symlink resolved node. However, it will never hold information about the actual
node. It will instead be null.</p>
<h3 id="index"><a class="header" href="#index">index</a></h3>
<p>Type: integer</p>
<p>Index (starting from 0) of the node.</p>
<h3 id="relative_index"><a class="header" href="#relative_index">relative_index</a></h3>
<p>Type: integer</p>
<p>Relative index from the focused node (i.e. 0th node).</p>
<h3 id="is_before_focus"><a class="header" href="#is_before_focus">is_before_focus</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is before the focused node.</p>
<h3 id="is_after_focus"><a class="header" href="#is_after_focus">is_after_focus</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is after the focused node.</p>
<h3 id="tree"><a class="header" href="#tree">tree</a></h3>
<p>Type: string</p>
<p>The <a href="general-config.html#tabletree">tree component</a> based on the node's index.</p>
<h3 id="prefix"><a class="header" href="#prefix">prefix</a></h3>
<p>Type: string</p>
<p>The prefix applicable for the node.</p>
<h3 id="suffix"><a class="header" href="#suffix">suffix</a></h3>
<p>Type: string</p>
<p>The suffix applicable for the node.</p>
<h3 id="is_selected"><a class="header" href="#is_selected">is_selected</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is selected.</p>
<h3 id="is_focused"><a class="header" href="#is_focused">is_focused</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is under focus.</p>
<h3 id="total"><a class="header" href="#total">total</a></h3>
<p>Type: integer</p>
<p>The total number of the nodes.</p>
<h3 id="meta-1"><a class="header" href="#meta-1">meta</a></h3>
<p>Type: mapping of string and string</p>
<p>The applicable <a href="node-type.html#meta">meta object</a> for the node.</p>
<h2 id="permission"><a class="header" href="#permission">Permission</a></h2>
<p>Permission contains the following fields:</p>
<ul>
<li>user_read</li>
<li>user_write</li>
<li>user_execute</li>
<li>group_read</li>
<li>group_write</li>
<li>group_execute</li>
<li>other_read</li>
<li>other_write</li>
<li>other_execute</li>
<li>sticky</li>
<li>setgid</li>
<li>setuid</li>
</ul>
<p>Each field holds a boolean value.</p>
<h2 id="resolved-node-metadata"><a class="header" href="#resolved-node-metadata">Resolved Node Metadata</a></h2>
<p>It contains the following fields.</p>
<ul>
<li><a href="column-renderer.html#absolute_path">absolute_path</a></li>
<li><a href="column-renderer.html#extension">extension</a></li>
<li><a href="column-renderer.html#is_dir">is_dir</a></li>
<li><a href="column-renderer.html#is_file">is_file</a></li>
<li><a href="column-renderer.html#is_readonly">is_readonly</a></li>
<li><a href="column-renderer.html#mime_essence">mime_essence</a></li>
<li><a href="column-renderer.html#size">size</a></li>
<li><a href="column-renderer.html#human_size">human_size</a></li>
</ul>
<h2 id="example-customizing-table-renderer"><a class="header" href="#example-customizing-table-renderer">Example: Customizing Table Renderer</a></h2>
<pre><code class="language-lua">xplr.fn.custom.fmt_simple_column = function(m)
return m.prefix .. m.relative_path .. m.suffix
end
xplr.config.general.table.header.cols = {
{ format = &quot; path&quot; }
}
xplr.config.general.table.row.cols = {
{ format = &quot;custom.fmt_simple_column&quot; }
}
xplr.config.general.table.col_widths = {
{ Percentage = 100 }
}
-- With this config, you should only see a single column displaying the
-- relative paths.
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="lua-function-calls"><a class="header" href="#lua-function-calls">Lua Function Calls</a></h1>
<p>xplr allows you to define lua functions using the <code>xplr.fn.custom</code> Lua API.</p>
<p>These functions can be called using messages like <code>CallLua</code>, <code>CallLuaSilently</code>.</p>
<p>When called the function receives a <a href="lua-function-calls.html#lua-context">special argument</a> that
contains some useful information. The function can optionally return a list of
messages which will be handled by xplr.</p>
<h3 id="lua-context"><a class="header" href="#lua-context">Lua Context</a></h3>
<p>This is a special argument passed to the lua functions when called using the
<code>CallLua</code>, <code>CallLuaSilently</code> messages.</p>
<p>It contains the following information:</p>
<ul>
<li><a href="lua-function-calls.html#version">version</a></li>
<li><a href="lua-function-calls.html#pwd">pwd</a></li>
<li><a href="lua-function-calls.html#focused_node">focused_node</a></li>
<li><a href="lua-function-calls.html#directory_buffer">directory_buffer</a></li>
<li><a href="lua-function-calls.html#selection">selection</a></li>
<li><a href="lua-function-calls.html#mode">mode</a></li>
<li><a href="lua-function-calls.html#layout">layout</a></li>
<li><a href="lua-function-calls.html#input_buffer">input_buffer</a></li>
<li><a href="lua-function-calls.html#pid">pid</a></li>
<li><a href="lua-function-calls.html#session_path">session_path</a></li>
<li><a href="lua-function-calls.html#explorer_config">explorer_config</a></li>
<li><a href="lua-function-calls.html#history">history</a></li>
<li><a href="lua-function-calls.html#last_modes">last_modes</a></li>
</ul>
<h3 id="version"><a class="header" href="#version">version</a></h3>
<p>Type: string</p>
<p>xplr version. Can be used to test compatibility.</p>
<h3 id="pwd"><a class="header" href="#pwd">pwd</a></h3>
<p>Type: string</p>
<p>The present working directory/</p>
<h3 id="focused_node"><a class="header" href="#focused_node">focused_node</a></h3>
<p>Type: nullable <a href="lua-function-calls.html#node">Node</a></p>
<p>The node under focus.</p>
<h3 id="directory_buffer"><a class="header" href="#directory_buffer">directory_buffer</a></h3>
<p>Type: nullable <a href="lua-function-calls.html#directory-buffer">Directory Buffer</a></p>
<p>The directory buffer being rendered.</p>
<h3 id="selection-1"><a class="header" href="#selection-1">selection</a></h3>
<p>Type: list of selected <a href="lua-function-calls.html#node">Node</a>s</p>
<p>The selected nodes.</p>
<h3 id="mode-1"><a class="header" href="#mode-1">mode</a></h3>
<p>Type: <a href="modes.html#mode">Mode</a></p>
<p>Current mode.</p>
<h3 id="layout-2"><a class="header" href="#layout-2">layout</a></h3>
<p>Type: <a href="layouts.html">Layout</a></p>
<p>Current layout.</p>
<h3 id="input_buffer"><a class="header" href="#input_buffer">input_buffer</a></h3>
<p>Type: nullable string</p>
<p>The input buffer.</p>
<h3 id="pid"><a class="header" href="#pid">pid</a></h3>
<p>Type: integer</p>
<p>The xplr session PID.</p>
<h3 id="session_path"><a class="header" href="#session_path">session_path</a></h3>
<p>Type: string</p>
<p>The session path.</p>
<h3 id="explorer_config"><a class="header" href="#explorer_config">explorer_config</a></h3>
<p><a href="https://docs.rs/xplr/latest/xplr/app/struct.ExplorerConfig.html">TODO</a></p>
<h3 id="history"><a class="header" href="#history">history</a></h3>
<p>Type: <a href="lua-function-calls.html#history-1">History</a></p>
<h3 id="last_modes"><a class="header" href="#last_modes">last_modes</a></h3>
<p>Type: list of <a href="modes.html#mode">Mode</a></p>
<p>Last modes, not popped yet.</p>
<h3 id="parent-1"><a class="header" href="#parent-1">parent</a></h3>
<p>Type: string</p>
<p>The parent path of the node.</p>
<h3 id="relative_path-1"><a class="header" href="#relative_path-1">relative_path</a></h3>
<p>Type: string</p>
<p>The path relative to the parent, i.e. the file/directory name with extension.</p>
<h3 id="absolute_path-1"><a class="header" href="#absolute_path-1">absolute_path</a></h3>
<p>Type: string</p>
<p>The absolute path (without resolving symlinks) of the node.</p>
<h3 id="extension-1"><a class="header" href="#extension-1">extension</a></h3>
<p>Type: string</p>
<p>The extension of the node.</p>
<h3 id="is_symlink-1"><a class="header" href="#is_symlink-1">is_symlink</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a symlink.</p>
<h3 id="is_broken-1"><a class="header" href="#is_broken-1">is_broken</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a broken symlink.</p>
<h3 id="is_dir-1"><a class="header" href="#is_dir-1">is_dir</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a directory.</p>
<h3 id="is_file-1"><a class="header" href="#is_file-1">is_file</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is a file.</p>
<h3 id="is_readonly-1"><a class="header" href="#is_readonly-1">is_readonly</a></h3>
<p>Type: boolean</p>
<p><code>true</code> if the node is real-only.</p>
<h3 id="mime_essence-1"><a class="header" href="#mime_essence-1">mime_essence</a></h3>
<p>Type: string</p>
<p>The mime type of the node. For e.g. <code>text/csv</code>, <code>image/jpeg</code> etc.</p>
<h3 id="size-2"><a class="header" href="#size-2">size</a></h3>
<p>Type: integer</p>
<p>The size of the exact node. The size of a directory won't be calculated
recursively.</p>
<h3 id="human_size-1"><a class="header" href="#human_size-1">human_size</a></h3>
<p>Type: string</p>
<p>Like size but in human readable format.</p>
<h3 id="permissions-1"><a class="header" href="#permissions-1">permissions</a></h3>
<p>Type: <a href="column-renderer.html#permission">Permission</a></p>
<p>The <a href="column-renderer.html#permission">permissions</a> applied to the node.</p>
<h3 id="canonical-1"><a class="header" href="#canonical-1">canonical</a></h3>
<p>Type: nullable <a href="column-renderer.html#resolved-node-metadata">Resolved Node Metadata</a></p>
<p>If the node is a symlink, it will hold information about the symlink resolved
node. Else, it will hold information the actual node. It the symlink is broken,
it will be null.</p>
<h3 id="symlink-1"><a class="header" href="#symlink-1">symlink</a></h3>
<p>Type: nullable <a href="column-renderer.html#resolved-node-metadata">Resolved Node Metadata</a></p>
<p>If the node is a symlink and is not broken, it will hold information about the
symlink resolved node. However, it will never hold information about the actual
node. It will instead be null.</p>
<h3 id="node"><a class="header" href="#node">Node</a></h3>
<p>A node contains the following fields:</p>
<ul>
<li><a href="lua-function-calls.html#parent">parent</a></li>
<li><a href="lua-function-calls.html#relative_path">relative_path</a></li>
<li><a href="lua-function-calls.html#absolute_path">absolute_path</a></li>
<li><a href="lua-function-calls.html#extension">extension</a></li>
<li><a href="lua-function-calls.html#is_symlink">is_symlink</a></li>
<li><a href="lua-function-calls.html#is_broken">is_broken</a></li>
<li><a href="lua-function-calls.html#is_dir">is_dir</a></li>
<li><a href="lua-function-calls.html#is_file">is_file</a></li>
<li><a href="lua-function-calls.html#is_readonly">is_readonly</a></li>
<li><a href="lua-function-calls.html#mime_essence">mime_essence</a></li>
<li><a href="lua-function-calls.html#size">size</a></li>
<li><a href="lua-function-calls.html#human_size">human_size</a></li>
<li><a href="lua-function-calls.html#permissions">permissions</a></li>
<li><a href="lua-function-calls.html#canonical">canonical</a></li>
<li><a href="lua-function-calls.html#symlink">symlink</a></li>
</ul>
<h3 id="directory-buffer"><a class="header" href="#directory-buffer">Directory Buffer</a></h3>
<p>Directory buffer contains the following fields:</p>
<ul>
<li><a href="lua-function-calls.html#parent">parent</a></li>
<li><a href="lua-function-calls.html#nodes">nodes</a></li>
<li><a href="lua-function-calls.html#total">total</a></li>
<li><a href="lua-function-calls.html#focus">focus</a></li>
</ul>
<h4 id="parent-2"><a class="header" href="#parent-2">parent</a></h4>
<p>Type: string</p>
<p>The parent path of the node.</p>
<h4 id="nodes"><a class="header" href="#nodes">nodes</a></h4>
<p>Type: list of <a href="lua-function-calls.html#node">Node</a>s</p>
<p>A list of visible nodes.</p>
<h4 id="total-1"><a class="header" href="#total-1">total</a></h4>
<p>Type: int</p>
<p>The count of nodes being rendered.</p>
<h4 id="focus"><a class="header" href="#focus">focus</a></h4>
<p>Type: int</p>
<p>The index of the node under focus. It can be <code>0</code> even when there's no node to
focus on.</p>
<h3 id="history-1"><a class="header" href="#history-1">History</a></h3>
<p>History contains the following fields:</p>
<ul>
<li><a href="lua-function-calls.html#loc">loc</a></li>
<li><a href="lua-function-calls.html#paths">paths</a></li>
</ul>
<h4 id="loc"><a class="header" href="#loc">loc</a></h4>
<p>Type: int</p>
<p>Location of the current path in history.</p>
<h4 id="paths"><a class="header" href="#paths">paths</a></h4>
<p>Type: list of string</p>
<p>Visited paths.</p>
<h3 id="example-using-lua-function-calls"><a class="header" href="#example-using-lua-function-calls">Example: Using Lua Function Calls</a></h3>
<pre><code class="language-lua">-- Define the function
xplr.fn.custom.ask_name_and_greet = function(app)
print(&quot;What's your name?&quot;)
local name = io.read()
local greeting = &quot;Hello &quot; .. name .. &quot;!&quot;
local message = greeting .. &quot; You are inside &quot; .. app.pwd
return {
{ LogSuccess = message },
}
end
-- Map the function to a key (space)
xplr.config.modes.builtin.default.key_bindings.on_key.space = {
help = &quot;ask name and greet&quot;,
messages = {
{ CallLua = &quot;custom.ask_name_and_greet&quot; }
}
}
-- Now, when you press &quot;space&quot; in default mode, you will be prompted for your
-- name. Enter your name to receive a nice greeting and to know your location.
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="environment-variables-and-pipes"><a class="header" href="#environment-variables-and-pipes">Environment Variables and Pipes</a></h1>
<p>Alternative to <code>CallLua</code>, <code>CallLuaSilently</code> messages that call Lua functions,
there are <code>Call</code>, <code>CallSilently</code>, <code>BashExec</code>, <code>BashExecSilently</code> messages
that call shell commands.</p>
<p>However, unlike the Lua functions, these shell commands have to read the useful
information and send messages via environment variables and temporary files
called &quot;pipe&quot;s. These environment variables and files are only available when
a command is being executed.</p>
<p>Visit the <a href="configure-key-bindings.html#tutorial-adding-a-new-mode"><strong>fzf integration tutorial</strong></a>
for example.</p>
<h3 id="environment-variables"><a class="header" href="#environment-variables">Environment variables</a></h3>
<p>To see the environment variables, invoke the shell by typing <code>:!</code> in default
mode and run the following command:</p>
<pre><code>env | grep ^XPLR_
</code></pre>
<p>You will see something like:</p>
<pre><code>XPLR_FOCUS_INDEX=0
XPLR_MODE=action to
XPLR_PIPE_SELECTION_OUT=/run/user/1000/xplr/session/122278/pipe/selection_out
XPLR_INPUT_BUFFER=
XPLR_PIPE_GLOBAL_HELP_MENU_OUT=/run/user/1000/xplr/session/122278/pipe/global_help_menu_out
XPLR_PID=122278
XPLR_PIPE_MSG_IN=/run/user/1000/xplr/session/122278/pipe/msg_in
XPLR_PIPE_LOGS_OUT=/run/user/1000/xplr/session/122278/pipe/logs_out
XPLR_PIPE_RESULT_OUT=/run/user/1000/xplr/session/122278/pipe/result_out
XPLR_PIPE_HISTORY_OUT=/run/user/1000/xplr/session/122278/pipe/history_out
XPLR_FOCUS_PATH=/home/sayanarijit/Documents/GitHub/xplr/docs/en/book
XPLR_SESSION_PATH=/run/user/1000/xplr/session/122278
XPLR_APP_VERSION=0.14.3
XPLR_PIPE_DIRECTORY_NODES_OUT=/run/user/1000/xplr/session/122278/pipe/directory_nodes_out
</code></pre>
<p>The environment variables starting with <code>XPLR_PIPE_</code> are the temporary files
called &quot;pipe&quot;s.</p>
<h4 id="input-pipe"><a class="header" href="#input-pipe">Input pipe</a></h4>
<p>Current there is only one input pipe.</p>
<ul>
<li><a href="environment-variables-and-pipes.html#xplr_pipe_msg_in">XPLR_PIPE_MSG_IN</a></li>
</ul>
<h4 id="output-pipes"><a class="header" href="#output-pipes">Output pipes</a></h4>
<p><code>XPLR_PIPE_*_OUT</code> are the output pipes that contain data which cannot be
exposed directly via environment variables, like multi-line string.</p>
<ul>
<li><a href="environment-variables-and-pipes.html#xplr_pipe_selection_out">XPLR_PIPE_SELECTION_OUT</a></li>
<li><a href="environment-variables-and-pipes.html#xplr_pipe_global_help_menu_out">XPLR_PIPE_GLOBAL_HELP_MENU_OUT</a></li>
<li><a href="environment-variables-and-pipes.html#xplr_pipe_logs_out">XPLR_PIPE_LOGS_OUT</a></li>
<li><a href="environment-variables-and-pipes.html#xplr_pipe_result_out">XPLR_PIPE_RESULT_OUT</a></li>
<li><a href="environment-variables-and-pipes.html#xplr_pipe_history_out">XPLR_PIPE_HISTORY_OUT</a></li>
<li><a href="environment-variables-and-pipes.html#xplr_pipe_directory_nodes_out">XPLR_PIPE_DIRECTORY_NODES_OUT</a></li>
</ul>
<h4 id="xplr_pipe_msg_in"><a class="header" href="#xplr_pipe_msg_in">XPLR_PIPE_MSG_IN</a></h4>
<p>Append new-line delimited messages to this pipe in <a href="https://www.yaml.org">YAML</a>
(or <a href="https://www.json.org">JSON</a>) syntax. These messages will be read and
handled by xplr after the command execution.</p>
<h4 id="xplr_pipe_selection_out"><a class="header" href="#xplr_pipe_selection_out">XPLR_PIPE_SELECTION_OUT</a></h4>
<p>New-line delimited list of selected paths.</p>
<h4 id="xplr_pipe_global_help_menu_out"><a class="header" href="#xplr_pipe_global_help_menu_out">XPLR_PIPE_GLOBAL_HELP_MENU_OUT</a></h4>
<p>The full help menu.</p>
<h4 id="xplr_pipe_logs_out"><a class="header" href="#xplr_pipe_logs_out">XPLR_PIPE_LOGS_OUT</a></h4>
<p>New-line delimited list of logs.</p>
<h4 id="xplr_pipe_result_out"><a class="header" href="#xplr_pipe_result_out">XPLR_PIPE_RESULT_OUT</a></h4>
<p>New-line delimited result (selected paths if any, else the focused path)</p>
<h4 id="xplr_pipe_history_out"><a class="header" href="#xplr_pipe_history_out">XPLR_PIPE_HISTORY_OUT</a></h4>
<p>New-line delimited list of last visited paths (similar to jump list in vim).</p>
<h4 id="xplr_pipe_directory_nodes_out"><a class="header" href="#xplr_pipe_directory_nodes_out">XPLR_PIPE_DIRECTORY_NODES_OUT</a></h4>
<p>New-line delimited list of paths, filtered and sorted as displayed in the
<a href="layout.html#table">files table</a>.</p>
<h3 id="example-using-environment-variables-and-pipes"><a class="header" href="#example-using-environment-variables-and-pipes">Example: Using Environment Variables and Pipes</a></h3>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key.space = {
help = &quot;ask name and greet&quot;,
messages = {
{
BashExec = [===[
echo &quot;What's your name?&quot;
read name
greeting=&quot;Hello $name!&quot;
message=&quot;$greeting You are inside $PWD&quot;
echo LogSuccess: '&quot;'$message'&quot;' &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
]===]
}
}
}
-- Now, when you press &quot;space&quot; in default mode, you will be prompted for your
-- name. Enter your name to receive a nice greeting and to know your location.
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="awesome-hacks"><a class="header" href="#awesome-hacks">Awesome Hacks</a></h1>
<p>Here's a list of cool xplr hacks, i.e. snippets of code that you can just copy
and paste into your <a href="configuration.html">configuration</a> or the appropriate file, that are
too small or too niche for a full fledge <a href="plugin.html">plugin</a>.</p>
<p>Do you have something cool to share?</p>
<p><a href="https://github.com/sayanarijit/xplr/edit/main/docs/en/src/awesome-hacks.md">Edit this file</a> or <a href="https://github.com/sayanarijit/xplr/discussions/categories/show-and-tell">share them here</a> or <a href="community.html">let us know</a>.</p>
<h3 id="cd-on-quit"><a class="header" href="#cd-on-quit">cd on quit</a></h3>
<p>Change directory using xplr.</p>
<details>
<summary>Expand for details</summary>
<ul>
<li>Author: <a href="https://github.com/sayanarijit">@sayanarijit</a></li>
<li>Tested on: Linux</li>
</ul>
<p>With this alias set, you can navigate directories using xplr by entering
xcd command, and when you quit by pressing enter, you will enter the
directory.</p>
<p>You can of course, quit with plain Quit (i.e. by pressing q) to
gracefully cancel &quot;cd on quit&quot;.</p>
<pre><code class="language-bash">alias xcd='cd &quot;$(xplr --print-pwd-as-result)&quot;'
</code></pre>
</details>
<h3 id="spawn-multiple-sessions-in-different-tabs-iterm2"><a class="header" href="#spawn-multiple-sessions-in-different-tabs-iterm2">Spawn multiple sessions in different tabs (iTerm2)</a></h3>
<p>Creating a new session that starts with iTerm2.</p>
<details>
<summary>Expand for details</summary>
<ul>
<li>Author: <a href="https://github.com/lmburns">@lmburns</a></li>
<li>Requires: iTerm2</li>
<li>Tested on: MacOS</li>
</ul>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key[&quot;ctrl-n&quot;] = {
help = &quot;new session&quot;,
messages = {
{ BashExecSilently = [[
osascript &lt;&lt;EOF
tell application &quot;iTerm2&quot;
tell current window
create tab with default profile
tell current session to write text &quot;xplr&quot;
end tell
end tell
]]
},
},
}
</code></pre>
</details>
<h3 id="bookmark"><a class="header" href="#bookmark">Bookmark</a></h3>
<p>Bookmark files using <code>m</code> and fuzzy search bookmarks using backtick.</p>
<details>
<summary>Expand for details</summary>
<p><a href="https://gifyu.com/image/rGSR"><img src="https://s4.gifyu.com/images/xplr-bookmark.gif" alt="xplr-bookmark.gif" /></a></p>
<ul>
<li>Author: <a href="https://github.com/sayanarijit">@sayanarijit</a></li>
<li>Requires: fzf</li>
<li>Tested on: Linux</li>
</ul>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key.m = {
help = &quot;bookmark&quot;,
messages = {
{
BashExecSilently = [===[
PTH=&quot;${XPLR_FOCUS_PATH:?}&quot;
if echo &quot;${PTH:?}&quot; &gt;&gt; &quot;${XPLR_SESSION_PATH:?}/bookmarks&quot;; then
echo &quot;LogSuccess: ${PTH:?} added to bookmarks&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
else
echo &quot;LogError: Failed to bookmark ${PTH:?}&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]===],
},
},
}
xplr.config.modes.builtin.default.key_bindings.on_key[&quot;`&quot;] = {
help = &quot;go to bookmark&quot;,
messages = {
{
BashExec = [===[
PTH=$(cat &quot;${XPLR_SESSION_PATH:?}/bookmarks&quot; | fzf --no-sort)
if [ &quot;$PTH&quot; ]; then
echo FocusPath: &quot;'&quot;${PTH:?}&quot;'&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]===],
},
},
}
</code></pre>
</details>
<h3 id="persistent-multi-session-bookmark"><a class="header" href="#persistent-multi-session-bookmark">Persistent, multi-session bookmark</a></h3>
<p>A bookmark mode that allows for a bookmark file to be used throughout multiples
sessions. It is set to the environment variable <code>$XPLR_BOOKMARK_FILE</code>. A
bookmark can be added, deleted, or jumped to.</p>
<details>
<summary>Expand for details</summary>
<ul>
<li>Author: <a href="https://github.com/lmburns">@lmburns</a></li>
<li>Requires: fzf, sd</li>
<li>Tested on: MacOS</li>
</ul>
<pre><code class="language-lua">-- Bookmark: mode binding
xplr.config.modes.custom.bookmark = {
name = &quot;bookmark&quot;,
key_bindings = {
on_key = {
m = {
help = &quot;bookmark dir&quot;,
messages = {
{ BashExecSilently = [[
PTH=&quot;${XPLR_FOCUS_PATH:?}&quot;
if [ -d &quot;${PTH}&quot; ]; then
PTH=&quot;${PTH}&quot;
elif [ -f &quot;${PTH}&quot; ]; then
PTH=&quot;$(dirname &quot;${PTH}&quot;)&quot;
fi
if echo &quot;${PTH:?}&quot; &gt;&gt; &quot;${XPLR_BOOKMARK_FILE:?}&quot;; then
echo &quot;LogSuccess: ${PTH:?} added to bookmarks&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
else
echo &quot;LogError: Failed to bookmark ${PTH:?}&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]]
},
},
},
g = {
help = &quot;go to bookmark&quot;,
messages = {
{
BashExec = [===[
PTH=$(cat &quot;${XPLR_BOOKMARK_FILE:?}&quot; | fzf --no-sort)
if [ &quot;$PTH&quot; ]; then
echo FocusPath: &quot;'&quot;${PTH:?}&quot;'&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]===]
},
},
},
d = {
help = &quot;delete bookmark&quot;,
messages = {
{ BashExec = [[
PTH=$(cat &quot;${XPLR_BOOKMARK_FILE:?}&quot; | fzf --no-sort)
sd &quot;$PTH\n&quot; &quot;&quot; &quot;${XPLR_BOOKMARK_FILE:?}&quot;
]]
},
},
},
esc = {
help = &quot;cancel&quot;,
messages = {
&quot;PopMode&quot;,
},
},
},
},
}
</code></pre>
</details>
<h3 id="another-bookmark-manager-type-thing-taken-from-wfxrs-zsh-plugin"><a class="header" href="#another-bookmark-manager-type-thing-taken-from-wfxrs-zsh-plugin">Another bookmark manager type thing, taken from <a href="https://github.com/wfxr/formarks">wfxr's zsh plugin</a>.</a></h3>
<p>Another bookmark manager type thing, taken from <a href="https://github.com/wfxr/formarks">wfxr's zsh plugin</a> which has colored output with fzf.</p>
<details>
<summary>Expand for details</summary>
<ul>
<li>Author: <a href="https://github.com/lmburns">@lmburns</a></li>
<li>Requires: fzf, exa</li>
<li>Tested on: MacOS</li>
</ul>
<pre><code class="language-lua">xplr.config.modes.builtin.go_to.key_bindings.on_key.b = {
help = &quot;bookmark jump&quot;,
messages = {
&quot;PopMode&quot;,
{ BashExec = [===[
field='\(\S\+\s*\)'
esc=$(printf '\033')
N=&quot;${esc}[0m&quot;
R=&quot;${esc}[31m&quot;
G=&quot;${esc}[32m&quot;
Y=&quot;${esc}[33m&quot;
B=&quot;${esc}[34m&quot;
pattern=&quot;s#^${field}${field}${field}${field}#$Y\1$R\2$N\3$B\4$N#&quot;
PTH=$(sed 's#: # -&gt; #' &quot;$PATHMARKS_FILE&quot;| nl| column -t \
| gsed &quot;${pattern}&quot; \
| fzf --ansi \
--height '40%' \
--preview=&quot;echo {}|sed 's#.*-&gt; ##'| xargs exa --color=always&quot; \
--preview-window=&quot;right:50%&quot; \
| sed 's#.*-&gt; ##')
if [ &quot;$PTH&quot; ]; then
echo ChangeDirectory: &quot;'&quot;${PTH:?}&quot;'&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]===]
},
}
}
</code></pre>
</details>
<h3 id="fuzzy-search-history"><a class="header" href="#fuzzy-search-history">Fuzzy search history</a></h3>
<p>Fuzzy search the last visited directories.</p>
<details>
<summary>Expand for details</summary>
<ul>
<li>Author: <a href="https://github.com/sayanarijit">@sayanarijit</a></li>
<li>Requires: fzf</li>
<li>Tested on: Linux</li>
</ul>
<pre><code class="language-lua">xplr.config.modes.builtin.go_to.key_bindings.on_key.h = {
help = &quot;history&quot;,
messages = {
&quot;PopMode&quot;,
{
BashExec = [===[
PTH=$(cat &quot;${XPLR_PIPE_HISTORY_OUT:?}&quot; | sort -u | fzf --no-sort)
if [ &quot;$PTH&quot; ]; then
echo ChangeDirectory: &quot;'&quot;${PTH:?}&quot;'&quot; &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]===],
},
},
}
</code></pre>
</details>
<h3 id="batch-rename"><a class="header" href="#batch-rename">Batch rename</a></h3>
<p>Batch rename the selected or visible files and directories in $PWD.</p>
<details>
<summary>Expand for details</summary>
<p><a href="https://gifyu.com/image/rGbo"><img src="https://s4.gifyu.com/images/xplr-rename.gif" alt="xplr-rename.gif" /></a></p>
<ul>
<li>Author: <a href="https://github.com/sayanarijit">@sayanarijit</a></li>
<li>Requires: <a href="https://github.com/marcusbuffett/pipe-rename">pipe-rename</a></li>
<li>Tested on: Linux</li>
</ul>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key.R = {
help = &quot;batch rename&quot;,
messages = {
{
BashExec = [===[
SELECTION=$(cat &quot;${XPLR_PIPE_SELECTION_OUT:?}&quot;)
NODES=${SELECTION:-$(cat &quot;${XPLR_PIPE_DIRECTORY_NODES_OUT:?}&quot;)}
if [ &quot;$NODES&quot; ]; then
echo -e &quot;$NODES&quot; | renamer
echo ExplorePwdAsync &gt;&gt; &quot;${XPLR_PIPE_MSG_IN:?}&quot;
fi
]===],
},
},
}
</code></pre>
</details>
<h3 id="serve-pwd"><a class="header" href="#serve-pwd">Serve $PWD</a></h3>
<p>Serve $PWD using a static web server via LAN.</p>
<details>
<summary>Expand for details</summary>
<ul>
<li>Author: <a href="https://github.com/sayanarijit">@sayanarijit</a></li>
<li>Requires: <a href="https://github.com/weihanglo/sfz">sfz</a>, fzf</li>
<li>Tested on: Linux</li>
</ul>
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key.S = {
help = &quot;serve $PWD&quot;,
messages = {
{
BashExec = [===[
IP=$(ip addr | grep -w inet | cut -d/ -f1 | grep -Eo '[0-9]{1,3}\.[0-9]{ 1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | fzf --prompt 'Select IP &gt; ')
echo &quot;IP: ${IP:?}&quot;
read -p &quot;Port (default 5000): &quot; PORT
echo
sfz --all --cors --no-ignore --bind ${IP:?} --port ${PORT:-5000} . &amp;
sleep 1 &amp;&amp; read -p '[press enter to exit]'
kill -9 %1
]===],
},
},
}
</code></pre>
</details>
<h2 id="also-see-6"><a class="header" href="#also-see-6">Also See:</a></h2>
<ul>
<li><a href="awesome-plugins.html">Awesome Plugins</a></li>
<li><a href="awesome-integrations.html">Awesome Integrations</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="plugin"><a class="header" href="#plugin">Plugin</a></h1>
<p>xplr supports pluggable Lua modules that can be used to easily configure or
extend xplr UI and functionalities.</p>
<ul>
<li><a href="installing-plugins.html">Installing Plugins</a></li>
<li><a href="writing-plugins.html">Writing Plugins</a></li>
<li><a href="awesome-plugins.html">Awesome Plugins</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="installing-plugins"><a class="header" href="#installing-plugins">Installing Plugins</a></h1>
<p>One way to install plugins is to use a plugin manager like <a href="https://github.com/dtomvan/xpm.xplr">dtomvan/xpm.xplr</a>.</p>
<p>But you can also install and manage plugins manually.</p>
<h2 id="install-manually"><a class="header" href="#install-manually">Install Manually</a></h2>
<ul>
<li>
<p>Add the following line in <code>~/.config/xplr/init.lua</code></p>
<pre><code class="language-lua">local home = os.getenv(&quot;HOME&quot;)
package.path = home
.. &quot;/.config/xplr/plugins/?/init.lua;&quot;
.. home
.. &quot;/.config/xplr/plugins/?.lua;&quot;
.. package.path
</code></pre>
</li>
<li>
<p>Clone the plugin</p>
<pre><code class="language-bash">mkdir -p ~/.config/xplr/plugins
git clone https://github.com/sayanarijit/material-landscape2.xplr ~/.config/xplr/plugins/material-landscape2
</code></pre>
</li>
<li>
<p>Require the module in <code>~/.config/xplr/init.lua</code></p>
<pre><code class="language-lua">require(&quot;material-landscape2&quot;).setup()
-- The setup arguments might differ for different plugins.
-- Visit the project README for setup instructions.
</code></pre>
</li>
</ul>
<h2 id="luarocks-support"><a class="header" href="#luarocks-support">Luarocks Support</a></h2>
<p>Some plugins may require <a href="https://luarocks.org">luarocks</a> to work.</p>
<p>Setup luarocks with the following steps:</p>
<ul>
<li>
<p>Install luarocks (via your package managers or follow the <a href="https://luarocks.org">official guide</a>).</p>
</li>
<li>
<p>Add <code>eval &quot;$(luarocks path --lua-version 5.1)&quot;</code> in your <code>.bashrc</code> or <code>.zshrc</code>.</p>
</li>
<li>
<p>Add the following lines in <code>~/.config/xplr/init.lua</code></p>
<pre><code class="language-lua">package.path = os.getenv(&quot;LUA_PATH&quot;) .. &quot;;&quot; .. package.path
package.cpath = os.getenv(&quot;LUA_CPATH&quot;) .. &quot;;&quot; .. package.cpath
</code></pre>
</li>
</ul>
<p>Now you can install packages using luarocks. Be sure to append <code>--lua-version</code>.</p>
<p>Example:</p>
<pre><code class="language-bash">luarocks install luafilesystem --local --lua-version 5.1
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="writing-plugins"><a class="header" href="#writing-plugins">Writing Plugins</a></h1>
<p>Anyone who can write <a href="https://www.lua.org">Lua</a> code, can write xplr plugins.</p>
<p>Just follow the instructions and best practices:</p>
<h2 id="naming"><a class="header" href="#naming">Naming</a></h2>
<p>xplr plugins are named using hiphen (<code>-</code>) separated words that may also include
integers. They will be plugged using the <code>require()</code> function in Lua.</p>
<h2 id="structure"><a class="header" href="#structure">Structure</a></h2>
<p>A minimal plugin should confirm to the following structure:</p>
<pre><code>plugin-name
├── README.md
└── init.lua
</code></pre>
<p>You can also use
<a href="https://github.com/sayanarijit/plugin-template1.xplr">this template</a>.</p>
<h3 id="readmemd"><a class="header" href="#readmemd">README.md</a></h3>
<p>This is where you document what the plugin does, how to use it, etc.</p>
<h3 id="initlua"><a class="header" href="#initlua">init.lua</a></h3>
<p>This file is executed to load the plugin. It should expose a <code>setup()</code>
function, which will be used by the users to setup the plugin.</p>
<p>Example:</p>
<pre><code class="language-lua">local function setup(args)
local xplr = xplr
-- do stuff with xplr
end
return { setup = setup }
</code></pre>
<h2 id="publishing"><a class="header" href="#publishing">Publishing</a></h2>
<p>When publishing plugins on GitHub or other repositories, it's a best practice
to append <code>.xplr</code> to the name to make them distinguishable. Similar to the
<code>*.nvim</code> naming convention for <a href="https://neovim.io">Neovim</a> plugins.</p>
<p>Finally, after publishing, don't hesitate to
<a href="https://github.com/sayanarijit/xplr/discussions/categories/show-and-tell">let us know</a>.</p>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Visit <a href="awesome-plugins.html">Awesome Plugins</a> for xplr plugin examples.</p>
<h2 id="also-see-7"><a class="header" href="#also-see-7">Also See</a></h2>
<ul>
<li><a href="https://github.com/sayanarijit/xplr/wiki/Hacks">Tip: A list of hacks yet to make it as Lua plugins</a></li>
<li><a href="https://github.com/sayanarijit/xplr/discussions/274">Tip: Some UI and themeing tips</a></li>
<li><a href="https://github.com/sayanarijit/xplr/discussions/273">Tip: A list of handy utility functions</a></li>
<li><a href="https://github.com/sayanarijit/xplr/discussions/250">Tip: Share tips and tricks working with Lua</a></li>
<li><a href="configure-key-bindings.html#tutorial-adding-a-new-mode">Tutorial: Adding a New Mode</a></li>
<li><a href="environment-variables-and-pipes.html#example-using-environment-variables-and-pipes">Example: Using Environment Variables and Pipes</a></li>
<li><a href="lua-function-calls.html#example-using-lua-function-calls">Example: Using Lua Function Calls</a></li>
<li><a href="layout.html#example-defining-custom-layout">Example: Defining Custom Layout</a></li>
<li><a href="column-renderer.html#example-customizing-table-renderer">Example: Customizing Table Renderer</a></li>
<li><a href="layout.html#example-render-a-custom-dynamic-table">Example: Render a custom dynamic table</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="awesome-plugins"><a class="header" href="#awesome-plugins">Awesome Plugins</a></h1>
<p>Here's a list of awesome xplr plugins that you might want to <a href="installing-plugins.html">check out</a>. If none
of the following plugins work for you, it's very easy to
<a href="writing-plugins.html">write your own</a>.</p>
<h3 id="extension-2"><a class="header" href="#extension-2">Extension</a></h3>
<ul>
<li><a href="https://github.com/sayanarijit/command-mode.xplr"><strong>sayanarijit/command-mode.xplr</strong></a> The missing command mode for xplr.</li>
<li><a href="https://github.com/igorepst/context-switch.xplr"><strong>igorepst/context-switch.xplr</strong></a> Context switch plugin for xplr.</li>
<li><a href="https://github.com/sayanarijit/dual-pane.xplr"><strong>sayanarijit/dual-pane.xplr</strong></a> Implements support for dual-pane navigation into xplr.</li>
<li><a href="https://github.com/sayanarijit/map.xplr"><strong>sayanarijit/map.xplr</strong></a> Visually inspect and interactively execute batch commands using xplr.</li>
<li><a href="https://github.com/prncss-xyz/type-to-nav.xplr"><strong>prncss-xyz/type-to-nav.xplr</strong></a> Inspired by <a href="https://github.com/jarun/nnn/wiki/concepts#type-to-nav">nnn's type-to-nav mode</a> for xplr,
with some tweaks.</li>
<li><a href="https://github.com/igorepst/term.xplr"><strong>igorepst/term.xplr</strong></a> Terminal integration for xplr</li>
<li><a href="https://github.com/dtomvan/xpm.xplr"><strong>dtomvan/xpm.xplr</strong></a> The XPLR Plugin Manager</li>
</ul>
<h3 id="integration"><a class="header" href="#integration">Integration</a></h3>
<ul>
<li><a href="https://github.com/sayanarijit/alacritty.xplr"><strong>sayanarijit/alacritty.xplr</strong></a> <a href="https://github.com/alacritty/alacritty">Alacritty</a> integration for xplr.</li>
<li><a href="https://github.com/sayanarijit/dragon.xplr"><strong>sayanarijit/dragon.xplr</strong></a> Drag and drop files using <a href="https://github.com/mwh/dragon">dragon</a>.</li>
<li><a href="https://github.com/sayanarijit/dua-cli.xplr"><strong>sayanarijit/dua-cli.xplr</strong></a> Get the disk usage using <a href="https://github.com/Byron/dua-cli">dua-cli</a> with selection
support.</li>
<li><a href="https://github.com/sayanarijit/fzf.xplr"><strong>sayanarijit/fzf.xplr</strong></a> Fuzzy search using <a href="https://github.com/junegunn/fzf">fzf</a> to focus on a file or enter</li>
<li><a href="https://github.com/sayanarijit/find.xplr"><strong>sayanarijit/find.xplr</strong></a> An interactive finder plugin to complement <a href="https://github.com/sayanarijit/map.xplr">map.xplr</a>.</li>
<li><a href="https://github.com/sayanarijit/nvim-ctrl.xplr"><strong>sayanarijit/nvim-ctrl.xplr</strong></a> Send files to running Neovim sessions using
<a href="https://github.com/chmln/nvim-ctrl">nvim-ctrl</a>.</li>
<li><a href="https://github.com/dtomvan/ouch.xplr"><strong>dtomvan/ouch.xplr</strong></a> This plugin uses <a href="https://github.com/ouch-org/ouch">ouch</a> to compress and decompress files.</li>
<li><a href="https://github.com/dtomvan/paste-rs.xplr"><strong>dtomvan/paste-rs.xplr</strong></a> Use this plugin to paste your files to
<a href="https://paste.rs">paste.rs</a>, and open/delete them later using <a href="https://github.com/junegunn/fzf">fzf</a>.</li>
<li><a href="https://github.com/sayanarijit/preview-tabbed.xplr"><strong>sayanarijit/preview-tabbed.xplr</strong></a> Preview paths using suckless <a href="https://tools.suckless.org/tabbed/">tabbed</a> and
<a href="https://github.com/jarun/nnn/blob/master/plugins/preview-tabbed">nnn preview-tabbed</a>.</li>
<li><a href="https://github.com/sayanarijit/qrcp.xplr"><strong>sayanarijit/qrcp.xplr</strong></a> Send and receive files via QR code using <a href="https://github.com/claudiodangelis/qrcp">qrcp</a>.</li>
<li><a href="https://github.com/sayanarijit/trash-cli.xplr"><strong>sayanarijit/trash-cli.xplr</strong></a> Trash files and directories using <a href="https://github.com/andreafrancia/trash-cli">trash-cli</a>.</li>
<li><a href="https://github.com/sayanarijit/xargs.xplr"><strong>sayanarijit/xargs.xplr</strong></a> Batch execute commands on the focused or selected files
using <code>xargs</code>.</li>
<li><a href="https://github.com/sayanarijit/xclip.xplr"><strong>sayanarijit/xclip.xplr</strong></a> Copy and paste with system clipboard using <a href="https://github.com/astrand/xclip">xclip</a>.</li>
<li><a href="https://github.com/sayanarijit/zoxide.xplr"><strong>sayanarijit/zoxide.xplr</strong></a> Change directory using the <a href="https://github.com/ajeetdsouza/zoxide">zoxide</a> database.</li>
</ul>
<h3 id="theme"><a class="header" href="#theme">Theme</a></h3>
<ul>
<li><a href="https://github.com/sayanarijit/material-landscape.xplr"><strong>sayanarijit/material-landscape.xplr</strong></a> Material Landscape</li>
<li><a href="https://github.com/sayanarijit/material-landscape2.xplr"><strong>sayanarijit/material-landscape2.xplr</strong></a> Material Landscape 2</li>
<li><a href="https://github.com/sayanarijit/zentable.xplr"><strong>sayanarijit/zentable.xplr</strong></a> A clean, distraction free xplr table UI</li>
<li><a href="https://github.com/prncss-xyz/icons.xplr"><strong>prncss-xyz/icons.xplr</strong></a> An icon theme for xplr.</li>
</ul>
<h2 id="also-see-8"><a class="header" href="#also-see-8">Also See:</a></h2>
<ul>
<li><a href="awesome-hacks.html">Awesome Hacks</a></li>
<li><a href="awesome-integrations.html">Awesome Integrations</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="integration-1"><a class="header" href="#integration-1">Integration</a></h1>
<p>xplr is designed to integrate well with other tools and commands. It can be
used as a file picker or a pluggable file manager.</p>
<ul>
<li><a href="awesome-integrations.html">Awesome Integrations</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="awesome-integrations"><a class="header" href="#awesome-integrations">Awesome Integrations</a></h1>
<p>Here's a list of awesome xplr integrations that you might want to check out.</p>
<p>If none of the following integrations work for you, you can create your own and
<a href="https://github.com/sayanarijit/xplr/discussions/categories/show-and-tell">let us know</a>.</p>
<h3 id="editor"><a class="header" href="#editor">Editor</a></h3>
<ul>
<li><a href="https://github.com/is0n/fm-nvim"><strong>fm-nvim</strong></a> Neovim plugin that lets you use your favorite terminal file managers from within Neovim.</li>
<li><a href="https://github.com/voldikss/vim-floaterm#xplr"><strong>vim-floaterm</strong></a> xplr integrated in vim-floaterm (Neo)vim plugin.</li>
<li><a href="https://github.com/fhill2/xplr.nvim"><strong>xplr.nvim</strong></a> Opens xplr inside nvim, and hosts a msgpack client inside xplr.</li>
<li><a href="https://github.com/sayanarijit/xplr.vim"><strong>xplr.vim</strong></a> Pick files in Vim using xplr.</li>
</ul>
<h3 id="shell"><a class="header" href="#shell">Shell</a></h3>
<ul>
<li><a href="https://github.com/romkatv/powerlevel10k/blob/191d1b89e325ee3b6d2d75a394654aaf4f077a7c/internal/p10k.zsh#L4756-L4768"><strong>powerlevel10k</strong></a> Powerlevel10k prompt for xplr shell.</li>
</ul>
<h3 id="security-tools"><a class="header" href="#security-tools">Security Tools</a></h3>
<ul>
<li><a href="https://github.com/orhun/gpg-tui#importreceive"><strong>gpg-tui</strong></a> Import GPG certificates using xplr.</li>
</ul>
<h2 id="also-see-9"><a class="header" href="#also-see-9">Also See:</a></h2>
<ul>
<li><a href="awesome-hacks.html">Awesome Hacks</a></li>
<li><a href="awesome-plugins.html">Awesome Plugins</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="todo"><a class="header" href="#todo">TODO</a></h1>
<ul>
<li><input disabled="" type="checkbox" checked=""/>
Saner key bindings.</li>
<li><input disabled="" type="checkbox" checked=""/>
Pipes.</li>
<li><input disabled="" type="checkbox" checked=""/>
Native search &amp; filter.</li>
<li><input disabled="" type="checkbox" checked=""/>
Create, copy, move, delete files directly.</li>
<li><input disabled="" type="checkbox" checked=""/>
logging support.</li>
<li><input disabled="" type="checkbox" checked=""/>
Version compatibility instructions.</li>
<li><input disabled="" type="checkbox" checked=""/>
Implement CLI arguments.</li>
<li>~Add support for tabs and/or panes (non native)~ <a href="https://github.com/sayanarijit/xplr/wiki/Hacks#spawn-multiple-sessions-in-different-windows">hacked</a> | <a href="https://github.com/sayanarijit/xplr/discussions/15">discussion</a></li>
<li>~Implement bookmarks.~ <a href="https://github.com/sayanarijit/xplr/wiki/Hacks#bookmark">hacked</a></li>
<li><input disabled="" type="checkbox" checked=""/>
Add sorting support.</li>
<li><input disabled="" type="checkbox" checked=""/>
Add filter support.</li>
<li><input disabled="" type="checkbox" checked=""/>
File previews.</li>
<li><input disabled="" type="checkbox" checked=""/>
Implement plugins support (or some way to easily share configuration).</li>
<li><input disabled="" type="checkbox" checked=""/>
Bigger (and better) help menu.</li>
<li><input disabled="" type="checkbox" checked=""/>
Offline docs.</li>
<li><input disabled="" type="checkbox"/>
Support for background services</li>
<li><input disabled="" type="checkbox" checked=""/>
~Customize~ switch UI at run-time.</li>
<li><input disabled="" type="checkbox"/>
More tests and benchmarks.</li>
<li><input disabled="" type="checkbox"/>
Measure code coverage.</li>
<li><input disabled="" type="checkbox"/>
Improve the <a href="https://github.com/sayanarijit/xplr.vim">vim plugin</a>.</li>
<li><input disabled="" type="checkbox"/>
Cleanup, refactor, optimize.</li>
</ul>
<p><a href="https://github.com/sayanarijit/xplr/discussions/2">add more</a></p>
<p>Like this project so far? <strong><a href="contribute.html">Please consider contributing</a>.</strong></p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="alternatives"><a class="header" href="#alternatives">Alternatives</a></h1>
<p>These are the alternative TUI/CLI file managers/explorers you might want to check out (in no particular order).</p>
<ul>
<li><a href="https://github.com/jarun/nnn/">nnn</a></li>
<li><a href="https://github.com/vifm/vifm">vifm</a></li>
<li><a href="https://github.com/ranger/ranger">ranger</a></li>
<li><a href="https://github.com/gokcehan/lf">lf</a></li>
<li><a href="https://github.com/kamiyaa/joshuto">joshuto</a></li>
<li><a href="https://github.com/dylanaraps/fff">fff</a></li>
<li><a href="https://github.com/MidnightCommander/mc">mc</a></li>
<li><a href="https://github.com/Canop/broot">broot</a></li>
<li><a href="https://github.com/rabite0/hunter">hunter</a></li>
<li><a href="https://git.2f30.org/noice/">noice</a></li>
<li><a href="https://github.com/pasqu4le/clifm">clifm</a></li>
<li><a href="https://github.com/leo-arch/clifm">clifm</a> (non curses)</li>
</ul>
<p><a href="community.html">add more</a></p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="upgrade-guide"><a class="header" href="#upgrade-guide">Upgrade Guide</a></h1>
<p>When you upgrade xplr, you might see an error like this</p>
<pre><code>Incompatible script version in: /home/sayanarijit/.config/xplr/init.lua. The script version is: 0.9.0, the required version is: 0.10.1. Visit https://github.com/sayanarijit/xplr/wiki/Upgrade-Guide
</code></pre>
<p>All you need to do is follow the <a href="upgrade-guide.html#instructions">instructions</a> starting from
your config version, all the way to the required version.</p>
<details>
<summary>Expand for more information</summary>
<p>With every update, we either implement a <code>major</code> breaking change (e.g.
deprecating or replacing messages), or a <code>minor</code> feature addition (e.g. adding
new messages) or <code>patch</code>, fixes, and optimization (e.g. performance
optimization).</p>
<p>Knowing that we use the <code>{major}.{minor}.{patch}</code> versioning format,</p>
<ul>
<li>Major version mismatch are generally incompatible. xplr will fail
with error.</li>
<li>Minor version upgrades (not downgrades) and patch fixes are backwards
compatible. You might get notified by log a message which you can disable by
updating the version in your config file.</li>
<li>However, if the config file has a higher value for the minor version
than the app, then also xplr will fail with error, suggesting you
to visit this page.
Though in that case, you will be downgrading your config file based on your
app version.</li>
</ul>
<p>e.g.</p>
<ul>
<li><code>1.0.0</code> -&gt; <code>1.0.x</code>: Bug fix (fully compatible).</li>
<li><code>1.0.0</code> -&gt; <code>1.x.x</code>: Only backwards compatible. You can't generally use for
e.g. <code>app-1.0.0</code> with <code>config-1.1.0</code>. But vice versa is fine.</li>
<li><code>1.0.0</code> -&gt; <code>x.x.x</code>: Not compatible at all.</li>
</ul>
<p>Note that until we're <code>v1</code>, we'll be using the <code>{minor}</code> version number as
<code>{major}</code>, and the <code>{patch}</code> fix number as <code>{minor}</code> to determine
compatibility.</p>
</details>
<h3 id="instructions"><a class="header" href="#instructions">Instructions</a></h3>
<h4 id="v0164---v0174"><a class="header" href="#v0164---v0174"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.16.4">v0.16.4</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.17.4">v0.17.4</a></a></h4>
<ul>
<li>Deprecated <code>app.directory_buffer</code>, <code>app.history</code>, and <code>app.last_modes</code> in
the custom dynamic layout renderer context.
As of now, there's no way to access these fields in dynamic layouts. While
<code>app.history</code> and <code>app.last_modes</code> can be re-added upon request
(with justification), <code>app.directory_buffer</code> has been deprecated for good.
However, there's no change in the <code>CallLua*</code> context.</li>
<li>Set <code>xplr.config.general.hide_remaps_in_help_menu</code> to <code>true</code> to hide the remaps in
help menu.</li>
<li><code>None</code> will be serialized to <code>nil</code> in Lua.</li>
<li><code>LuaEval</code> can now return a function that will be called with the Lua Context
argument. Refer to the <code>Full List of Messages</code> doc for example.</li>
<li>From version v0.17.1, set <code>xplr.config.general.disable_debug_error_mode</code> to
<code>true</code> to disable switching to the &quot;debug error&quot; mode when startup errors
occur.</li>
<li>From version v0.17.2, you can use CLI argument <code>--print-pwd-as-result</code> for cd
on quit, and key binding <code>ctrl-d</code> to duplicate a path in the same directory
with a different name.</li>
<li>Since version v0.17.3, you can use <code>border_type</code>, <code>border_style</code> to customize
borders, and <code>enforce_bounded_index_navigation</code> to customize up/down
navigation behavior when focus is on the top or bottom node.</li>
</ul>
<h4 id="v0152---v0164"><a class="header" href="#v0152---v0164"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.15.2">v0.15.2</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.16.4">v0.16.4</a></a></h4>
<ul>
<li>Deprecated <code>config.general.cursor</code>. The default terminal cursor will be used
for the time being.</li>
<li>Opening xplr inside a symlink will not resolve the path.</li>
<li>You can now replace most boilerplate configuration handling keys to send
<code>BufferInputFromKey</code>, <code>RemoveInputBufferLastCharacter</code>,
<code>RemoveInputBufferLastWord</code>, <code>SetInputBuffer = &quot;&quot;</code> etc. messages with a
single <code>UpdateInputBufferFromKey</code> message.</li>
<li>You can now pass multiple paths as command-line arguments or via stdin to
select paths, e.g. <code>xplr -- $PWD /path/to/select/1 /path/to/select/2</code>.</li>
<li>Pass <code>--force-focus</code> to focus on the first path even if it's a directory,
e.g. <code>xplr . --force-focus</code>.</li>
<li>Use new messages <code>LuaEval</code> and <code>LuaEvalSilently</code> to run Lua code without
needing to define a function. However, the <code>app</code> context won't be available.</li>
<li>You can now use new key handlers in the config:
<ul>
<li>on_alphanumeric</li>
<li>on_character</li>
<li>on_navigation</li>
<li>on_function</li>
</ul>
</li>
</ul>
<p><sub>Like this project so far? <strong><a href="contribute.html">Please consider contributing</a></strong>.</sub></p>
<h4 id="v0147---v0152"><a class="header" href="#v0147---v0152"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.14.7">v0.14.7</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.15.2">v0.15.2</a></a></h4>
<ul>
<li>Deprecated <code>config</code> field from <code>CallLua</code> argument. Use the globally available
<code>xplr.config</code> instead.</li>
<li><code>xplr.config.general.disable_recover_mode</code> has been deprecated. Use
<code>xplr.config.general.enable_recover_mode</code> instead.</li>
<li>Use <code>xplr.config.general.focus_selection_ui</code> to highlight selected files
under focus differently than files under focus that are not selected.</li>
<li>Use <code>PopModeKeepingInputBuffer</code>, and SwitchMode alternatives to switching to
different modes without resetting the input buffer.</li>
<li>Use the new <code>CustomContent</code> layout option to render custom content.</li>
<li>Use the new <code>layout</code> field in a mode to define custom layout for a specific
mode.</li>
<li>Library users please refer to the latest API docs and examples.</li>
</ul>
<h4 id="v0137---v0147"><a class="header" href="#v0137---v0147"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.13.7">v0.13.7</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.14.7">v0.14.7</a></a></h4>
<ul>
<li>macOS users need to place their config file (<code>init.lua</code>) in
<code>$HOME/.config/xplr/</code> or <code>/etc/xplr/</code>.</li>
<li>Library users please refer to the latest API docs.</li>
<li>Check out the new messages: <code>{Start|Stop|Toggle}Fifo</code>. These enable support
for <a href="https://github.com/sayanarijit/xplr/pull/229#issue-662426960">FIFO based file previews</a>.</li>
<li>You can disable the recover mode using <code>config.general.disable_recover_mode = true</code>.</li>
<li>Try running <code>xplr --help</code>. Yes, CLI has been implemented.</li>
<li>Since version <code>v0.14.3</code>, <code>StartFifo</code> and <code>ToggleFifo</code> will write to the FIFO
path when called. So, there's no need to pipe the focus path explicitely.</li>
<li>Since version <code>v0.14.3</code>, general config <code>xplr.config.start_fifo</code> is available
which can be set to a file path to start a fifo when xplr starts.</li>
<li>Since version <code>v0.14.4</code>, <code>$XPLR_SESSION_PATH</code> can be used to dump session
related data.</li>
<li>Since version <code>v0.14.6</code>, the <code>-C</code> or <code>--extra-config</code> CLI argument is
available.</li>
</ul>
<h4 id="v0121---v0137"><a class="header" href="#v0121---v0137"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.12.1">v0.12.1</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.13.7">v0.13.7</a></a></h4>
<ul>
<li>Lua functions called using <a href="https://docs.rs/xplr/latest/xplr/app/enum.ExternalMsg.html#variant.CallLua"><code>CallLua</code></a> and <a href="https://docs.rs/xplr/latest/xplr/app/enum.ExternalMsg.html#variant.CallLuaSilently"><code>CallLuaSilently</code></a> messages will receive <a href="https://docs.rs/xplr/latest/xplr/app/struct.CallLuaArg.html"><code>CallLuaArg</code></a> object as the function argument (instead of the <a href="https://docs.rs/xplr/latest/xplr/app/struct.App.html"><code>App</code></a> object).</li>
<li>Each <code>node_types</code> config will inherit defaults from matching less specifig <code>node_types</code> config and overwrite them.</li>
<li>Since version <code>v0.13.2</code>, you don't need to use/send <code>Refresh</code> anymore. It will be auto-handled by xplr.</li>
</ul>
<h4 id="v0111---v0121"><a class="header" href="#v0111---v0121"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.11.1">v0.11.1</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.12.1">v0.12.1</a></a></h4>
<ul>
<li><code>xplr.config.node_types.mime_essence</code> has split into type and subtype. Hence, instead of <code>xplr.config.node_types.mime_essence[&quot;text/plain&quot;] = ..</code> use <code>xplr.config.node_types.mime_essence[&quot;text&quot;] = { plain = .. }</code>.</li>
<li>You can also define <code>xplr.config.node_types.mime_essence[&quot;text&quot;][&quot;*&quot;]</code> that will match all text types (<code>text/*</code>).</li>
</ul>
<h4 id="v0102---v0111"><a class="header" href="#v0102---v0111"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.10.2">v0.10.2</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.11.1">v0.11.1</a></a></h4>
<ul>
<li><code>remaps:</code> has been removed to avoid confusion. Use lua assignments instead.
For e.g.
<pre><code>xplr.config.modes.builtin.default.key_bindings.on_key[&quot;v&quot;] = xplr.config.modes.builtin.default.key_bindings.on_key.space
</code></pre>
</li>
</ul>
<h4 id="v091---v0102"><a class="header" href="#v091---v0102"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.9.1">v0.9.1</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.10.2">v0.10.2</a></a></h4>
<ul>
<li><a href="https://github.com/sayanarijit/xplr/blob/85696ded7a/src/config.yml"><code>config.yml</code></a> has been fully replaced with <a href="https://github.com/sayanarijit/xplr/blob/main/src/init.lua"><code>init.lua</code></a>. If you have a lot of customization in your <code>config.yml</code>, <a href="https://github.com/sayanarijit/xplr-yml2lua">xplr-yml2lua</a> can help you with migrating it to <code>init.lua</code>.</li>
<li><code>Handlebars</code> templates has been replaced with <a href="https://github.com/sayanarijit/xplr/blob/bfdb7736b99bc3c5ae53e7d621ba0e7ca2299b14/src/init.lua#L2005-L2064">Lua functions</a>. You can either remove the customizations or overwrite the functions accordingly.</li>
<li>Added new messages <code>CallLua</code> and <code>CallLuaSilently</code> to call lua functions. The app state will be passed as input to the functions, and the returned messages will be handled by xplr. <code>CallLua</code> and <code>CallLuaSilently</code> are more flexible (and probably faster) alternatives to <code>Call</code>, <code>CallSilently</code>, <code>BashExec</code> and <code>BashExecSilently</code>. <a href="https://github.com/sayanarijit/xplr/pull/177#issue-650643573">e.g.</a></li>
</ul>
<h4 id="v090---v091"><a class="header" href="#v090---v091"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.9.0">v0.9.0</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.9.1">v0.9.1</a></a></h4>
<ul>
<li>You can now set <code>remaps: {key: null}</code> to un-map a key.</li>
<li><code>gx</code> will open the item under focus.</li>
<li>New key map <code>:sx</code> will open the selected items.</li>
</ul>
<h4 id="v080---v090"><a class="header" href="#v080---v090"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.8.0">v0.8.0</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.9.0">v0.9.0</a></a></h4>
<p>Your previous config should mostly work fine. However, in case you are using <code>SwitchMode</code> heavily in your custom config, follow along.</p>
<ul>
<li>Introduced new message <code>PopMode</code>. You might want to use this message instead of <code>SwitchMode*</code> when returning back to the previous mode.</li>
<li>After using (the group of) <code>PopMode</code> and <code>SwitchMode*</code> messages, you are now required to <code>Refresh</code> manually to avoid the UI lag.</li>
<li>Pressing any invalid key will now lead you to the <code>recover</code> mode and will protect you from typing further invalid keys. Press <code>esc</code> to escape the <code>recover</code> mode.</li>
<li>Introduced new message <code>LogWarning</code>, similar to other <code>Log*</code> messages.</li>
<li>Creating files and directories has been optimized for batch creation.</li>
</ul>
<h4 id="v072---v080"><a class="header" href="#v072---v080"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.7.2">v0.7.2</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.8.0">v0.8.0</a></a></h4>
<p>If you have made changes to the config file,</p>
<ul>
<li>Replace message <code>Explore</code> with <code>ExplorePwd</code> or <code>ExplorePwdAsync</code> or probably <code>ExploreParentsAsync</code>.</li>
<li>Pipe <code>$XPLR_PIPE_FOCUS_OUT</code> has been removed. Use <code>$XPLR_FOCUS_PATH</code> env var instead.</li>
<li>You might want to review your path escaping logics. For e.g. use <code>echo FocusPath: &quot;'&quot;$PWD&quot;'&quot; &gt;&gt; $PIPE</code> instead of <code>echo &quot;FocusPath: $PWD&quot; &gt;&gt; $PIPE</code>.</li>
</ul>
<h4 id="v070---v072"><a class="header" href="#v070---v072"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.7.0">v0.7.0</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.7.2">v0.7.2</a></a></h4>
<ul>
<li>Just update the <code>version</code> in your config file.</li>
<li>For version &gt;= <code>v0.7.1</code>, you might want to free up or remap the <code>tab</code> key in <code>search</code> mode to enable easy selection during search.</li>
</ul>
<h4 id="v060---v070"><a class="header" href="#v060---v070"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.6.0">v0.6.0</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.7.0">v0.7.0</a></a></h4>
<p>If you haven't made any changes in the config file, you should be fine just updating the version number. Else,</p>
<ul>
<li>You can make the <code>Table: ...</code>, <code>InputAndLogs: ...</code> layout values null and define the common properties in the <code>general.panel_ui</code> instead.</li>
</ul>
<h4 id="v0513---v060"><a class="header" href="#v0513---v060"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.5.13">v0.5.13</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.6.0">v0.6.0</a></a></h4>
<p>If you haven't made any changes in the config file, you should be fine just updating the version number. Else,</p>
<ul>
<li>Rename <code>add_modifier: {bits: 1}</code> to <code>add_modifiers: [Bold]</code>, <code>sub_modifier: {bits: 1}</code> to <code>sub_modifiers: [Bold]</code> and so on.</li>
<li>Rename <code>percentage: 10</code> to <code>Percentage: 10</code>, <code>ratio: 1</code> to <code>Ratio: 1</code> and so on.</li>
<li>You might want to free up or remap the <code>ctrl-w</code> key binding in <code>default</code> mode to enable layout switching.</li>
</ul>
<p>Optionally, checkout this new theme to learn more about what's new.</p>
<h4 id="v050---v0513"><a class="header" href="#v050---v0513"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.5.0">v0.5.0</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.5.13">v0.5.13</a></a></h4>
<ul>
<li>Just update the <code>version</code> in your config file.</li>
<li>For versions &gt;= <code>v0.5.8</code>, you can set <code>$OPENER</code> env var to declare a global GUI file opener (to open files using keys <code>gx</code>).</li>
<li>You might also want to update other mappings to handle files with names starting with <code>-</code> (hiphen). For example, instead of <code>rm ${filename}</code> use <code>rm -- ${filename}</code>. Same goes for <code>cp</code>, <code>mv</code>, <code>cat</code>, <code>touch</code> etc.</li>
<li>For version &gt;= <code>v0.5.13</code>, you might want to use the more specific <code>SwitchModeBuiltin</code> and <code>SwitchModeCustom</code> messages instead of the general <code>SwitchMode</code> message.</li>
</ul>
<h4 id="v043---v050"><a class="header" href="#v043---v050"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.4.3">v0.4.3</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.5.0">v0.5.0</a></a></h4>
<p>If you haven't have any changes in the config file, you should be fine just updating the version number.</p>
<p>Else do the following</p>
<ul>
<li>Replace <code>{RelativePathIs, case_sensitive: true}</code> with <code>RelativePathIs</code>.</li>
<li>Replace <code>{RelativePathIs, case_sensitive: false}</code> with <code>IRelativePathIs</code>.</li>
<li>Do the same with other filters you are using.</li>
<li>You might want to update your <code>backspace</code> handling to use the <code>RemoveInputBufferLastCharacter</code> message.</li>
<li>You might want to free-up <code>f</code>, <code>s</code>, <code>ctrl-r</code> and <code>ctrl-u</code> key bindings in the default mode, or remap them.</li>
<li>You might want to use the new UI variables.</li>
<li>Update your config version to <code>v0.5.0</code>.</li>
</ul>
<h4 id="v042---v043"><a class="header" href="#v042---v043"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.4.2">v0.4.2</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.4.3">v0.4.3</a></a></h4>
<p>If you have customized <code>general.table.row.cols</code>, you might want to <a href="https://github.com/sayanarijit/xplr/blob/af1cda5762/src/config.yml#L46-L48">update it</a> to use the new variables with better symlink support.</p>
<h4 id="v041---v042"><a class="header" href="#v041---v042"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.4.1">v0.4.1</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.4.2">v0.4.2</a></a></h4>
<p>In case you have mapped the keys <code>q</code>, <code>ctrl-i</code> and <code>ctrl-o</code>, you may want to revisit the default mode key bindings and remap accordingly to use the new functionalities.</p>
<h4 id="v0313---v041"><a class="header" href="#v0313---v041"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.3.13">v0.3.13</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.4.1">v0.4.1</a></a></h4>
<p>A lot has changed (apologies). But I promise from now on, upgrading will be much less painful (thanks to <a href="https://github.com/maximbaz">@maximbaz</a>'s valuable <a href="https://github.com/sayanarijit/xplr/issues/45#issue-854447104">inputs</a> and <a href="https://github.com/sayanarijit/xplr/pull/47">code reviews</a>).</p>
<p>So, to start with the upgrade, let's remove everything from your config file except the <code>version</code> field and your custom modifications. If <code>version</code> is the only thing remaining, update it to <code>v0.4.1</code> and you are done.</p>
<p>Else, do the following</p>
<ul>
<li>Rename <code>general.focused_ui</code> to <code>general.focus_ui</code> (<a href="https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L124">see here</a>).</li>
<li>Rename <code>filetypes</code> to <code>node_types</code>. (<a href="https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L145">see here</a>)</li>
<li>Rename <code>custom</code> field to <code>meta</code>. (<a href="https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L154-L155">see here</a>)</li>
<li>Move <code>icon</code> to <code>meta.icon</code>. (<a href="https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L45">see here</a>)</li>
<li>Rename <code>normal_ui</code> to <code>default_ui</code>. (<a href="https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L114">see here</a>)</li>
<li>Split <code>modes</code> into <code>modes.builtin</code> and <code>modes.custom</code> (<a href="https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L180-L181">see here</a>). Migrate your custom modes to <code>modes.custom</code>. And copy only the changes in the in-built modes in <code>modes.builtin</code>.</li>
<li>Finally, update the <code>version</code> to <code>v0.4.1</code>.</li>
</ul>
<h4 id="v038---v0313"><a class="header" href="#v038---v0313"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.3.8">v0.3.8</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.3.13">v0.3.13</a></a></h4>
<p>Your current config should work fine. However, you might want to replace some <code>Call</code> and <code>BashExec</code> messages with <code>CallSilently</code> and <code>BashExecSilently</code> to remove the flickering of the screen.</p>
<p>If you haven't made any changes to the configuration, you can delete and regenerate it.</p>
<p>Else, do the following</p>
<ul>
<li>Check the new default config by temporarily removing your current config (with backup) and dumping the new config.</li>
<li>Search for <code>Call</code> and <code>BashExec</code> in the new config.</li>
<li>Compare and probably replace the associated actions in your current config</li>
</ul>
<h4 id="v030---v038"><a class="header" href="#v030---v038"><a href="https://github.com/sayanarijit/xplr/releases/tag/v0.3.0">v0.3.0</a> -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.3.8">v0.3.8</a></a></h4>
<p>Your current config should work fine. However, you might want to replace some <code>ResetNodeFilters</code> messages with <code>RemoveNodeFilter</code> and <code>RemoveNodeFilterFromInput</code> to get a better search and filter experience.</p>
<p>If you haven't made any changes to the configuration, you can delete and regenerate it.</p>
<p>Else, do the following</p>
<ul>
<li>Check the new default config by temporarily removing your current config (with backup) and dumping the new config.</li>
<li>Search for <code>RemoveNodeFilterFromInput</code> in the new config.</li>
<li>Compare and probably replace the associated actions in your current config.</li>
</ul>
<h4 id="v0214---v030"><a class="header" href="#v0214---v030">v0.2.14 -&gt; <a href="https://github.com/sayanarijit/xplr/releases/tag/v0.3.0">v0.3.0</a></a></h4>
<p>If you haven't made any changes to the configuration, you can delete and regenerate it.</p>
<p>Else do the following:</p>
<ul>
<li><code>$XPLR_APP_YAML</code> has been removed. You can use <code>Debug</code> to export the app state.</li>
<li><code>$XPLR_RESULT</code> has been ported to file <code>$XPLR_PIPE_RESULT_OUT</code>. Use <code>cat</code> instead of <code>echo</code>, <code>&lt;</code> instead of <code>&lt;&lt;&lt;</code> etc.</li>
<li><code>$XPLR_GLOBAL_HELP_MENU</code> has been ported to
file <code>$XPLR_PIPE_GLOBAL_HELP_MENU_OUT</code>. Use <code>cat</code> instead of <code>echo</code>, <code>&lt;</code> instead of <code>&lt;&lt;&lt;</code> etc.</li>
<li><code>$XPLR_DIRECTORY_NODES</code> has been ported to
file <code>$XPLR_PIPE_DIRECTORY_NODES_OUT</code>. Use <code>cat</code> instead of <code>echo</code>, <code>&lt;</code> instead of <code>&lt;&lt;&lt;</code> etc.</li>
<li><code>$XPLR_LOGS</code> has been ported to file <code>$XPLR_PIPE_LOGS_OUT</code>. Use <code>cat</code> instead of <code>echo</code>, <code>&lt;</code> instead of <code>&lt;&lt;&lt;</code> etc.</li>
<li><code>$XPLR_PIPE_RESULT</code> has been ported to file <code>$XPLR_PIPE_RESULT_OUT</code>. Use <code>cat</code> instead of <code>echo</code>, <code>&lt;</code> instead of <code>&lt;&lt;&lt;</code> etc.</li>
<li>Finally, update the <code>version</code> in your config file.</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="community"><a class="header" href="#community">Community</a></h1>
<p>Building an active community of awesome people and learning stuff together is
one of my reasons to publish this tool and maintain it. Hence, please feel free
to reach out via your preferred way.</p>
<ul>
<li>Real-time chat lovers can join our <a href="https://matrix.to/#/#xplr-pub:matrix.org"><strong>matrix room</strong></a> or <a href="https://discord.gg/JmasSPCcz3"><strong>discord channel</strong></a>.</li>
<li>Forum discussion veterans can <a href="https://github.com/sayanarijit/xplr/discussions"><strong>start a new GitHub discussion</strong></a>.</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><p>If you like xplr, and want to contribute, that would be really awesome.</p>
<p>You can contribute to this project in the following ways</p>
<ul>
<li>
<p>Contribute your time and expertise (read <a href="https://github.com/sayanarijit/xplr/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a> for instructions).</p>
<ul>
<li><strong>Developers:</strong> You can help me improve my code, fix things, implement features etc.</li>
<li><strong>Repository maintainers:</strong> You can save the users from the pain of managing xplr in their system manually.</li>
<li><strong>Code Reviewers:</strong> Teach me your ways of code.</li>
<li><strong>Designers:</strong> You can make the logo even more awesome, donate stickers and blog post worthy pictures.</li>
<li><strong>Bloggers, YouTubers &amp; broadcasters:</strong> You can help spread the word.</li>
</ul>
</li>
<li>
<p>Contribute by donating.</p>
<ul>
<li>You can <a href="https://opencollective.com/xplr">fuel me with coins of encouragement</a> or <a href="https://ko-fi.com/sayanarijit">buy me a coffee</a>.</li>
</ul>
</li>
</ul>
<p>For further queries or concern related to <code>xplr</code>, <a href="community.html">just ask us</a>.</p>
<h3 id="backers"><a class="header" href="#backers">Backers</a></h3>
<p><a href="https://opencollective.com/xplr#backer"><img src="https://opencollective.com/xplr/tiers/backer.svg?width=890" /></a></p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
</nav>
</div>
<script type="text/javascript">
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>
<!-- Custom JS scripts -->
<script type="text/javascript">
window.addEventListener('load', function() {
window.setTimeout(window.print, 100);
});
</script>
</body>
</html>