Migrate from ~/.config/local to ~/.local/settings.
This commit is contained in:
parent
4dc2b58f6a
commit
ee45430c00
34
install.sh
34
install.sh
@ -1,27 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# cleaning
|
||||
rm -rf ~/.bash* ~/.profile
|
||||
rm -rf ~/.dotfiles ~/.local/dotfiles ~/.local/repos/dotfiles
|
||||
rm -rf ~/.cache ~/.config/_cache ~/.config/fd ~/.config/git/ignore ~/.config/nvim ~/.config/tmux ~/.config/vim ~/.config/zsh ~/.zshenv
|
||||
rm -rf ~/.fdignore ~/.fzf.bash ~/.fzf.zsh ~/.gitconfig ~/.gitignore ~/.history ~/.tmux.conf ~/.vim* ~/.zcomp* ~/.zsh*
|
||||
|
||||
# repo + preparations
|
||||
mkdir -p ~/.config/git ~/.config/local ~/.local/repos
|
||||
# prepare repository
|
||||
rm -rf ~/.local/repos/dotfiles
|
||||
mkdir -p ~/.local/repos
|
||||
git clone --recurse https://git.insomniac.pl/ftpd/dotfiles ~/.local/repos/dotfiles
|
||||
|
||||
## neovim
|
||||
ln -sf ~/.local/repos/dotfiles/nvim ~/.config/
|
||||
touch ~/.config/local/init.vim
|
||||
# clean + prepare local dirs
|
||||
rm -rf ~/.cache ~/.config/_cache ~/.config/vim ~/.config/zsh
|
||||
rm -rf ~/.fdignore ~/.fzf.bash ~/.fzf.zsh ~/.gitconfig ~/.gitignore ~/.history ~/.tmux.conf ~/.vim* ~/.zcomp* ~/.zsh*
|
||||
mkdir -p ~/.config ~/.local/settings
|
||||
|
||||
## .gitignore
|
||||
## neovim
|
||||
rm -rf ~/.config/nvim
|
||||
ln -sf ~/.local/repos/dotfiles/nvim ~/.config/
|
||||
touch ~/.local/settings/init.vim
|
||||
|
||||
## git
|
||||
mkdir -p ~/.config/git
|
||||
rm -rf ~/.config/git/ignore
|
||||
ln -sf ~/.local/repos/dotfiles/git/ignore ~/.config/git/ignore
|
||||
|
||||
## fdignore
|
||||
rm -rf ~/.config/fd
|
||||
ln -sf ~/.local/repos/dotfiles/fd ~/.config/
|
||||
touch ~/.config/local/fd
|
||||
touch ~/.local/settings/fd
|
||||
|
||||
## tmux
|
||||
rm -rf ~/.config/tmux
|
||||
ln -sf ~/.local/repos/dotfiles/tmux ~/.config/
|
||||
|
||||
## zsh
|
||||
@ -33,4 +38,7 @@ case $(uname -s) in
|
||||
esac
|
||||
echo "export XDG_CONFIG_HOME=$HOME/.config" >> $HOME/.zshenv
|
||||
echo "export ZDOTDIR=$HOME/.config/zsh" >> $HOME/.zshenv
|
||||
rm -rf ~/.bash* ~/.profile
|
||||
rm -rf ~/.
|
||||
ln -sf ~/.local/repos/dotfiles/zsh ~/.config/
|
||||
touch ~/.local/settings/zsh
|
||||
|
@ -71,7 +71,7 @@ let g:limelight_conceal_guifg = '0'
|
||||
autocmd! User GoyoEnter Limelight
|
||||
autocmd! User GoyoLeave Limelight!
|
||||
|
||||
let $FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.config/local/fd'
|
||||
let $FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.local/settings/fd'
|
||||
command! -bang -nargs=? -complete=dir Files
|
||||
\ call fzf#vim#files(<q-args>, {'options': ['-e', '--layout=reverse', '--preview', 'bat --color=always --style=plain --theme=Monokai\ Extended\ Bright {}']}, <bang>0)
|
||||
command! -bang -nargs=? -complete=dir Colors
|
||||
@ -94,4 +94,4 @@ function! LightLineReadonly()
|
||||
return &readonly && &filetype !=# 'help' ? 'RO' : ''
|
||||
endfunction
|
||||
|
||||
source ~/.config/local/init.vim
|
||||
source ~/.local/settings/init.vim
|
||||
|
@ -33,4 +33,4 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
||||
fi
|
||||
|
||||
# local settings
|
||||
[ -e $XDG_CONFIG_HOME/local/zsh ] && source $XDG_CONFIG_HOME/local/zsh
|
||||
source ~/.local/settings/zsh
|
||||
|
@ -14,7 +14,7 @@ else
|
||||
alias ll='ls -l'
|
||||
fi
|
||||
if [ $(command -v fd) ]; then
|
||||
alias fd='fd -H -L --ignore-file ~/.config/local/fd'
|
||||
alias fd='fd -H -L --ignore-file ~/.local/settings/fd'
|
||||
fi
|
||||
if [ $(command -v nvim) ]; then
|
||||
export EDITOR='nvim'
|
||||
|
@ -1,13 +1,13 @@
|
||||
source $XDG_CONFIG_HOME/fzf/fzf.zsh
|
||||
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
|
||||
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
|
||||
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.local/settings/fd'
|
||||
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file ~/.local/settings/fd'
|
||||
export FZF_DEFAULT_OPTS="--multi -e --ansi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=Monokai\ Extended\ Bright {}'"
|
||||
export FZF_CTRL_R_OPTS="-e --ansi --layout=reverse --preview=''"
|
||||
_fzf_compgen_path() {
|
||||
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd . "$1"
|
||||
fd -H -L --ignore-file ~/local/settings/fd . "$1"
|
||||
}
|
||||
_fzf_compgen_dir() {
|
||||
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd --type d . "$1"
|
||||
fd -H -L --ignore-file ~/local/settings/fd --type d . "$1"
|
||||
}
|
||||
|
||||
# heavily inspired (and sometimes stolen from): https://github.com/wfxr/forgit.git
|
||||
|
Loading…
Reference in New Issue
Block a user