Terminal integration for xplr
term.mp4
TIP: Use it with xclip.xplr for better copy-paste experience.
- Kitty (recommended), tmux, Alacritty, wezterm or any other terminal / multiplexer capable of launching programs
-
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/plugins git clone https://github.com/igorepst/term.xplr ~/.config/xplr/plugins/term
-
Require the module in
~/.config/xplr/init.lua
require("alacritty").setup() -- Or local term = require('term') local k_hsplit = term.profile_kitty_hsplit() k_hsplit.key = 'ctrl-h' term.setup({term.profile_kitty_vsplit(), k_hsplit}) -- Or require('term').setup({{ mode = 'default', key = 'ctrl-n', send_focus = true, send_selection = false, exe = 'kitty', extra_term_args = '@launch --no-response --location=vsplit', extra_xplr_args = '', }})
The plugin supports passing multiple profiles, each represented by a Lua table.
Each profile may have the following keys:
- mode:
xplr
mode - key: keybinding to launch profile
- exe: terminal's executable
- exe_launch: terminal's way to launch external program (
xplr
) - extra_term_args: extra arguments for the terminal
- extra_xplr_args: extra arguments for
xplr
- send_focus: whether to send focus to
xplr
- send_selection: whether to send selection to
xplr
- prof_name: profile name to show in
xplr
Help panel
- Default: does not define any terminal, may be used as a base profile.
profile_default()
kitty
with vertical splitprofile_kitty_vsplit()
kitty
with horizontal splitprofile_kitty_hsplit()
tmux
with vertical splitprofile_tmux_vsplit()
tmux
with horizontal splitprofile_tmux_hsplit()
Alacritty
profile_alacritty()
xterm
profile_xterm()
wezterm
withprofile_wezterm()
wezterm
with tabprofile_wezterm_tab()
wezterm
with vsplitprofile_wezterm_vsplit()
wezterm
with hsplitprofile_wezterm_hsplit()
zellij
with vsplitprofile_zellij_vsplit()
zellij
with hsplitprofile_zellij_hsplit()
- Send current focus to the new session.
- Send current selection to the new session.
- Send active sorters and filters to the new session.