diff --git a/README.md b/README.md index 12afe44..ace7672 100644 --- a/README.md +++ b/README.md @@ -54,54 +54,24 @@ Table of content - [Node Types](https://arijitbasu.in/xplr/en/node_types.html) - [Style](https://arijitbasu.in/xplr/en/style.html) - [Default Key Bindings](https://arijitbasu.in/xplr/en/default-key-bindings.html) +- [Plugin](https://arijitbasu.in/xplr/en/default-key-bindings.html) + - [Installing Plugins](https://arijitbasu.in/xplr/en/installing-plugins.html) + - [Writing Plugins](https://arijitbasu.in/xplr/en/writing-plugins.html) + - [Awesome Plugins](https://arijitbasu.in/xplr/en/awesome-plugins.html) - [TODO](https://arijitbasu.in/xplr/en/todo.html) -- [Hacks](https://github.com/sayanarijit/xplr/wiki/Hacks) -- [Themes](https://github.com/sayanarijit/xplr/wiki/Themes) -- [Alternatives](https://github.com/sayanarijit/xplr/wiki/alternatives.html) -- [Upgrade Guide](https://github.com/sayanarijit/xplr/wiki/upgrade-guide.html) -- [Community](https://github.com/sayanarijit/xplr/wiki/community.html) -- [Contribute](https://github.com/sayanarijit/xplr/wiki/contribute.html) +- [Alternatives](https://arijitbasu.in/xplr/en/alternatives.html) +- [Upgrade Guide](https://arijitbasu.in/xplr/en/upgrade-guide.html) +- [Community](https://arijitbasu.in/xplr/en/community.html) +- [Contribute](https://arijitbasu.in/xplr/en/contribute.html) -## Demo - -
-Expand for demo - -

- - - - - - - - - - - - - - - - - - - - - - - - - -

-
- - -## Packaging +Packaging +--------- -## Backers + +Backers +------- diff --git a/docs/en/src/SUMMARY.md b/docs/en/src/SUMMARY.md index 4c98fc0..5422d85 100644 --- a/docs/en/src/SUMMARY.md +++ b/docs/en/src/SUMMARY.md @@ -13,6 +13,10 @@ A hackable, minimal, fast TUI file explorer - [Node Types](node_types.md) - [Style](style.md) - [Default Key Bindings](default-key-bindings.md) +- [Plugin](plugin.md) + - [Installing Plugins](installing-plugins.md) + - [Writing Plugins](writing-plugins.md) + - [Awesome Plugins](awesome-plugins.md) - [TODO](todo.md) - [Alternatives](alternatives.md) - [Upgrade Guide](upgrade-guide.md) diff --git a/docs/en/src/awesome-plugins.md b/docs/en/src/awesome-plugins.md new file mode 100644 index 0000000..019b12f --- /dev/null +++ b/docs/en/src/awesome-plugins.md @@ -0,0 +1,21 @@ +Awesome Plugins +=============== + +Categories +---------- + +- [Theme](#theme) +- [Integration](#integration) + + +Theme +----- + +- [material-landscape.xplr](https://github.com/sayanarijit/material-landscape.xplr) +- [material-landscape2.xplr](https://github.com/sayanarijit/material-landscape2.xplr) + + +Integration +----------- + +foo diff --git a/docs/en/src/configuration.md b/docs/en/src/configuration.md index b4c7631..0617744 100644 --- a/docs/en/src/configuration.md +++ b/docs/en/src/configuration.md @@ -16,7 +16,7 @@ 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 @@ -25,3 +25,14 @@ 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](general-config.md) +- [Modes](modes.md) +- [Message](message.md) +- [Layouts](layouts.md) +- [Node Types](node_types.md) +- [Style](style.md) diff --git a/docs/en/src/installing-plugins.md b/docs/en/src/installing-plugins.md new file mode 100644 index 0000000..47e57db --- /dev/null +++ b/docs/en/src/installing-plugins.md @@ -0,0 +1,28 @@ +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` + + ```lua + package.path = os.getenv("HOME") .. '/.config/xplr/plugins/?/src/init.lua' + ``` + +- Clone the plugin + + ```bash + 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` + + ```lua + require("material-landscape2").setup() + + -- The setup arguments might differ for different plugins. + -- Visit the project README for setup instructions. + ``` diff --git a/docs/en/src/modes.md b/docs/en/src/modes.md index 00200b4..88f862b 100644 --- a/docs/en/src/modes.md +++ b/docs/en/src/modes.md @@ -2,7 +2,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. @@ -258,3 +258,7 @@ xplr.config.modes.builtin.default.key_bindings.on_key["F"] = { Now let's try out the new `xplr`-`fzf` integration. [![xplr-fzf.gif](https://s3.gifyu.com/images/xplr-fzf.gif)](https://gifyu.com/image/tW86) + +----- + +Visit [Awesome Plugins](awesome-plugins.md) for more [integration](awesome-plugins.md#integration) options. diff --git a/docs/en/src/plugin.md b/docs/en/src/plugin.md new file mode 100644 index 0000000..ca931e8 --- /dev/null +++ b/docs/en/src/plugin.md @@ -0,0 +1,9 @@ +Plugin +====== + +xplr supports pluggable Lua modules that can be used to easily configure or +extend xplr UI and functionalities. + +- [Installing Plugins](installing-plugins.md) +- [Writing Plugins](writing-plugins.md) +- [Awesome Plugins](awesome-plugins.md) diff --git a/docs/en/src/quickstart.md b/docs/en/src/quickstart.md index f2d59e5..97a54cf 100644 --- a/docs/en/src/quickstart.md +++ b/docs/en/src/quickstart.md @@ -1,5 +1,8 @@ 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](install.md) +- [Post Install](post-install.md) diff --git a/docs/en/src/writing-plugins.md b/docs/en/src/writing-plugins.md new file mode 100644 index 0000000..c703a63 --- /dev/null +++ b/docs/en/src/writing-plugins.md @@ -0,0 +1,63 @@ +Writing Plugins +=============== + +Anyone who can write [Lua](https://www.lua.org) 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](https://github.com/sayanarijit/plugin-template1.xplr). + + +### 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: + +```lua +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](https://neovim.io) plugins. + + +Examples +-------- + +Visit [Awesome Plugins](awesome-plugins.md) for xplr plugin examples.