Last active
March 19, 2024 06:41
-
-
Save KShivendu/e552f5d33bb5ff612797649508c88e13 to your computer and use it in GitHub Desktop.
Bare minimum setup
This file contains hidden or 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
#!/bin/bash | |
set -x | |
# Install important packages | |
sudo apt update | |
sudo apt install -y zsh fzf autojump tmux jq | |
# Change the default shell to zsh | |
# chsh -s $(which zsh) | |
# Clone the Oh My Zsh repository from GitHub only if it is not already installed | |
if [ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh}" ]; then | |
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | |
fi | |
# Install zsh-command-time plugin | |
git clone https://github.com/popstas/zsh-command-time.git ~/.oh-my-zsh/custom/plugins/command-time | |
# Add git plugin to .zshrc | |
sed -i 's/plugins=(git)/plugins=(git vi-mode command-time)/' ~/.zshrc | |
# Add custom stuff | |
cat >> ~/.zshrc <<EOF | |
alias j=autojump | |
. /usr/share/autojump/autojump.zsh | |
EOF | |
cat >> ~/.config/tmux/tmux.conf << EOF | |
set-option -sa terminal-overrides ",xterm*:Tc" | |
set -g mouse on | |
# start windows and panes at 1, not 0 because of its distance | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set-window-option -g pane-base-index 1 | |
set-option -g renumber-windows on | |
bind '"' split-window -v -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" | |
unbind C-b | |
set -g prefix C-Space | |
bind C-Space send-prefix | |
EOF | |
source ~/.zshrc | |
# Installing extra software: | |
sudo apt update | |
## Docker | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | |
sudo apt install -y docker-ce | |
sudo usermod -aG docker ${USER} | |
su - ${USER} | |
## Poetry | |
sudo apt install -y python3-pip | |
pip3 install poetry | |
echo "Installation complete!" |
TODO:
- Use
source ~/.zshrc_aliases
to manage aliases with idempotence if this grows big. - Show command execution time in zsh
- Fix
fzf
Ctrl+R/T bindings - Add zsh-autosuggestions
tmux
config doesn't work unless you write it to/etc/tmux.conf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -s https://gist.githubusercontent.com/KShivendu/e552f5d33bb5ff612797649508c88e13/raw/ | sudo bash