broot goodness
This commit is contained in:
parent
92cf0fe62a
commit
d70cf31829
4 changed files with 41 additions and 9 deletions
17
.config/broot/select.hjson
Normal file
17
.config/broot/select.hjson
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
verbs: [
|
||||||
|
{
|
||||||
|
invocation: "ok"
|
||||||
|
key: "enter"
|
||||||
|
leave_broot: true
|
||||||
|
execution: ":print_path"
|
||||||
|
apply_to: "directory"
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
invocation: "broot_home"
|
||||||
|
keys: ["ctrl-7", "ctrl-g"]
|
||||||
|
execution: "broot -f --conf ~/.config/broot/select.hjson $HOME"
|
||||||
|
leave_broot: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
[[verbs]]
|
|
||||||
invocation = "ok"
|
|
||||||
key = "enter"
|
|
||||||
leave_broot = true
|
|
||||||
execution = ":print_path"
|
|
||||||
apply_to = "directory"
|
|
|
@ -16,6 +16,13 @@ verbs: [
|
||||||
leave_broot: true
|
leave_broot: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
invocation: broot_home
|
||||||
|
key: ctrl-7
|
||||||
|
execution: broot $HOME
|
||||||
|
leave_broot: true
|
||||||
|
}
|
||||||
|
|
||||||
# You should customize this standard opening of text files.
|
# You should customize this standard opening of text files.
|
||||||
# If you edit text files in your terminal (vi, emacs, helix, eg.), then
|
# If you edit text files in your terminal (vi, emacs, helix, eg.), then
|
||||||
# you'll find it convenient to change the 'key' from 'ctrl-e' to 'enter'.
|
# you'll find it convenient to change the 'key' from 'ctrl-e' to 'enter'.
|
||||||
|
|
|
@ -46,14 +46,28 @@ if status is-interactive
|
||||||
end
|
end
|
||||||
|
|
||||||
function jump
|
function jump
|
||||||
set _dir $(fre --sorted | fzf --no-sort --color=fg:248,bg+:16,fg+:49,pointer:49,border:49 --border=rounded --layout=reverse '--bind=ctrl-g:become(br -f --conf ~/.config/broot/select.toml $(git rev-parse --show-toplevel 2>/dev/null || pwd))')
|
set _dir $(fre --sorted | fzf --no-sort --color=fg:248,bg+:16,fg+:49,pointer:49,border:49 --border=rounded --layout=reverse '--bind=ctrl-g:become(br -f --conf ~/.config/broot/select.hjson $(git rev-parse --show-toplevel 2>/dev/null || pwd))')
|
||||||
[ -n "$_dir" ] && pushd $_dir >>/dev/null
|
[ -n "$_dir" ] && pushd $_dir >>/dev/null
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
bind \cg jump
|
bind \cg jump
|
||||||
|
|
||||||
bind \c_ 'do something'
|
function git_jump
|
||||||
bind \ee 'br $(git rev-parse --show-toplevel 2>/dev/null || pwd)'
|
set _dir $(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
||||||
|
if [ "$_dir" = "$PWD" ]
|
||||||
|
set _dir $(br -f --conf ~/.config/broot/select.hjson)
|
||||||
|
end
|
||||||
|
[ -n "$_dir" ] && pushd $_dir >>/dev/null
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
|
bind \c_ git_jump
|
||||||
|
|
||||||
|
function git_broot
|
||||||
|
br $(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
|
|
||||||
|
bind \ee git_broot
|
||||||
bind \eg gitui
|
bind \eg gitui
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue