feat(*): remove install.sh, custom oh-my-zsh theme, update Brewfile and README

This commit is contained in:
Anton Shubin 2023-07-15 14:50:17 +08:00
parent 756ab197ea
commit 4c4fd22cbc
4 changed files with 42 additions and 119 deletions

View File

@ -1,34 +1,37 @@
# Search for apps names here: https://brew.sh/
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
tap "hashicorp/tap"
# Dev Tools
brew "ncdu"
brew "nvm"
brew "hashicorp/tap/terraform"
cask "google-cloud-sdk"
cask "datagrip"
cask "webstorm"
cask "visual-studio-code"
cask "docker"
cask "expressvpn"
# Utilities
cask "toggl-track"
cask "divvy"
cask "google-chrome"
cask "zoom"
brew "tree"
cask "1password"
cask "upwork"
cask "alfred"
cask "divvy"
cask "docker"
cask "google-chrome"
cask "google-cloud-sdk"
cask "google-drive"
cask "kap"
cask "slack"
cask "iterm2"
cask "sublime-text"
cask "telegram"
cask "transmission"
cask "visual-studio-code"
cask "vlc"
cask "windscribe"
# Fun
cask "nvidia-geforce-now"
cask "steam"
cask "warp"
cask "whatsapp"
vscode "Angular.ng-template"
vscode "bradlc.vscode-tailwindcss"
vscode "csstools.postcss"
vscode "cweijan.vscode-mysql-client2"
vscode "eamodio.gitlens"
vscode "esbenp.prettier-vscode"
vscode "GitHub.copilot"
vscode "mikestead.dotenv"
vscode "ms-azuretools.vscode-docker"
vscode "ms-vscode.cpptools"
vscode "nrwl.angular-console"
vscode "platformio.platformio-ide"
vscode "Postman.postman-for-vscode"
vscode "Prisma.prisma"
vscode "svelte.svelte-vscode"
vscode "tal7aouy.indent-colorizer"
vscode "vscode-icons-team.vscode-icons"
vscode "xaver.clang-format"

View File

@ -1,21 +1,18 @@
# Dotfiles
This repository is my setup for a new MacOS computer.
This repository is my setup for a new MacOS computer.
It helps me to install quickly all software I need for work and fun.
Feel free to check & alter the list of software to be installed - [Brewfile](Brewfile).
Feel free to check & alter the list of software to be installed - [Brewfile](Brewfile)
Additionally I install next software, that is not (yet) presented in Brew:
Also don't hesitate to share your feedback about [install.sh](install.sh) - I'm not a big fun of Shell, so my script may suck :D
Use at your own risk!
- Upwork
- Toggl Track
## Installation
Run next commands in your terminal one by one and follow instructions if any.
Note: Brew installation will ask you for the root password.
And it takes 15-30 min, so make sure to grab your favourite tea or coffee meanwhile.
```shell
# Install oh-my-zsh (it restarts shell, so it has to be separate)
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Main installation script (make sure you use `zsh` to run the script, otherwise you'll run into weird errors)
zsh ./install.sh
```
1. Install Brew from here: https://brew.sh/
2. Copy Brewfile to your computer and run `brew bundle` from the same folder where you copied the file.
Note: Brew will ask you for the root password and other apps inside Brewfile might ask you for your password as well.
Usually installation takes 10-20 min, so make sure to brew a cup of tea or coffee :)

View File

@ -1,47 +0,0 @@
#!/bin/bash
set -e
script_dir="$PWD"
# Rosetta (For Apple Silicon (M1) CPUs only)
if [[ $(uname -p) == 'arm' ]]; then
sudo softwareupdate --install-rosetta
fi
echo '▶️ Installing Brew...'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [[ $(uname -p) == 'arm' ]]; then
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
else
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
fi
eval "$($(brew --prefix)/bin/brew shellenv)"
echo '✅ Brew installation complete \n'
echo '▶️ Installing Apps with Brew...'
brew bundle
# Configure Google Cloud CLI $PATH and autocomplete
echo 'source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"' >> ~/.zshrc
echo 'source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"' >> ~/.zshrc
echo '✅ Apps installation complete \n'
echo '▶️ Installing Node.js via NVM...'
# Put NVM dir into .zshrc
echo 'export NVM_DIR="$HOME/.nvm"
[ -s "$(brew --prefix)/opt/nvm/nvm.sh" ] && \. "$(brew --prefix)/opt/nvm/nvm.sh" # This loads nvm
[ -s "$(brew --prefix)/opt/nvm/etc/bash_completion.d/nvm" ] && \. "$(brew --prefix)/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion' >> ~/.zshrc
source ~/.zshrc
# Install Node.js
nvm install node
npm i -g yarn
echo '✅ Node.js installation complete \n'
echo '▶️ Configuring custom Spy4x theme for Oh-my-zsh...'
cd "$script_dir"
cp my.zsh-theme ~/.oh-my-zsh/themes/
echo 'ZSH_THEME="my"' >> ~/.zshrc
echo 'source $ZSH/oh-my-zsh.sh' >> ~/.zshrc
source ~/.zshrc
echo '✅ Configuration complete \n'
echo '🎉 If you see this message, then its all done 🎉 \n\n\n'

View File

@ -1,30 +0,0 @@
# oh-my-zsh theme
# Example of the look:
#
# ~/projects/project-name master firebase-project-id gcp-project-id
# $ <your input will start here>
#
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
local current_dir='$fg[green]%}%~%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'
# Get Firebase Project ID or Alias that is associated with current folder
local firebase_project=%{$fg[yellow]%}'$(grep \"$(pwd)\" ~/.config/configstore/firebase-tools.json | cut -d" " -f2 | tr -d "\"" | tr -d ",")'%{$reset_color%}
# Get Google Cloud Project ID that is currently selected
local gcp_project=%{$fg[cyan]%}'$(gcloud config get-value project 2> /dev/null)'%{$reset_color%}
PROMPT="${current_dir} ${git_branch} ${firebase_project} ${gcp_project}
$ "
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$terminfo[bold]"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
alias yu="yarn upgrade-interactive --latest"
alias gst="git status -sb"
alias tree="tree -a -L 1"
alias nx="npx nx"
alias firebase="npx firebase"