Last active
February 12, 2023 21:49
-
-
Save andrewiadevaia/6acd99a0f7dc8aa5d314b608584aac4f to your computer and use it in GitHub Desktop.
This file contains 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 | |
apt update && apt upgrade -y | |
apt install -y zsh curl wget nano git exa python3 python3-pip | |
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment | |
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen | |
echo "LANG=en_US.UTF-8" | sudo tee -a /etc/locale.conf | |
sudo locale-gen en_US.UTF-8 | |
mkdir -p ~/.config | |
mkdir -p ~/.zsh | |
curl -sS https://starship.rs/install.sh | sh | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.zsh/zsh-autosuggestions | |
cat > ~/.zshrc <<'EOF' | |
# Created by newuser for 5.8.1 | |
eval "$(starship init zsh)" | |
export LC_ALL=en_US.UTF-8 | |
export LC_CTYPE=en_US.UTF-8 | |
export PATH=$PATH:"/root/.local/bin" | |
#export PATH="${PATH}:/root/.cargo/bin" | |
#export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border' | |
#[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
if grep -qi microsoft /proc/version; then | |
export PATH=$PATH:"/mnt/c/Users/andrew/AppData/Local/Programs/Microsoft VS Code/bin" | |
fi | |
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh | |
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
#source ~/.zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh | |
autoload -U bashcompinit | |
bashcompinit | |
autoload -Uz compinit | |
compinit | |
HISTFILE=~/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
setopt appendhistory | |
ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=blue,underline | |
ZSH_HIGHLIGHT_STYLES[precommand]=fg=blue,underline | |
ZSH_HIGHLIGHT_STYLES[arg0]=fg=yellow | |
alias ls="exa -l --header --group --icons --sort=name --group-directories-first" | |
alias ll="ls -a --header --group" | |
bindkey '^[[1;5D' backward-word | |
bindkey '^[[1;5C' forward-word | |
EOF | |
cat > ~/.config/starship.toml <<'EOF' | |
# Get editor completions based on the config schema | |
"$schema" = 'https://starship.rs/config-schema.json' | |
# SOURCE: https://starship.rs/config | |
# DEBUG via: `starship explain` | |
# Timeout for commands executed by starship (ms) | |
command_timeout = 2000 | |
# Replace the "❯" | |
[character] | |
success_symbol = "[λ](green)" | |
error_symbol = "[λ](red)" | |
[username] | |
style_user = "green bold" | |
style_root = "red bold" | |
format = "[$user]($style)" | |
disabled = false | |
show_always = true | |
[hostname] | |
ssh_only = false | |
format = "[@$hostname](green bold) " | |
disabled = false | |
# truncation length works backwards (i.e., cwd > parent > parent ...) | |
[directory] | |
truncation_length = 10 | |
truncation_symbol = "…/" | |
truncate_to_repo = true | |
[env_var.SHELL] | |
variable = "SHELL" | |
default = "unknown shell" | |
disabled = true | |
# Show python version starting with venv | |
#[python] | |
#python_binary = ["./venv/bin/python", "python3", "python", "python2"] | |
EOF | |
if grep -qi microsoft /proc/version; then | |
cat > /etc/wsl.conf <<'EOF' | |
[user] | |
default=root | |
[automount] | |
enabled = true | |
[interop] | |
appendWindowsPath = false | |
EOF | |
fi | |
pip3 install tldr | |
cd /tmp \ | |
&& wget https://github.com/cheat/cheat/releases/download/4.4.0/cheat-linux-amd64.gz \ | |
&& gunzip cheat-linux-amd64.gz \ | |
&& chmod +x cheat-linux-amd64 \ | |
&& sudo mv cheat-linux-amd64 /usr/local/bin/cheat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With wget:
bash <(wget -nv -O - https://gist.githubusercontent.com/andrewiadevaia/6acd99a0f7dc8aa5d314b608584aac4f/raw)
With curl:
bash <(curl -sL https://gist.githubusercontent.com/andrewiadevaia/6acd99a0f7dc8aa5d314b608584aac4f/raw)