diff --git a/en/404.html b/en/404.html index 4889910..609eb4d 100644 --- a/en/404.html +++ b/en/404.html @@ -83,7 +83,7 @@ diff --git a/en/alternatives.html b/en/alternatives.html index dd459be..3eaf5a8 100644 --- a/en/alternatives.html +++ b/en/alternatives.html @@ -82,7 +82,7 @@ diff --git a/en/awesome-plugins.html b/en/awesome-plugins.html new file mode 100644 index 0000000..652c3d7 --- /dev/null +++ b/en/awesome-plugins.html @@ -0,0 +1,215 @@ + + + + + + Awesome Plugins - xplr book + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/en/community.html b/en/community.html index 0429b9e..691ad83 100644 --- a/en/community.html +++ b/en/community.html @@ -82,7 +82,7 @@ diff --git a/en/configuration.html b/en/configuration.html index 8e700eb..d59f794 100644 --- a/en/configuration.html +++ b/en/configuration.html @@ -82,7 +82,7 @@ @@ -161,12 +161,21 @@ will be ignored.

the command-line argument -c / --config to specify its path explicitely. In that case, both ~/.config/xplr/init.lua and /etc/xplr/init.lua will be ignored.

-

How Config is Loaded

+

How Config Is Loaded

When xplr loads, it first executes the built-in init.lua to set the default values, which is then overwritten by another config file, if found using the following lookup order:

--config /path/to/init.lua > ~/.config/xplr/init.lua > /etc/xplr/init.lua

+

How to Configure

+ diff --git a/en/contribute.html b/en/contribute.html index e6b14a6..618d9a1 100644 --- a/en/contribute.html +++ b/en/contribute.html @@ -82,7 +82,7 @@ diff --git a/en/default-key-bindings.html b/en/default-key-bindings.html index 771bfe6..8502135 100644 --- a/en/default-key-bindings.html +++ b/en/default-key-bindings.html @@ -82,7 +82,7 @@ @@ -359,7 +359,7 @@ of modes and the key mappings for each mode.

- @@ -373,7 +373,7 @@ of modes and the key mappings for each mode.

- diff --git a/en/general-config.html b/en/general-config.html index 9e5bc42..cc6e278 100644 --- a/en/general-config.html +++ b/en/general-config.html @@ -82,7 +82,7 @@ diff --git a/en/index.html b/en/index.html index 21c143a..c80d073 100644 --- a/en/index.html +++ b/en/index.html @@ -82,7 +82,7 @@ diff --git a/en/install.html b/en/install.html index f2ea371..ea561b9 100644 --- a/en/install.html +++ b/en/install.html @@ -82,7 +82,7 @@ diff --git a/en/installing-plugins.html b/en/installing-plugins.html new file mode 100644 index 0000000..01bedc4 --- /dev/null +++ b/en/installing-plugins.html @@ -0,0 +1,227 @@ + + + + + + Installing Plugins - xplr book + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
+
+

Installing Plugins

+

Until we get a cool plugin manager, let's install plugins manually using the +following procedure:

+
    +
  • +

    Add the following line in ~/.config/xplr/init.lua

    +
    package.path = os.getenv("HOME") .. '/.config/xplr/plugins/?/src/init.lua'
    +
    +
  • +
  • +

    Clone the plugin

    +
    mkdir -p ~/.config/xplr/plugins
    +
    +git clone https://github.com/sayanarijit/material-landscape2.xplr ~/.config/xplr/plugins/material-landscape2
    +
    +
  • +
  • +

    Require the module in ~/.config/xplr/init.lua

    +
    require("material-landscape2").setup()
    +
    +-- The setup arguments might differ for different plugins.
    +-- Visit the project README for setup instructions.
    +
    +
  • +
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/en/introduction.html b/en/introduction.html index 9094de2..db49e3b 100644 --- a/en/introduction.html +++ b/en/introduction.html @@ -82,7 +82,7 @@ diff --git a/en/layouts.html b/en/layouts.html index 0d24b27..4959f48 100644 --- a/en/layouts.html +++ b/en/layouts.html @@ -82,7 +82,7 @@ diff --git a/en/message.html b/en/message.html index 9b4a808..8e49fa2 100644 --- a/en/message.html +++ b/en/message.html @@ -82,7 +82,7 @@ diff --git a/en/modes.html b/en/modes.html index 3bcf2c6..23c5d6f 100644 --- a/en/modes.html +++ b/en/modes.html @@ -82,7 +82,7 @@ @@ -151,7 +151,7 @@

Modes

xplr is a modal file explorer. That means the users switch between different -modes, each containing a different set to key bindings to avoid clashes. Users +modes, each containing a different set of key bindings to avoid clashes. Users can switch between these modes at run-time.

The modes can be configured using the xplr.config.modes Lua API.

It contains the following fields:

@@ -332,6 +332,8 @@ the default mode.

Now let's try out the new xplr-fzf integration.

xplr-fzf.gif

+
+

Visit Awesome Plugins for more integration options.

diff --git a/en/node_types.html b/en/node_types.html index 6856325..86de7c3 100644 --- a/en/node_types.html +++ b/en/node_types.html @@ -82,7 +82,7 @@ diff --git a/en/plugin.html b/en/plugin.html new file mode 100644 index 0000000..5b85516 --- /dev/null +++ b/en/plugin.html @@ -0,0 +1,210 @@ + + + + + + Plugin - xplr book + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
+
+

Plugin

+

xplr supports pluggable Lua modules that can be used to easily configure or +extend xplr UI and functionalities.

+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/en/post-install.html b/en/post-install.html index deb6e1d..78b6823 100644 --- a/en/post-install.html +++ b/en/post-install.html @@ -82,7 +82,7 @@ diff --git a/en/print.html b/en/print.html index 956e328..f5f8aba 100644 --- a/en/print.html +++ b/en/print.html @@ -83,7 +83,7 @@ @@ -159,8 +159,12 @@ intuitive, scriptable, keyboard controlled, real-time visual interface, also being an ideal candidate for further integration, enabling the users to achieve insane terminal productivity.

Quickstart

-

In this chapter, we'll learn how to install and configure xplr on our machine -for the first time.

+

Nice yo have to have here! Let's start quickly start our xplr journey with the +following steps:

+

Install

You can install xplr using one of the following ways. Each has their own advantages and limitations.

@@ -342,12 +346,21 @@ will be ignored.

the command-line argument -c / --config to specify its path explicitely. In that case, both ~/.config/xplr/init.lua and /etc/xplr/init.lua will be ignored.

-

How Config is Loaded

+

How Config Is Loaded

When xplr loads, it first executes the built-in init.lua to set the default values, which is then overwritten by another config file, if found using the following lookup order:

--config /path/to/init.lua > ~/.config/xplr/init.lua > /etc/xplr/init.lua

+

How to Configure

+

General Config

This is configuration exposed via the xplr.config.general API. It contains the following fields:

@@ -378,7 +391,7 @@ action.

TODO: Continue documentation

Modes

xplr is a modal file explorer. That means the users switch between different -modes, each containing a different set to key bindings to avoid clashes. Users +modes, each containing a different set of key bindings to avoid clashes. Users can switch between these modes at run-time.

The modes can be configured using the xplr.config.modes Lua API.

It contains the following fields:

@@ -559,6 +572,8 @@ the default mode.

Now let's try out the new xplr-fzf integration.

xplr-fzf.gif

+
+

Visit Awesome Plugins for more integration options.

Message

You can think of xplr as a server. Just like web servers listen to HTTP requests, xplr listens to messages.

@@ -1233,6 +1248,86 @@ of modes and the key mappings for each mode.

ctrl-cterminate esccancel +

Plugin

+

xplr supports pluggable Lua modules that can be used to easily configure or +extend xplr UI and functionalities.

+ +

Installing Plugins

+

Until we get a cool plugin manager, let's install plugins manually using the +following procedure:

+ +

Writing Plugins

+

Anyone who can write Lua code, can write xplr plugins.

+

Just follow the instructions and best practices:

+

Naming

+

xplr plugins are named using hiphen (-) separated words that may also include +integers. They will be plugged using the require() function in Lua.

+

Structure

+

A minimal plugin should confirm to the following structure:

+
material-landscape
+├── README.md
+└── src
+    └── init.lua
+
+

You can also use +this template.

+

README.md

+

This is where you document what the plugin does, how to use it, etc.

+

src/init.lua

+

This file is executed to load the plugin. It should expose a setup() +function, which will be used by the users to setup the plugin.

+

Example:

+
local function setup(args)
+  local xplr = xplr
+  -- do stuff with xplr
+end
+
+return { setup = setup }
+
+

Publishing

+

When publishing plugins to GitHub or other repositories, it's a best practice +to append .xplr to the name to make them distinguishable. Similar to the +*.nvim naming convention for Neovim plugins.

+

Examples

+

Visit Awesome Plugins for xplr plugin examples.

+

Awesome Plugins

+

Categories

+ +

Theme

+ +

Integration

+

foo

TODO