Add script and alacritty keybinding for z with fzf

This commit is contained in:
Julian Mutter 2022-08-31 17:09:40 +02:00
parent 98d9b71d50
commit acbead5efb
2 changed files with 8 additions and 1 deletions

View File

@ -737,7 +737,8 @@ theme: vscode.dark
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
#key_bindings:
key_bindings:
- { key: Z, mods: Control, chars: "fzf-z \x0D" }
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }

View File

@ -0,0 +1,6 @@
#!/usr/bin/zsh
fzf-z() {
dir=$(z | fzf --tiebreak=index --tac | sed -E 's/^[0-9]+[[:space:]]+//')
cd $dir
}