From bf9897af3573563224e94d42369db7175c372a76 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Wed, 7 Oct 2020 21:46:34 +0200 Subject: [PATCH] config: Clean up zshrc - remove git plugin --- .config/git/config | 5 +++-- .config/shell/git | 1 + .config/zsh/.zshrc | 11 ++++++----- .local/share/shell/.fzf.zsh | 13 +++++++++++++ 4 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 .local/share/shell/.fzf.zsh diff --git a/.config/git/config b/.config/git/config index 60e797d..514cf80 100644 --- a/.config/git/config +++ b/.config/git/config @@ -95,8 +95,9 @@ sm = !git submodule init && git submodule update # yadm - add-git = !git add $XDG_CONFIG_HOME/git/config $CONFIG_SHELLS/git - add-vim = !git add $XDG_CONFIG_HOME/nvim/init* + add-git = !yadm add $XDG_CONFIG_HOME/git/config $CONFIG_SHELLS/git + add-vim = !yadm add $XDG_CONFIG_HOME/nvim/init* + add-shell = !yadm add $CONFIG_SHELLS [filter "lfs"] clean = git-lfs clean -- %f diff --git a/.config/shell/git b/.config/shell/git index 745a1cc..974f76e 100644 --- a/.config/shell/git +++ b/.config/shell/git @@ -1,4 +1,5 @@ # Tools +alias g="git" alias bfg="java -jar $HOME/daten/applications/bfg-1.13.0.jar" alias magit='nvim -c MagitOnly' diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 29d5bad..417fdf8 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -8,9 +8,9 @@ fi # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi +#if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then +# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +#fi export PATH=$HOME/.local/bin:$PATH @@ -35,7 +35,8 @@ DISABLE_UNTRACKED_FILES_DIRTY="true" # DOn't mark untracked files as dirty - spe # Plugins can be found in $ZSH/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/ plugins=( - git + #git + gitfast git-auto-fetch z fast-syntax-highlighting @@ -187,4 +188,4 @@ export NVM_DIR="$HOME/.nvm" # To customize prompt, run `p10k configure` or edit .p10k.zsh. [[ ! -f $CONFIG_ZSH/.p10k.zsh ]] || source $CONFIG_ZSH/.p10k.zsh -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +[ -f $XDG_DATA_HOME/shell/.fzf.zsh ] && source $XDG_DATA_HOME/shell/.fzf.zsh diff --git a/.local/share/shell/.fzf.zsh b/.local/share/shell/.fzf.zsh new file mode 100644 index 0000000..b7a8b48 --- /dev/null +++ b/.local/share/shell/.fzf.zsh @@ -0,0 +1,13 @@ +# Setup fzf +# --------- +if [[ ! "$PATH" == */opt/fzf/bin* ]]; then + export PATH="${PATH:+${PATH}:}/opt/fzf/bin" +fi + +# Auto-completion +# --------------- +[[ $- == *i* ]] && source "/opt/fzf/shell/completion.zsh" 2> /dev/null + +# Key bindings +# ------------ +source "/opt/fzf/shell/key-bindings.zsh"