@ -91,17 +91,6 @@ xplr.config.general.enable_recover_mode = false
-- Type: boolean
xplr.config . general.hide_remaps_in_help_menu = false
-- Set it to `true` if you want paginated scrolling.
--
-- Type: boolean
xplr.config . general.paginated_scrolling = false
-- Set the padding value to the scroll area.
-- Only applicable when `xplr.config.general.paginated_scrolling = false`.
--
-- Type: boolean
xplr.config . general.scroll_padding = 5
-- Set it to `true` 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 `up`/`k`), or when the focus is on the last path and you
@ -126,7 +115,7 @@ xplr.config.general.prompt.style = {}
-- Type: nullable string
xplr.config . general.logs . info.format = " INFO "
-- The style for the information logs.
-- The style for the information s logs.
--
-- Type: [Style](https://xplr.dev/en/style)
xplr.config . general.logs . info.style = { fg = " LightBlue " }
@ -691,15 +680,11 @@ xplr.config.general.initial_sorting = {
}
-- The name of one of the modes to use when xplr loads.
-- This isn't the default mode. To modify the default mode, overwrite
-- [xplr.config.modes.builtin.default](https://xplr.dev/en/modes#xplrconfigmodesbuiltindefault).
--
-- Type: nullable string
xplr.config . general.initial_mode = " default "
-- The name of one of the layouts to use when xplr loads.
-- This isn't the default layout. To modify the default layout, overwrite
-- [xplr.config.layouts.builtin.default](https://xplr.dev/en/layouts#xplrconfiglayoutsbuiltindefault).
--
-- Type: nullable string
xplr.config . general.initial_layout = " default "
@ -716,17 +701,6 @@ xplr.config.general.start_fifo = nil
-- Type: [Key Bindings](https://xplr.dev/en/configure-key-bindings#key-bindings)
xplr.config . general.global_key_bindings = {
on_key = {
[ " f1 " ] = {
help = " global help menu " ,
messages = {
{
BashExec = [ === [
[ - z " $PAGER " ] && PAGER = " less -+F "
cat -- "${XPLR_PIPE_GLOBAL_HELP_MENU_OUT}" | ${PAGER:?}
] === ] ,
} ,
} ,
} ,
[ " esc " ] = {
messages = {
" PopMode " ,
@ -754,7 +728,9 @@ xplr.config.general.global_key_bindings = {
-- The style for the directory nodes
--
-- Type: [Style](https://xplr.dev/en/style)
xplr.config . node_types.directory . style = { }
xplr.config . node_types.directory . style = {
fg = " Blue " ,
}
-- Metadata for the directory nodes.
-- You can set as many metadata as you want.
@ -790,7 +766,10 @@ xplr.config.node_types.file.meta.icon = "ƒ"
-- The style for the symlink nodes.
--
-- Type: [Style](https://xplr.dev/en/style)
xplr.config . node_types.symlink . style = { }
xplr.config . node_types.symlink . style = {
fg = " Magenta " ,
add_modifiers = { " Italic " } ,
}
-- Metadata for the symlink nodes.
-- You can set as many metadata as you want.
@ -822,7 +801,7 @@ xplr.config.node_types.symlink.meta.icon = "§"
-- xplr.config.node_types.mime_essence = {
-- application = {
-- -- application/*
-- ["*"] = { meta = { icon = "a" } } ,
-- ["*"] = { meta = { icon = "a" } }
--
-- -- application/pdf
-- pdf = { meta = { icon = "" }, style = { fg = "Blue" } },
@ -878,13 +857,15 @@ xplr.config.node_types.special = {}
--
-- ##### Example: Defining Custom Layout
--
-- ![demo](https://s6.gifyu.com/images/layout.png)
--
-- ```lua
-- xplr.config.layouts.builtin.default = {
-- Horizontal = {
-- config = {
-- margin = 1,
-- horizontal_margin = 1 ,
-- vertical_margin = 1 ,
-- horizontal_margin = 2 ,
-- vertical_margin = 3 ,
-- constraints = {
-- { Percentage = 50 },
-- { Percentage = 50 },
@ -897,21 +878,6 @@ xplr.config.node_types.special = {}
-- }
-- }
-- ```
--
-- Result:
--
-- ```
-- ╭ /home ─────────────╮╭ Help [default] ────╮
-- │ ╭─── path ││. show hidden │
-- │ ├▸[ð Desktop/] ││/ search │
-- │ ├ ð Documents/ ││: action │
-- │ ├ ð Downloads/ ││? global help │
-- │ ├ ð GitHub/ ││G go to bottom │
-- │ ├ ð Music/ ││V select/unselect│
-- │ ├ ð Pictures/ ││ctrl duplicate as │
-- │ ├ ð Public/ ││ctrl next visit │
-- ╰────────────────────╯╰────────────────────╯
-- ```
-- The default layout
--
@ -1101,6 +1067,17 @@ xplr.config.modes.builtin.default = {
{ SwitchModeBuiltin = " action " } ,
} ,
} ,
[ " ? " ] = {
help = " global help menu " ,
messages = {
{
BashExec = [ === [
[ - z " $PAGER " ] && PAGER = " less -+F "
cat -- "${XPLR_PIPE_GLOBAL_HELP_MENU_OUT}" | ${PAGER:?}
] === ] ,
} ,
} ,
} ,
[ " G " ] = {
help = " go to bottom " ,
messages = {
@ -1134,18 +1111,6 @@ xplr.config.modes.builtin.default = {
" LastVisitedPath " ,
} ,
} ,
[ " ) " ] = {
help = " next deep branch " ,
messages = {
" NextVisitedDeepBranch " ,
} ,
} ,
[ " ( " ] = {
help = " prev deep branch " ,
messages = {
" PreviousVisitedDeepBranch " ,
} ,
} ,
[ " ctrl-r " ] = {
help = " refresh screen " ,
messages = {
@ -1307,22 +1272,6 @@ xplr.config.modes.builtin.default = {
" FocusPreviousSelection " ,
} ,
} ,
[ " m " ] = {
help = " move to " ,
messages = {
" PopMode " ,
{ SwitchModeBuiltin = " move_to " } ,
{ SetInputBuffer = " " } ,
} ,
} ,
[ " c " ] = {
help = " copy to " ,
messages = {
" PopMode " ,
{ SwitchModeBuiltin = " copy_to " } ,
{ SetInputBuffer = " " } ,
} ,
} ,
} ,
on_number = {
help = " input " ,
@ -1351,8 +1300,6 @@ xplr.config.modes.builtin.default.key_bindings.on_key["l"] =
xplr.config . modes.builtin . default.key_bindings . on_key [ " right " ]
xplr.config . modes.builtin . default.key_bindings . on_key [ " tab " ] =
xplr.config . modes.builtin . default.key_bindings . on_key [ " ctrl-i " ] -- compatibility workaround
xplr.config . modes.builtin . default.key_bindings . on_key [ " ? " ] =
xplr.config . general.global_key_bindings . on_key [ " f1 " ]
-- The builtin debug error mode.
--
@ -1487,148 +1434,6 @@ xplr.config.modes.builtin.go_to_path = {
} ,
}
-- The builtin move_to mode.
--
-- Type: [Mode](https://xplr.dev/en/mode)
xplr.config . modes.builtin . move_to = {
name = " move_to " ,
prompt = " ð ❯ " ,
key_bindings = {
on_key = {
[ " enter " ] = {
help = " submit " ,
messages = {
{
BashExec0 = [ === [
DEST = " $XPLR_INPUT_BUFFER "
[ - z " $DEST " ] && exit
if [ ! - d " $DEST " ] && ! mkdir - p -- "$DEST"; then
" $XPLR " - m ' LogError: %q ' " could not create $DEST "
exit
fi
" $XPLR " - m " ChangeDirectory: %q " " $DEST "
! cd -- "$DEST" && exit
DEST = " $(pwd) " && echo " PWD=$DEST "
while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
BASENAME = $ ( basename -- "$PTH")
BASENAME_ESC = $ ( printf % q " $BASENAME " )
if [ - e " $BASENAME " ] ; then
echo
echo " $BASENAME_ESC exists, do you want to overwrite it? "
read - p " [y]es, [n]o, [S]kip: " ANS < / dev / tty
case " $ANS " in
[ yY ] * )
; ;
[ nN ] * )
read - p " Enter new name: " BASENAME < / dev / tty
BASENAME_ESC = $ ( printf % q " $BASENAME " )
; ;
* )
continue
; ;
esac
fi
if mv - v -- "${PTH:?}" "./${BASENAME:?}"; then
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC moved to $BASENAME_ESC "
" $XPLR " - m ' FocusPath: %q ' " $BASENAME "
else
" $XPLR " - m ' LogError: %q ' " could not move $PTH_ESC to $BASENAME_ESC "
fi
done < " ${XPLR_PIPE_RESULT_OUT:?} "
echo
read - p " [press enter to continue] "
] === ] ,
} ,
" PopMode " ,
} ,
} ,
[ " tab " ] = {
help = " try complete " ,
messages = {
{ CallLuaSilently = " builtin.try_complete_path " } ,
} ,
} ,
} ,
default = {
messages = {
" UpdateInputBufferFromKey " ,
} ,
} ,
} ,
}
-- The builtin copy_to mode.
--
-- Type: [Mode](https://xplr.dev/en/mode)
xplr.config . modes.builtin . copy_to = {
name = " copy_to " ,
prompt = " ð ❯ " ,
key_bindings = {
on_key = {
[ " enter " ] = {
help = " submit " ,
messages = {
{
BashExec0 = [ === [
DEST = " $XPLR_INPUT_BUFFER "
[ - z " $DEST " ] && exit
if [ ! - d " $DEST " ] && ! mkdir - p -- "$DEST"; then
" $XPLR " - m ' LogError: %q ' " could not create $DEST "
exit
fi
" $XPLR " - m " ChangeDirectory: %q " " $DEST "
! cd -- "$DEST" && exit
DEST = " $(pwd) " && echo " PWD=$DEST "
while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
BASENAME = $ ( basename -- "$PTH")
BASENAME_ESC = $ ( printf % q " $BASENAME " )
if [ - e " $BASENAME " ] ; then
echo
echo " $BASENAME_ESC exists, do you want to overwrite it? "
read - p " [y]es, [n]o, [S]kip: " ANS < / dev / tty
case " $ANS " in
[ yY ] * )
; ;
[ nN ] * )
read - p " Enter new name: " BASENAME < / dev / tty
BASENAME_ESC = $ ( printf % q " $BASENAME " )
; ;
* )
continue
; ;
esac
fi
if cp - vr -- "${PTH:?}" "./${BASENAME:?}"; then
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC copied to $BASENAME_ESC "
" $XPLR " - m ' FocusPath: %q ' " $BASENAME "
else
" $XPLR " - m ' LogError: %q ' " could not copy $PTH_ESC to $BASENAME_ESC "
fi
done < " ${XPLR_PIPE_RESULT_OUT:?} "
echo
read - p " [press enter to continue] "
] === ] ,
} ,
" PopMode " ,
} ,
} ,
[ " tab " ] = {
help = " try complete " ,
messages = {
{ CallLuaSilently = " builtin.try_complete_path " } ,
} ,
} ,
} ,
default = {
messages = {
" UpdateInputBufferFromKey " ,
} ,
} ,
} ,
}
-- The builtin selection ops mode.
--
-- Type: [Mode](https://xplr.dev/en/mode)
@ -1643,15 +1448,15 @@ xplr.config.modes.builtin.selection_ops = {
{
BashExec0 = [ === [
TMPFILE = " $(mktemp) "
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
echo $ ( printf % q " ${PTH:?} " ) >> " ${TMPFILE:?} "
done < " ${XPLR_PIPE_SELECTION_OUT:?} "
done < " ${XPLR_PIPE_SELECTION_OUT:?} " )
$ { EDITOR : - vi } " ${TMPFILE:?} "
[ ! - e " $TMPFILE " ] && exit
" $XPLR " - m ClearSelection
while IFS = read - r PTH_ESC ; do
( while IFS = read - r PTH_ESC ; do
" $XPLR " - m ' SelectPath: %q ' " $(eval printf %s ${PTH_ESC:?}) "
done < " ${TMPFILE:?} "
done < " ${TMPFILE:?} " )
rm -- "${TMPFILE:?}"
] === ] ,
} ,
@ -1679,35 +1484,22 @@ xplr.config.modes.builtin.selection_ops = {
{
BashExec0 = [ === [
" $XPLR " - m ExplorePwd
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
BASENAME = $ ( basename -- "$PTH")
BASENAME_ESC = $ ( printf % q " $BASENAME " )
if [ - e " $BASENAME " ] ; then
echo
echo " $BASENAME_ESC exists, do you want to overwrite it? "
read - p " [y]es, [n]o, [S]kip: " ANS < / dev / tty
case " $ANS " in
[ yY ] * )
; ;
[ nN ] * )
read - p " Enter new name: " BASENAME < / dev / tty
BASENAME_ESC = $ ( printf % q " $BASENAME " )
; ;
* )
continue
; ;
esac
fi
while [ - e " $BASENAME " ] ; do
BASENAME = " $BASENAME (copied) "
BASENAME_ESC = $ ( printf % q " $BASENAME " )
done
if cp - vr -- "${PTH:?}" "./${BASENAME:?}"; then
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC copied to $BASENAME_ESC"
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC copied to ./$BASENAME_ESC "
" $XPLR " - m ' FocusPath: %q ' " $BASENAME "
else
" $XPLR " - m ' LogError: %q ' " could not copy $PTH_ESC to $BASENAME_ESC"
" $XPLR " - m ' LogError: %q ' " could not copy $PTH_ESC to ./$BASENAME_ESC "
fi
done < " ${XPLR_PIPE_SELECTION_OUT:?} "
echo
read - p " [press enter to continue] "
done < " ${XPLR_PIPE_SELECTION_OUT:?} " )
read - p " [enter to continue] "
] === ] ,
} ,
" PopMode " ,
@ -1719,35 +1511,22 @@ xplr.config.modes.builtin.selection_ops = {
{
BashExec0 = [ === [
" $XPLR " - m ExplorePwd
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
BASENAME = $ ( basename -- "$PTH")
BASENAME_ESC = $ ( printf % q " $BASENAME " )
if [ - e " $BASENAME " ] ; then
echo
echo " $BASENAME_ESC exists, do you want to overwrite it? "
read - p " [y]es, [n]o, [S]kip: " ANS < / dev / tty
case " $ANS " in
[ yY ] * )
; ;
[ nN ] * )
read - p " Enter new name: " BASENAME < / dev / tty
BASENAME_ESC = $ ( printf % q " $BASENAME " )
; ;
* )
continue
; ;
esac
fi
while [ - e " $BASENAME " ] ; do
BASENAME = " $BASENAME (moved) "
BASENAME_ESC = $ ( printf % q " $BASENAME " )
done
if mv - v -- "${PTH:?}" "./${BASENAME:?}"; then
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC moved to $BASENAME_ESC"
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC moved to ./$BASENAME_ESC "
" $XPLR " - m ' FocusPath: %q ' " $BASENAME "
else
" $XPLR " - m ' LogError: %q ' " could not move $PTH_ESC to $BASENAME_ESC"
" $XPLR " - m ' LogError: %q ' " could not move $PTH_ESC to ./$BASENAME_ESC "
fi
done < " ${XPLR_PIPE_SELECTION_OUT:?} "
echo
read - p " [press enter to continue] "
done < " ${XPLR_PIPE_SELECTION_OUT:?} " )
read - p " [enter to continue] "
] === ] ,
} ,
" PopMode " ,
@ -1759,35 +1538,22 @@ xplr.config.modes.builtin.selection_ops = {
{
BashExec0 = [ === [
" $XPLR " - m ExplorePwd
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
BASENAME = $ ( basename -- "$PTH")
BASENAME_ESC = $ ( printf % q " $BASENAME " )
if [ - e " $BASENAME " ] ; then
echo
echo " $BASENAME_ESC exists, do you want to overwrite it? "
read - p " [y]es, [n]o, [S]kip: " ANS < / dev / tty
case " $ANS " in
[ yY ] * )
; ;
[ nN ] * )
read - p " Enter new name: " BASENAME < / dev / tty
BASENAME_ESC = $ ( printf % q " $BASENAME " )
; ;
* )
continue
; ;
esac
fi
while [ - e " $BASENAME " ] ; do
BASENAME = " $BASENAME (softlinked) "
BASENAME_ESC = $ ( printf % q " $BASENAME " )
done
if ln - sv -- "${PTH:?}" "./${BASENAME:?}"; then
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC softlinked as $BASENAME_ESC"
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC softlinked as ./$BASENAME_ESC "
" $XPLR " - m ' FocusPath: %q ' " $BASENAME "
else
" $XPLR " - m ' LogError: %q ' " could not softlink $PTH_ESC as $BASENAME_ESC"
" $XPLR " - m ' LogError: %q ' " could not softlink $PTH_ESC as ./$BASENAME_ESC "
fi
done < " ${XPLR_PIPE_SELECTION_OUT:?} "
echo
read - p " [press enter to continue] "
done < " ${XPLR_PIPE_SELECTION_OUT:?} " )
read - p " [enter to continue] "
] === ] ,
} ,
" PopMode " ,
@ -1799,35 +1565,22 @@ xplr.config.modes.builtin.selection_ops = {
{
BashExec0 = [ === [
" $XPLR " - m ExplorePwd
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
BASENAME = $ ( basename -- "$PTH")
BASENAME_ESC = $ ( printf % q " $BASENAME " )
if [ - e " $BASENAME " ] ; then
echo
echo " $BASENAME_ESC exists, do you want to overwrite it? "
read - p " [y]es, [n]o, [S]kip: " ANS < / dev / tty
case " $ANS " in
[ yY ] * )
; ;
[ nN ] * )
read - p " Enter new name: " BASENAME < / dev / tty
BASENAME_ESC = $ ( printf % q " $BASENAME " )
; ;
* )
continue
; ;
esac
fi
while [ - e " $BASENAME " ] ; do
BASENAME = " $BASENAME (hardlinked) "
BASENAME_ESC = $ ( printf % q " $BASENAME " )
done
if ln - v -- "${PTH:?}" "./${BASENAME:?}"; then
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC hardlinked as $BASENAME_ESC"
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC hardlinked as ./$BASENAME_ESC "
" $XPLR " - m ' FocusPath: %q ' " $BASENAME "
else
" $XPLR " - m ' LogError: %q ' " could not hardlink $PTH_ESC as $BASENAME_ESC"
" $XPLR " - m ' LogError: %q ' " could not hardlink $PTH_ESC as ./$BASENAME_ESC "
fi
done < " ${XPLR_PIPE_SELECTION_OUT:?} "
echo
read - p " [press enter to continue] "
done < " ${XPLR_PIPE_SELECTION_OUT:?} " )
read - p " [enter to continue] "
] === ] ,
} ,
" PopMode " ,
@ -2064,9 +1817,9 @@ xplr.config.modes.builtin.go_to = {
exit 1
fi
fi
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
$ OPENER " ${PTH:?} " > / dev / null 2 >& 1
done < " ${XPLR_PIPE_RESULT_OUT:?} "
done < " ${XPLR_PIPE_RESULT_OUT:?} " )
] === ] ,
} ,
" ClearScreen " ,
@ -2178,16 +1931,8 @@ xplr.config.modes.builtin.delete = {
messages = {
{
BashExec0 = [ === [
while IFS = read - r - d ' ' PTH ; do
printf ' %q \n ' " $PTH "
done < " ${XPLR_PIPE_RESULT_OUT:?} "
echo
read - p " Permanently delete these files? [Y/n]: " ANS
[ " ${ANS:-Y} " = " Y " ] || [ " $ANS " = " y " ] || exit 0
echo
" $XPLR " - m ExplorePwd
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
if rm - rfv -- "${PTH:?}"; then
" $XPLR " - m ' LogSuccess: %q ' " $PTH_ESC deleted "
@ -2195,9 +1940,8 @@ xplr.config.modes.builtin.delete = {
" $XPLR " - m ' LogError: %q ' " could not delete $PTH_ESC "
" $XPLR " - m ' FocusPath: %q ' " $PTH "
fi
done < " ${XPLR_PIPE_RESULT_OUT:?} "
echo
read - p " [press enter to continue] "
done < " ${XPLR_PIPE_RESULT_OUT:?} " )
read - p " [enter to continue] "
] === ] ,
} ,
" PopMode " ,
@ -2208,16 +1952,8 @@ xplr.config.modes.builtin.delete = {
messages = {
{
BashExec0 = [ === [
while IFS = read - r - d ' ' PTH ; do
printf ' %q \n ' " $PTH "
done < " ${XPLR_PIPE_RESULT_OUT:?} "
echo
read - p " Permanently delete these files? [Y/n]: " ANS
[ " ${ANS:-Y} " = " Y " ] || [ " $ANS " = " y " ] || exit 0
echo
" $XPLR " - m ExplorePwd
while IFS = read - r - d ' ' PTH ; do
( while IFS = read - r - d ' ' PTH ; do
PTH_ESC = $ ( printf % q " $PTH " )
if [ - d " $PTH " ] && [ ! - L " $PTH " ] ; then
if rmdir - v -- "${PTH:?}"; then
@ -2234,9 +1970,8 @@ xplr.config.modes.builtin.delete = {
" $XPLR " - m ' FocusPath: %q ' " $PTH "
fi
fi
done < " ${XPLR_PIPE_RESULT_OUT:?} "
echo
read - p " [press enter to continue] "
done < " ${XPLR_PIPE_RESULT_OUT:?} " )
read - p " [enter to continue] "
] === ] ,
} ,
" PopMode " ,
@ -2730,6 +2465,7 @@ xplr.config.modes.builtin.sort = {
" ExplorePwdAsync " ,
} ,
} ,
[ " c " ] = {
help = " by created " ,
messages = {
@ -2737,6 +2473,7 @@ xplr.config.modes.builtin.sort = {
" ExplorePwdAsync " ,
} ,
} ,
[ " C " ] = {
help = " by created reverse " ,
messages = {
@ -2744,6 +2481,7 @@ xplr.config.modes.builtin.sort = {
" ExplorePwdAsync " ,
} ,
} ,
[ " l " ] = {
help = " by last modified " ,
messages = {
@ -2751,6 +2489,7 @@ xplr.config.modes.builtin.sort = {
" ExplorePwdAsync " ,
} ,
} ,
[ " L " ] = {
help = " by last modified reverse " ,
messages = {
@ -3124,9 +2863,9 @@ xplr.fn.builtin.fmt_general_selection_item = function(n)
if n.is_dir then
shortened = shortened .. " / "
end
local meta_style = xplr.util . node_type ( n ) . style
local ls_style = xplr.util . lscolor ( n.absolute_path )
local style = xplr.util . style_mix ( { ls_style , meta_style } )
local meta_style = xplr.util . node_type ( n ) . style
local style = xplr.util . style_mix ( { meta_style , ls_style } )
return xplr.util . paint ( shortened : gsub ( " \n " , nl ) , style )
end
@ -3148,8 +2887,8 @@ end
xplr.fn . builtin.fmt_general_table_row_cols_1 = function ( m )
local nl = xplr.util . paint ( " \\ n " , { add_modifiers = { " Italic " , " Dim " } } )
local r = m.tree .. m.prefix
local ls_ style = xplr.util . lscolor ( m.absolute_path )
local style = xplr.util . style_mix ( { ls_style, m. style } )
local style = xplr.util . lscolor ( m.absolute_path )
style = xplr.util . style_mix ( { m.style, style } )
if m.meta . icon == nil then
r = r .. " "
@ -3171,8 +2910,7 @@ xplr.fn.builtin.fmt_general_table_row_cols_1 = function(m)
if m.is_broken then
r = r .. " × "
else
local symlink_path =
xplr.util . shorten ( m.symlink . absolute_path , { base = m.parent } )
local symlink_path = xplr.util . shorten ( m.symlink . absolute_path )
if m.symlink . is_dir then
symlink_path = symlink_path .. " / "
end
@ -3281,14 +3019,6 @@ xplr.fn.custom = {}
-- { LogSuccess = "Switched layout" },
-- { CallLuaSilently = "custom.some_plugin_with_hooks.on_layout_switch" },
-- }
--
-- -- Add messages to send when the selection changes
-- --
-- -- Type: list of [Message](https://xplr.dev/en/message#message)s
-- on_selection_change = {
-- { LogSuccess = "Selection changed" },
-- { CallLuaSilently = "custom.some_plugin_with_hooks.on_selection_change" },
-- }
-- }
-- ```
@ -3299,15 +3029,3 @@ return {
on_mode_switch = { } ,
on_layout_switch = { } ,
}
-- ----------------------------------------------------------------------------
-- > Note:
-- >
-- > It's not recommended to copy the entire configuration, unless you want to
-- > freeze it and miss out on useful updates to the defaults.
-- >
-- > Instead, you can use this as a reference to overwrite only the parts you
-- > want to update.
-- >
-- > If you still want to copy the entire configuration, make sure to put your
-- > customization before the return statement.