mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
Feat: fzf, configs and installer
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ Brewfile.lock.json
|
||||
*cache
|
||||
.idea
|
||||
.vscode
|
||||
config/fzf
|
||||
|
||||
@@ -19,3 +19,5 @@ x-load-configs
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
|
||||
|
||||
@@ -41,3 +41,5 @@ have antigen && {
|
||||
|
||||
# starship is present
|
||||
have starship && eval "$(starship init zsh)"
|
||||
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin"
|
||||
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/opt/homebrew/opt/fzf/shell/completion.bash" 2> /dev/null
|
||||
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.bash" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/opt/homebrew/opt/fzf/shell/key-bindings.bash"
|
||||
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.bash"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin"
|
||||
if [[ ! "$PATH" == */Users/ivuorinen/.config/fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/Users/ivuorinen/.config/fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/opt/homebrew/opt/fzf/shell/completion.zsh" 2> /dev/null
|
||||
[[ $- == *i* ]] && source "/Users/ivuorinen/.config/fzf/shell/completion.zsh" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/opt/homebrew/opt/fzf/shell/key-bindings.zsh"
|
||||
source "/Users/ivuorinen/.config/fzf/shell/key-bindings.zsh"
|
||||
|
||||
@@ -50,6 +50,7 @@ function section_install
|
||||
$0 brew install
|
||||
$0 install composer
|
||||
$0 install dotenv
|
||||
$0 install fzf
|
||||
$0 install gh
|
||||
$0 install go
|
||||
$0 install imagick
|
||||
@@ -73,6 +74,10 @@ function section_install
|
||||
| sh -s -- -b "$XDG_BIN_HOME" \
|
||||
&& msg_yay "dotenv-linter installed!"
|
||||
;;
|
||||
fzf)
|
||||
bash "$DOTFILES/scripts/install-fzf.sh" \
|
||||
&& msg_yay "fzf installed!"
|
||||
;;
|
||||
gh)
|
||||
bash "$DOTFILES/scripts/install-gh-extensions.sh" \
|
||||
&& msg_yay "github cli extensions installed!"
|
||||
|
||||
17
scripts/install-fzf.sh
Executable file
17
scripts/install-fzf.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Install fzf
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
||||
|
||||
FZF_GIT="https://github.com/junegunn/fzf.git"
|
||||
FZF_PATH="${XDG_CONFIG_HOME}/fzf"
|
||||
|
||||
if [ ! -d "$FZF_PATH" ]; then
|
||||
git clone --depth 1 "$FZF_GIT" "$FZF_PATH"
|
||||
$FZF_PATH/install --xdg --all --no-update-rc
|
||||
else
|
||||
msg_done "fzf ($FZF_PATH/) already installed"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user