kak: Usar kakoune.cr en vez de fzf.kak
Y solo setear foot en caso de que estemos en Wayland
This commit is contained in:
parent
818dc70481
commit
c4c5b5fc9a
2 changed files with 24 additions and 21 deletions
|
@ -57,11 +57,15 @@ hook global WinSetOption filetype=go %{
|
|||
# Usar Foot
|
||||
# ------------
|
||||
|
||||
hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" }
|
||||
define-command fzf-terminal -params 1.. -shell-completion %{
|
||||
eval %sh{
|
||||
test -n "$WAYLAND_DISPLAY" && echo '
|
||||
hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" }
|
||||
define-command terminal-popup -params 1.. -shell-completion %{
|
||||
set-option global termcmd "footclient --app-id=fzf sh -c"
|
||||
wayland-terminal %arg{@}
|
||||
set-option global termcmd "footclient sh -c"
|
||||
}
|
||||
'
|
||||
}
|
||||
|
||||
# ------------
|
||||
|
@ -102,25 +106,18 @@ hook -group sleuth global BufOpenFile .* %{ sleuth }
|
|||
hook -group sleuth global BufWritePost .* %{ sleuth }
|
||||
|
||||
# ------------
|
||||
# FZF
|
||||
# Kakoune.cr
|
||||
# ------------
|
||||
|
||||
source "%val{config}/plugins/fzf.kak/rc/fzf.kak"
|
||||
evaluate-commands %sh{
|
||||
find -L "$kak_config/plugins/fzf.kak/rc/modules/" -type f -name '*.kak' -exec printf 'source "%s"\n' {} \;
|
||||
kcr init kakoune
|
||||
}
|
||||
hook global ModuleLoaded fzf %{
|
||||
set-option global fzf_terminal_command 'fzf-terminal kak -c %val{session} -e "%arg{@}"'
|
||||
}
|
||||
hook global ModuleLoaded fzf-file %{
|
||||
set-option global fzf_file_command 'rg -L --hidden --files --glob !.git'
|
||||
}
|
||||
hook global ModuleLoaded fzf-grep %{
|
||||
set-option global fzf_grep_command 'rg'
|
||||
}
|
||||
map -docstring 'search files' global user f ': fzf-mode<ret>f'
|
||||
map -docstring 'search buffers' global user b ': fzf-mode<ret>b'
|
||||
map -docstring 'grep files' global user g ': fzf-mode<ret>g'
|
||||
|
||||
map -docstring 'new client' global normal <c-t> ': new<ret>'
|
||||
map -docstring 'terminal' global normal <c-ret> ': connect terminal<ret>'
|
||||
map -docstring 'file picker' global normal <c-f> ': connect terminal-popup kcr fzf files -- -H<ret>'
|
||||
map -docstring 'buffer picker' global normal <c-b> ': connect terminal-popup kcr fzf buffers<ret>'
|
||||
map -docstring 'grep picker' global normal <c-g> ': connect terminal-popup kcr fzf grep<ret>'
|
||||
|
||||
# ------------
|
||||
# Buffer switching
|
||||
|
|
|
@ -28,5 +28,11 @@ Probablemente incompleto.
|
|||
### Alpine
|
||||
|
||||
```sh
|
||||
apk add zsh zsh-vcs fzf vis
|
||||
apk add zsh zsh-vcs fzf kak
|
||||
```
|
||||
|
||||
#### Para desktop/IDE
|
||||
|
||||
```sh
|
||||
apk add kakoune-cr kakoune-cr-commands foot sway
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue