dotfiles/setup

38 lines
1,007 B
Plaintext
Raw Normal View History

#!/bin/bash
echo "Setting up the stuff..."
2022-11-23 11:57:18 +00:00
if [[ "$(uname -a)" == *"Ubuntu"* ]]
then
echo "Updating Ubuntu"
sudo apt update && sudo apt upgrade
echo "Installing tools/utils"
sudo apt install ripgrep fd-find make stow tmux
else
echo "Updating Arch"
sudo pacman -Syyu
echo "Installing tools/utils"
2022-11-25 21:27:14 +00:00
sudo pacman -S ripgrep fd neovim make stow tmux awesome dmenu arandr volumeicon picom nitrogen network-manager-applet lxsession
2022-11-23 11:57:18 +00:00
fi
# tmux plugin manager and theme
2022-11-23 11:57:18 +00:00
echo "Installing tmux plugin manager... Don't forget to press <C-a><S-i> in a new tmux session later"
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
add_to_file() {
if grep -Fxq "$1" $2
then
echo "Found existing line '$1' in file '$2'"
else
echo "Adding line \"$1\" to file \"$2\""
echo "$1" >> $2
fi
}
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
2022-11-23 11:57:18 +00:00
# Add aliases to zshrc
add_to_file "alias nv='nvim'" "$HOME/.zshrc"