Last active
June 15, 2020 16:43
-
-
Save acristoffers/05511b04128fababc56bdb546e940d7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if hash brew 2>/dev/null; then | |
brew install fish bash zsh git python@3 node neovim vim curl | |
elif hash apt-get 2>/dev/null; then | |
sudo apt-get install fish bash zsh git python3 python3-pip nodejs neovim vim curl | |
elif hash dnf 2>/dev/null; then | |
sudo dnf install fish zsh bash python3 nodejs neovim vim curl | |
elif hash zypper 2>/dev/null; then | |
sudo zypper install fish zsh bash python3 nodejs neovim vim curl | |
elif hash pacman 2>/dev/null; then | |
sudo pacman -S fish zsh bash python3 nodejs neovim vim curl | |
elif hash pkg 2>/dev/null; then | |
sudo pkg install fish zsh bash python3 node neovim vim curl | |
fi | |
pip3 install neovim jedi python-language-server | |
npm -g i neovim | |
git clone https://github.com/acristoffers/shell_profile_generator | |
pushd shell_profile_generator | |
python3 install.py fish bash zsh | |
popd | |
rm -rf shell_profile_generator | |
git clone https://gist.github.com/544347bc4c920527f75a1612db4c689a.git config | |
mv config/.vimrc ~/.vimrc | |
rm -rf config | |
pushd ~ | |
rm -rf .vim .config/nvim .local/share/nvim &> /dev/null | |
mkdir -p .config/nvim | |
pushd .config/nvim | |
ln -s ~/.vimrc init.vim | |
popd | |
popd | |
NVIM_CFG_FDR=${XDG_DATA_HOME:-$HOME/.local/share} | |
VIM_PLUG=https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
curl -fLo ~/.vim/autoload/plug.vim --create-dirs $VIM_PLUG | |
curl -fLo "$NVIM_CFG_FDR"/nvim/site/autoload/plug.vim --create-dirs $VIM_PLUG | |
nvim --headless +PlugInstall +qa | |
nvim --headless +'PromptlineSnapshot ~/.promptline.sh airline' +qa | |
tee ~/.config/fish/functions/fish_prompt.fish << EOF | |
function fish_prompt | |
env FISH_VERSION=\$FISH_VERSION PROMPTLINE_LAST_EXIT_CODE=\$status bash ~/.promptline.sh left | |
end | |
EOF | |
echo "source ~/.promptline.sh" | tee -a ~/.profile | |
echo "source ~/.promptline.sh" | tee -a ~/.zshrc | |
nvim ~/.promptline.sh -c 'argdo /truncation' \ | |
-c 'argdo normal di"' \ | |
-c 'argdo /dir_sep' \ | |
-c 'argdo normal di"' \ | |
-c 'wq' | |
if ! grep -Fq fish /etc/shells; then | |
echo $(which fish) | sudo tee -a /etc/shells | |
fi | |
chsh -s $(which fish) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment