From b6f3b174df9b73900db19360c820cb359584c273 Mon Sep 17 00:00:00 2001 From: Felix Suchert Date: Wed, 22 Mar 2023 10:12:24 +0100 Subject: [PATCH] enable fzf completions --- entropy/.bashrc | 4 ++++ entropy/{ => fish}/config.fish | 0 entropy/fish/fish_user_key_bindings.fish | 7 +++++++ entropy/initialize.sh | 5 ++++- entropy/nixos/configuration.nix | 1 + 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 entropy/.bashrc rename entropy/{ => fish}/config.fish (100%) create mode 100644 entropy/fish/fish_user_key_bindings.fish diff --git a/entropy/.bashrc b/entropy/.bashrc new file mode 100644 index 0000000..9fb94ae --- /dev/null +++ b/entropy/.bashrc @@ -0,0 +1,4 @@ +if command -v fzf-share >/dev/null; then + source "$(fzf-share)/key-bindings.bash" + source "$(fzf-share)/completion.bash" +fi diff --git a/entropy/config.fish b/entropy/fish/config.fish similarity index 100% rename from entropy/config.fish rename to entropy/fish/config.fish diff --git a/entropy/fish/fish_user_key_bindings.fish b/entropy/fish/fish_user_key_bindings.fish new file mode 100644 index 0000000..636483e --- /dev/null +++ b/entropy/fish/fish_user_key_bindings.fish @@ -0,0 +1,7 @@ +function fish_user_key_bindings + if command -s fzf-share >/dev/null + source (fzf-share)/key-bindings.fish + end + + fzf_key_bindings +end diff --git a/entropy/initialize.sh b/entropy/initialize.sh index 765c817..bf0e72e 100755 --- a/entropy/initialize.sh +++ b/entropy/initialize.sh @@ -97,8 +97,11 @@ ln -s $PWD/.urlview ~/.urlview ln -s $PWD/.tmux.conf ~/.tmux.conf ln -s $PWD/.gitconfig ~/.gitconfig ln -s $PWD/git-commit-template.txt ~/.gitcommit_template +ln -s $PWD/.bashrc ~/.bashrc mkdir -p ~/.config/fish/ -ln -s $PWD/config.fish ~/.config/fish/config.fish +ln -s $PWD/fish/config.fish ~/.config/fish/config.fish +mkdir -p ~/.config/fish/functions +ln -s $PWD/fish/fish_user_key_bindings.fish ~/.config/fish/functions/fish_user_key_bindings.fish ## i3 things ln -s $PWD/i3 ~/.config/i3 ln -s $PWD/i3status-rust ~/.config/i3status-rust diff --git a/entropy/nixos/configuration.nix b/entropy/nixos/configuration.nix index c6d3439..190fe54 100644 --- a/entropy/nixos/configuration.nix +++ b/entropy/nixos/configuration.nix @@ -175,6 +175,7 @@ in bat lsd ripgrep + fzf #sshfs ncdu tldr