You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

135 lines
3.4 KiB

#!/bin/sh
DIR="$(realpath "$(dirname "$0")")"
# script must start at home directory
cd "$HOME" || exit 1;
bootstrap_paru () {
mkdir -p "$HOME/repos"
cd "$HOME/repos" || exit 1
git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin || exit 1
makepkg -si || exit 2
cd "$HOME" || exit 1
}
paru_exists() {
if ! command -V paru; then
echo "Paru doesn't exist. Installing it"
bootstrap_paru
fi
}
usertest() {
if test "$(id -u)" -eq 0; then
echo "You cannot run this script as root.";
exit 1;
fi
if ! (type sudo 2>&1) > /dev/null; then
echo "sudo is not installed.";
exit 1
fi
sudo pacman -Syu
sudo pacman --noconfirm -S base-devel
}
dev() {
echo "Developer tools..."
sudo pacman --noconfirm -S neovim nodejs
}
sysinfo() {
echo "Dylan Araps scripts"
cd "$HOME" || exit 1;
mkdir -p repos
git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
cd "$HOME/repos/pfetch" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/neofetch" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/fff" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
}
shell() {
sudo pacman --noconfirm -S zsh tmux starship
}
browsers() {
sudo pacman --noconfirm -S firefox
}
torbrowser() {
sudo pacman --noconfirm -S torbrowser-launcher
}
meetings() {
paru_exists
paru --noconfirm -S skypeforlinux-stable-bin zoom
# install mt
sudo curl -LJ https://github.com/junikimm717/mt/releases/download/33627ab/mt -o /usr/local/bin/mt
sudo chmod +x /usr/local/bin/mt
}
# neovim must be installed.
plugins() {
# install vim-plug, oh-my-zsh, and zsh-syntax-highlighting
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
}
dotfiles() {
echo "Adding vim and zsh configs"
if ! test -d "$DIR/dotfiles"; then
echo "$DIR/dotfiles folder not found.";
exit 1;
fi
mkdir -p "$HOME/.config/nvim"
cp "$DIR/dotfiles/.zshrc" "$HOME/.zshrc"
cp "$DIR/dotfiles/init.vim" "$HOME/.config/nvim/init.vim"
nvim --headless +PlugInstall +qa
cp "$DIR"/dotfiles/.cwmrc "$DIR/dotfiles/cwm.sh" "$DIR/dotfiles/.xinitrc" "$HOME"
mkdir -p "$HOME/.config/kitty"
cp "$DIR"/dotfiles/kitty.conf "$HOME/.config/kitty/"
cp -r "$DIR"/dotfiles/polybar "$HOME/.config/"
cp "$DIR"/dotfiles/tmux.conf "$HOME/.tmux.conf"
}
graphical() {
sudo pacman --noconfirm -S xorg xorg xorg-server xorg-xinit xorg-fonts-misc \
xclip nitrogen dmenu ttf-jetbrains-mono ttf-dejavu \
picom polybar xclip
mkdir -p "$HOME/wallpaper"
}
sound() {
sudo pacman --noconfirm -S pipewire-pulse
systemctl --user --now enable pipewire-pulse
}
(usertest && bootstrap_paru && dev && sysinfo && shell && plugins && dotfiles && graphical && sound && browsers && meetings) || exit 1
cat <<EOF
Stuff to do:
- Install pop-shell (make local-install)
- Install the coc extensions
- Settle brave key stuff
- Copy over the mt config files
- Wallpapers from wallhaven.cc
EOF