Skip to content

Instantly share code, notes, and snippets.

@andrewiadevaia
Last active April 21, 2023 04:04
Show Gist options
  • Save andrewiadevaia/dcd92971bd0b177745419695a6bd932a to your computer and use it in GitHub Desktop.
Save andrewiadevaia/dcd92971bd0b177745419695a6bd932a to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir ~/.ssh/
mkdir -p ~/.config/fish
apt update && apt upgrade -y
apt install -y curl wget nano git exa python3 python3-pip
apt install -y fish fzf
python3 -m pip install --user ansible ansible-lint
ansible-galaxy collection install community.general
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
curl -sS https://starship.rs/install.sh | sh -s -- --yes
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
fish -c "fisher install PatrickF1/fzf.fish"
cat > ~/.config/fish/config.fish <<'EOF'
if status is-interactive
# Commands to run in interactive sessions can go here
end
set PATH $PATH "/mnt/c/Users/andrew/AppData/Local/Programs/Microsoft VS Code/bin"
alias ls="exa -l --header --group --icons --sort=name --group-directories-first"
alias ll="ls -a --header --group"
starship init fish | source
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment