fd also should check for a local config. Plus some cleaning.
This commit is contained in:
parent
ae35fdd5e1
commit
a91a3d3932
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# clean + prepare local dirs
|
# 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*
|
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
|
chmod 700 /tmp/${USER}-cache
|
||||||
|
|
||||||
# prepare global variables
|
# prepare global variables
|
||||||
@ -29,7 +29,6 @@ ln -sf $XDG_DATA_HOME/repos/dotfiles/nvim ~/.config/
|
|||||||
## fdignore
|
## fdignore
|
||||||
rm -rf ~/.config/fd
|
rm -rf ~/.config/fd
|
||||||
ln -sf $XDG_DATA_HOME/repos/dotfiles/fd ~/.config/
|
ln -sf $XDG_DATA_HOME/repos/dotfiles/fd ~/.config/
|
||||||
touch ~/.local/config/fd
|
|
||||||
|
|
||||||
## tmux
|
## tmux
|
||||||
rm -rf ~/.config/tmux
|
rm -rf ~/.config/tmux
|
||||||
|
@ -10,8 +10,6 @@ setopt HIST_REDUCE_BLANKS
|
|||||||
setopt SHARE_HISTORY
|
setopt SHARE_HISTORY
|
||||||
|
|
||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
export EDITOR=nvim
|
|
||||||
export MANPAGER="nvim +Man!"
|
|
||||||
tabs 2
|
tabs 2
|
||||||
|
|
||||||
mkdir -p $XDG_DATA_HOME/zsh
|
mkdir -p $XDG_DATA_HOME/zsh
|
||||||
|
@ -10,9 +10,23 @@ else
|
|||||||
esac
|
esac
|
||||||
alias ll='ls -l'
|
alias ll='ls -l'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ $(command -v bat) ] && alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright'
|
[ $(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() {
|
function ud() {
|
||||||
wd dots && git pull
|
wd dots && git pull
|
||||||
|
Loading…
Reference in New Issue
Block a user