fd also should check for a local config. Plus some cleaning.

This commit is contained in:
Bartek Stalewski 2022-05-30 16:44:20 +02:00
parent ae35fdd5e1
commit a91a3d3932
3 changed files with 18 additions and 7 deletions

View File

@ -1,9 +1,9 @@
#!/bin/sh
# clean + prepare local dirs
rm -rf ~/.cache /tmp/${USER}-cache ~/.config/_cache
rm -rf ~/.cache ~/.config/_cache /tmp/${USER}-cache
rm -rf ~/.fdignore ~/.fzf.bash ~/.fzf.zsh ~/.gitconfig ~/.gitignore ~/.history ~/.tmux.conf ~/.vim* ~/.zcomp* ~/.zsh*
mkdir -p /tmp/${USER}-cache/ ~/.config ~/.local/bin ~/.local/share ~/.local/config
mkdir -p /tmp/${USER}-cache/ ~/.config ~/.local/bin ~/.local/share
chmod 700 /tmp/${USER}-cache
# prepare global variables
@ -29,7 +29,6 @@ ln -sf $XDG_DATA_HOME/repos/dotfiles/nvim ~/.config/
## fdignore
rm -rf ~/.config/fd
ln -sf $XDG_DATA_HOME/repos/dotfiles/fd ~/.config/
touch ~/.local/config/fd
## tmux
rm -rf ~/.config/tmux

View File

@ -10,8 +10,6 @@ setopt HIST_REDUCE_BLANKS
setopt SHARE_HISTORY
export PATH=~/.local/bin:$PATH
export EDITOR=nvim
export MANPAGER="nvim +Man!"
tabs 2
mkdir -p $XDG_DATA_HOME/zsh

View File

@ -10,9 +10,23 @@ else
esac
alias ll='ls -l'
fi
[ $(command -v bat) ] && alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright'
[ $(command -v fd) ] && alias fd='fd -H -L --ignore-file ~/.local/config/fd'
[ $(command -v nvim) ] && alias vim=nvim && alias vimdiff="nvim -d"
if [ $(command -v fd) ]; then
[ -f ~/.local/config/fd ] && alias fd='fd -H -L --ignore-file ~/.local/config/fd' || alias fd='fd -H -L'
fi
if [ $(command -v nvim) ]; then
export EDITOR=nvim
export MANPAGER="nvim +Man!"
alias vim=nvim
alias vimdiff="nvim -d"
elif [ $(command -v vim) ] ; then
export EDITOR=vim
else
export EDITOR=vi
fi
function ud() {
wd dots && git pull