mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
perf(zsh): fzf integration improvements
- Fzf eval removed from common/.profile: it was already being used as zinit plugin - fzf height increased for better legibility - zsh: unnecessary keybindings removed
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
##################################################################################
|
##################################################################################
|
||||||
|
|
||||||
if ! pgrep -u "$USER" ssh-agent >/dev/null; then
|
if ! pgrep -u "$USER" ssh-agent >/dev/null; then
|
||||||
eval $(ssh-agent -s) >/dev/null
|
eval "$(ssh-agent -s)" >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC3045
|
||||||
@@ -84,7 +84,8 @@ export RUSTUP_HOME="${XDG_DATA_HOME}/rust/rustup"
|
|||||||
export PATH="$PATH:$CARGO_HOME/bin"
|
export PATH="$PATH:$CARGO_HOME/bin"
|
||||||
export RUSTC_WRAPPER=sccache
|
export RUSTC_WRAPPER=sccache
|
||||||
export SCCACHE_CACHE_SIZE="20G"
|
export SCCACHE_CACHE_SIZE="20G"
|
||||||
[ -f "${XDA_DATA_HOME}/rust/cargo/env" ] && . "${XDA_DATA_HOME}/rust/cargo/env"
|
# shellcheck disable=SC1091
|
||||||
|
[ -f "${XDG_DATA_HOME}/rust/cargo/env" ] && . "${XDG_DATA_HOME}/rust/cargo/env"
|
||||||
|
|
||||||
# Setup DotNet
|
# Setup DotNet
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
@@ -120,7 +121,7 @@ export AWS_SHARED_CREDENTIALS_FILE="${XDG_CONFIG_HOME}/aws/credentials"
|
|||||||
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
|
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
|
||||||
|
|
||||||
export FZF_DEFAULT_COMMAND='rg --files --hidden'
|
export FZF_DEFAULT_COMMAND='rg --files --hidden'
|
||||||
export FZF_DEFAULT_OPTS='--layout=reverse --cycle --inline-info --height=~50% --border'
|
export FZF_DEFAULT_OPTS='--layout=reverse --cycle --inline-info --height=~80% --border'
|
||||||
|
|
||||||
export TLDR_CACHE_DIR="${XDG_CACHE_HOME}/tldr"
|
export TLDR_CACHE_DIR="${XDG_CACHE_HOME}/tldr"
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ HISTORY_BASE="$ZSH_STATE_HOME/per-directory-history"
|
|||||||
# Zinit Plugins
|
# Zinit Plugins
|
||||||
zinit ice depth=1; zinit light romkatv/powerlevel10k
|
zinit ice depth=1; zinit light romkatv/powerlevel10k
|
||||||
zinit ice depth=1; zinit light jimhester/per-directory-history
|
zinit ice depth=1; zinit light jimhester/per-directory-history
|
||||||
|
# zinit ice depth=1; zinit light atuinsh/atuin
|
||||||
|
|
||||||
zinit ice wait lucid depth=1; zinit light zsh-users/zsh-completions
|
zinit ice wait lucid depth=1; zinit light zsh-users/zsh-completions
|
||||||
zinit ice wait lucid depth=1; zinit light zsh-users/zsh-autosuggestions
|
zinit ice wait lucid depth=1; zinit light zsh-users/zsh-autosuggestions
|
||||||
@@ -113,21 +114,14 @@ zstyle ':completion::complete:*' gain-privileges 1 menu select cache-path "$ZCOM
|
|||||||
|
|
||||||
# User configuration # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# User configuration # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
# [ctrl+r]: Search command history
|
|
||||||
# [ctrl+t]: fzf & over the files & directories under the current one & paste it to prompt
|
|
||||||
# [alt+c] : fzf & cd into a directory under the current one
|
|
||||||
# TODO: Source this as script instead of eval: has impact on zsh startup
|
|
||||||
command -v fzf > /dev/null && eval "$(fzf --zsh)"
|
|
||||||
|
|
||||||
command -v zoxide >/dev/null && eval "$(zoxide init --cmd cd zsh)"
|
command -v zoxide >/dev/null && eval "$(zoxide init --cmd cd zsh)"
|
||||||
|
|
||||||
# Source aliases and shell functions
|
# Source aliases and shell functions
|
||||||
for alias_file in "$XDG_CONFIG_HOME"/shell/*.sh; do source "$alias_file"; done
|
for alias_file in "$XDG_CONFIG_HOME"/shell/*.sh; do source "$alias_file"; done
|
||||||
|
|
||||||
# Keybindings
|
# Keybindings
|
||||||
bindkey '^f' autosuggest-accept #
|
bindkey '^f' autosuggest-accept
|
||||||
bindkey '^p' history-search-backward # Ctrl+p gets the last history match
|
|
||||||
bindkey '^n' history-search-forward # Ctrl+n gets the next history match
|
|
||||||
# TIP: Following should be executed AFTER aliases are sourced
|
# TIP: Following should be executed AFTER aliases are sourced
|
||||||
command -v op >/dev/null && bindkey -s '^o' ' op\n' # Fuzzyfind projects and open in nvim
|
command -v op >/dev/null && bindkey -s '^o' ' op\n' # Fuzzyfind projects and open in nvim
|
||||||
command -v pnew >/dev/null && bindkey -s '^[o' ' pnew\n' # Create a new project quickly
|
command -v pnew >/dev/null && bindkey -s '^[o' ' pnew\n' # Create a new project quickly
|
||||||
|
|||||||
Reference in New Issue
Block a user