Created
February 6, 2024 22:35
-
-
Save AlexanderBrevig/0c1961e42229a3e9b795323baaaf005f to your computer and use it in GitHub Desktop.
mac_rescue.sh
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
#/usr/bin/env bash | |
# Get homebrew QUICK | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
brew upgrade | |
brew install bash # because Bash 3.2 is laughable in 2024 | |
# The absolute best (but still familiar) shell | |
# If you feel adventourous, check out nushell which is fucking bonkers | |
brew install fish | |
brew install fzf # fuzzy finder (handy for for zoxide and kubectx) | |
brew install zoxide # the BEST way to navigate your dirs | |
# No lie, the absoulte best $PROMPT in the universe | |
# Have a look at my config for amaze k8s context names | |
# https://github.com/AlexanderBrevig/dotfiles/blob/main/starship/.config/starship.toml | |
brew install starship | |
# Before switching to fish, let's play nice with macfaggots | |
echo "fish_add_path /opt/homebrew/bin" >> ~/.config/fish/config.fish | |
echo "fish_add_path /opt/homebrew/sbin" >> ~/.config/fish/config.fish | |
echo "fish_add_path /usr/local/bin" >> ~/.config/fish/config.fish | |
echo "fish_add_path /usr/sbin" >> ~/.config/fish/config.fish | |
echo "fish_add_path /sbin" >> ~/.config/fish/config.fish | |
echo "fish_add_path /Library/Apple/usr/bin" >> ~/.config/fish/config.fish | |
# force XDG_CONFIG_HOME becuase 2024 | |
echo "set -x XDG_CONFIG_HOME ~/.config" >> ~/.config/fish/config.fish | |
# disable the slightly annoying startup greeting | |
printf "function fish_greeting\nend" >> ~/.config/fish/config.fish | |
# because I love you | |
echo "abbr --add --global -- kc 'kubectl'" >> ~/.config/fish/config.fish | |
echo "abbr --add --global -- kx 'kubectx'" >> ~/.config/fish/config.fish | |
# because you need these to get set up | |
echo "zoxide init fish | source" >> ~/.config/fish/config.fish | |
echo "starship init fish | source" >> ~/.config/fish/config.fish | |
# Add fish to available shells | |
sudo echo /usr/local/bin/fish >> /etc/shells | |
# Change shell from the bash3 legacy default abomination | |
chsh -s /usr/local/bin/fish | |
# The _very best_ terminal I know | |
# Blazingly fast, written in Rust BTW | |
# https://wezfurlong.org/wezterm/install/macos.html#installing-on-macos | |
# Config is relatively easy too | |
# https://wezfurlong.org/wezterm/config/files.html | |
brew install --cask wezterm | |
echo "Restart your terminal, then open WezTerm as well" | |
echo "now run 'find .', in both and see the difference :D" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment