diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..2311ead --- /dev/null +++ b/setup.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +# Install system packages +sudo apt update && \ +sudo apt -y install ninja-build gettext cmake unzip curl python3 python3-pip python3-venv \ + build-essential libssl-dev libffi-dev python3-dev file tmux set-option -g status-position bottom +set-option -g default-terminal "screen-256color" +#set-option -sa terminal-features ',XXX:RGB' +set-option -ga terminal-overrides ',XXX:Tc' +set-option -sg escape-time 10 +set-option -g focus-events on + +set -g status-bg black +set -g status-fg white +set -g status-left '' +set -g status-right ' #h: #S' + +# Use normal and bright monochrome colors to show a tab line on the left. +set -g status-justify left +set-window-option -g window-status-separator '' +set-window-option -g window-status-format '#[bg=black,fg=white] #I #W ' +set-window-option -g window-status-current-format '#[bg=brightblack,fg=brightwhite] #I #W ' + +# Switching panes should change the foreground color but not border colors. +set -g window-style 'bg=default,fg=white' +set -g window-active-style 'bg=default,fg=brightwhite' +set -g pane-border-style 'bg=default,fg=black' +set -g pane-active-border-style 'bg=default,fg=black'&& \ + +# Install neovim +if [ -d ~/neovim ]; then rm -rf ~/neovim; fi +git clone https://github.com/neovim/neovim && \ +cd neovim && git checkout stable && \ +make CMAKE_BUILD_TYPE=RelWithDebInfo && \ +cd build && cpack -G DEB && sudo dpkg -i nvim-linux64.deb && \ + +# Install tree sitter cli +sudo apt install -y cargo && \ +cargo install tree-sitter-cli && \ + +# Install ripgrep +sudo apt install -y ripgrep && \ + +# Install lazygit +LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') && \ +curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" && \ +tar xf lazygit.tar.gz lazygit && \ +sudo install lazygit /usr/local/bin && \ + +# Install gdu +sudo add-apt-repository -y ppa:daniel-milde/gdu && \ +sudo apt update && \ +sudo apt install -y gdu && \ + +# Install bottom +curl -LO https://github.com/ClementTsang/bottom/releases/download/0.9.1/bottom_0.9.1_amd64.deb && \ +sudo dpkg -i bottom_0.9.1_amd64.deb && \ + +# Install node +curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - && \ +sudo apt install -y nodejs && \ + +# Install astronvim +if [ ! -d ~/.config/nvim ]; +then git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim; +fi && \ + +# Install platformio +pip3 install platformio && \ + +# Install pynvim +pip3 install pynvim && \ + +# Install neovim for node +sudo npm install -g neovim && \ + +# Add git config +if [ ! -f ~/.gitconfig ]; +then +fi + +# Add tmux config +if [ ! -f ~/.tmux.conf ]; +then +fi + +# Add path +echo "export PATH=\$PATH:~/.local/bin:~/.cargo/bin" >> ~/.bashrc