An Interest In:
Web News this Week
- April 3, 2024
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
1, 2 or 3 panes - choose a layout that works for you
Do you prefer the simplicity of a single pane TUI file explorer? If yes, then xplr's default layout with zentable.xplr should satisfy all your needs. If not, just install one or both of the following plugins or take inspiration from them and customize it yourself to implement the layout that you prefer.
You can, of course, use all three, and switch to different layouts without quitting xplr.
Related plugins are:
sayanarijit / dual-pane.xplr
Implements support for dual-pane navigation into xplr
This plugin implements support for dual-pane navigation into xplr.
Installation
Install manually
Add the following line in
~/.config/xplr/init.lua
local home = os.getenv("HOME")package.path = home.. "/.config/xplr/plugins/?/init.lua;".. home.. "/.config/xplr/plugins/?.lua;".. package.path
Clone the plugin
mkdir -p ~/.config/xplr/pluginsgit clone https://github.com/sayanarijit/dual-pane.xplr ~/.config/xplr/plugins/dual-pane
Require the module in
~/.config/xplr/init.lua
require("dual-pane").setup()-- Orrequire("dual-pane").setup{ active_pane_width = { Percentage = 70 }, inactive_pane_width = { Percentage = 30 },}
Usage
Press ctrl-w
and then h
/ ctrl-h
or left
/ ctrl-left
to activate the left pane.
Press ctrl-w
and then l
/ ctrl-l
or right
/ ctrl-right
to activate the right pane.
Press ctrl-w
and then w
/ ctrl-w
to toggle active pane.
Press ctrl-w
and then q
/ ctrl-q
to quit active pane.
Features
sayanarijit / tri-pane.xplr
xplr plugin that implements ranger-like three pane layout
tri-pane.xplr
xplr plugin that implements ranger-like three pane layout support.
tri-pane-xplr.mp4Installation
Install manually
Add the following line in
~/.config/xplr/init.lua
local home = os.getenv("HOME")package.path = home.. "/.config/xplr/plugins/?/init.lua;".. home.. "/.config/xplr/plugins/?.lua;".. package.path
Clone the plugin
mkdir -p ~/.config/xplr/pluginsgit clone https://github.com/sayanarijit/tri-pane.xplr ~/.config/xplr/plugins/tri-pane
Require the module in
~/.config/xplr/init.lua
require("tri-pane").setup()-- orrequire("tri-pane").setup({ layout_key = "T", -- In switch_layout mode as_default_layout = true, left_pane_width = { Percentage = 20 }, middle_pane_width = { Percentage = 50 }, right_pane_width = { Percentage = 30 },})
Usage
If you have set as_default_layout = false
, you need to switch to this mode manually bypressing ctrl-w
and then T
.
So, which layout do you prefer? Do comment below.
Follow xplr.stck.me for more xplr tips and tricks.
Original Link: https://dev.to/sayanarijit/1-2-or-3-panes-choose-a-layout-that-works-for-you-nda
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To