Last active 4 months ago

Install essentials, oh-my-zsh and vimconf

Revision c306fc16fb522a66f451ee6ead031e7bf7935e7f

README.md Raw

Installation

Curl

curl -fsSL https://opengist.internal.willithiel.net/wthiel/032ceca594884fce86ed8a6a32726bd2/raw/HEAD/bootstrap.sh | bash

wget

wget -qO- https://opengist.internal.willithiel.net/wthiel/032ceca594884fce86ed8a6a32726bd2/raw/HEAD/bootstrap.sh | bash
bootstrap.sh Raw
1#!/bin/bash
2
3# Update packages, install essentials
4sudo apt update
5sudo apt install -y build-essential git zsh htop tmux
6
7# Install: oh-my-zsh
8sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
9
10# Install Powerlevel10k
11git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
12sed -i -- 's/ZSH_THEME="robbyrussell"/plugins=(virtualenv)\nPOWERLEVEL9K_CUSTOM_LIVE_BACKGROUND="red"\nPOWERLEVEL9K_CUSTOM_LIVE_FOREGROUND="white"\nPOWERLEVEL9K_MODE="nerdfont-complete"\nPOWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_live host dir vcs virtualenv)\nPOWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs load ram disk_usage time)\nZSH_THEME="powerlevel10k\/powerlevel10k"\n/g' ~/.zshrc
13
14# zsh-syntax-highlighting
15sudo apt install zsh-syntax-highlighting
16echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
17
18# zsh-autosuggestions
19git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
20sed -i -- 's/^plugins=(/plugins=(\n zsh-autosuggestions\n/g' ~/.zshrc
21
22# Install: timss/vimconf (https://github.com/timss/vimconf#installation)
23sudo apt install -y vim exuberant-ctags
24mkdir -p ~/.vim/vimconf
25git clone https://github.com/timss/vimconf.git ~/.vim/vimconf
26ln -s ~/.vim/vimconf/.vimrc ~/.vimrc
27
28# Add user to sudoers with no password
29echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
30sudo chmod 440 /etc/sudoers.d/$USER
31
32# Install public key
33KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILB5bVuBHYwgtCL+ppoOkKSpu/+wmSOt80yVE/S2qU0F"
34mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo "$KEY" >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
35