diff --git a/.homesick_subdir b/.homesick_subdir index 1dd79eb..21ff674 100644 --- a/.homesick_subdir +++ b/.homesick_subdir @@ -1 +1,2 @@ .git-template/hooks +.config/spaceship diff --git a/README.md b/README.md index d70fcae..0aa3e8a 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,22 @@ # dotfiles-macos -This repo depends on the [Homesick](https://github.com/technicalpickles/homesick) project to manage dotfiles. +## macOS -#### OS - -- macOS +This repo depends on the [Homesick](https://github.com/technicalpickles/homesick) & [Homebrew](https://github.com/Homebrew/brew) projects to manage system dotfiles. ### Required: Ruby -[homebrew - Ruby](https://www.ruby-lang.org/en/documentation/installation/) +[Homebrew - Ruby](https://www.ruby-lang.org/en/documentation/installation/) ``` brew install ruby ``` -[Ruby Version Manager - RVM](https://rvm.io/) - -##### Verify GPG keys - -``` -brew install gnupg -``` - -##### RVM Installation +###### [Ruby Version Manager - RVM](https://rvm.io/) -``` -curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles -``` +--- -### To configure dotfiles +### Configure dotfiles with Homesick 1. Install Homesick with `gem install homesick` 2. Clone this castle with `homesick clone nicholashoule/dotfiles-macos` @@ -36,41 +24,59 @@ curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles --- -#### Other post-configurations +### Post-configurations -##### Set up VundleVim +#### Set up VundleVim -[GitHub - VundleVim](https://github.com/VundleVim/Vundle.vim) +###### [GitHub - VundleVim](https://github.com/VundleVim/Vundle.vim) ``` git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim ``` -To install from command line: `vim +PluginInstall +qall` +- To install from command line: `vim +PluginInstall +qall` +- To install inside Vim, launch vim and run `:PluginInstall` -Launch vim and run `:PluginInstall` +#### Set up .oh-my-zsh -##### Set up .oh-my-zsh - -[GitHub - Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh) +###### [GitHub - Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh) ``` export ZSH="${HOME}/.oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ``` -##### Set up coreutils +#### Set up Spaceship (Theme) + +###### [zsh - Spaceship](https://github.com/spaceship-prompt/spaceship-prompt) + +``` +brew install spaceship +``` + +#### Set up Nerd Fonts (Fonts) -[homebrew - coreutils](https://formulae.brew.sh/formula/coreutils) +###### [zsh - Nerd Fonts](https://github.com/ryanoasis/nerd-fonts) + +``` +brew tap homebrew/cask-fonts +brew install --cask font-hack-nerd-font +``` + +#### Set up coreutils + +###### [homebrew - coreutils](https://formulae.brew.sh/formula/coreutils) ``` brew install coreutils ``` -##### Set up pre-commit +#### Set up pre-commit -[homebrew - pre-commit](https://pre-commit.com/#installation) +###### [homebrew - pre-commit](https://pre-commit.com/#installation) ``` brew install pre-commit ``` + +--- diff --git a/home/.config/spaceship/spaceship.zsh b/home/.config/spaceship/spaceship.zsh new file mode 100644 index 0000000..d0249ba --- /dev/null +++ b/home/.config/spaceship/spaceship.zsh @@ -0,0 +1,46 @@ +#!/bin/zsh +# shellcheck disable=all +# Settings, config: https://spaceship-prompt.sh/config/intro/ +# UTF-8 Symbols: https://www.w3schools.com/charsets/ref_utf_arrows.asp + +## Prompt-level options +# https://spaceship-prompt.sh/config/prompt/ + +## Time +SPACESHIP_TIME_SHOW=true +SPACESHIP_TIME_SUFFIX="|" +SPACESHIP_TIME_FORMAT='%W%t' +SPACESHIP_TIME_COLOR='white' + +## Prompt (Char) +SPACESHIP_CHAR_PREFIX="↳" +SPACESHIP_CHAR_SYMBOL=" : " +SPACESHIP_CHAR_SYMBOL_ROOT="#" + +## Username & Hostname +SPACESHIP_USER_SHOW=always +SPACESHIP_USER_PREFIX="@" +SPACESHIP_USER_SUFFIX="" +SPACESHIP_USER_COLOR="green" +SPACESHIP_USER_COLOR_ROOT="red" +SPACESHIP_HOST_SHOW="always" +SPACESHIP_HOST_SHOW_FULL=true +SPACESHIP_HOST_PREFIX="" +SPACESHIP_HOST_SUFFIX="|" +SPACESHIP_HOST_COLOR="blue" +SPACESHIP_HOST_COLOR_SSH="red" + +## Directory +SPACESHIP_DIR_SHOW=true +SPACESHIP_DIR_TRUNC_REPO=false +SPACESHIP_DIR_PREFIX="|" +SPACESHIP_DIR_SUFFIX="|" +SPACESHIP_DIR_COLOR="cyan" + +## Execution time +SPACESHIP_EXEC_TIME_SHOW=false + +## Git +# https://spaceship-prompt.sh/sections/git/ +SPACESHIP_GIT_STATUS_SHOW=true +SPACESHIP_GIT_STATUS_COLOR="yellow" diff --git a/home/.sh/brew-helper.zsh b/home/.sh/brew-helper.zsh index 93d96f4..ea701a1 100755 --- a/home/.sh/brew-helper.zsh +++ b/home/.sh/brew-helper.zsh @@ -9,7 +9,8 @@ sudo -v # HOMEBREW_PREFIX=/usr/local # HOMEBREW_CELLAR=/usr/local/Cellar # HOMEBREW_REPOSITORY=/usr/local/Homebrew -# export HOMEBREW_PREFIX HOMEBREW_CELLAR HOMEBREW_REPOSITORY +# export HOMEBREW_PREFIX HOMEBREW_CELLAR HOMEBREW_REPOSITORY HOMEBREW_CASK_OPTS +export HOMEBREW_CASK_OPTS="--appdir=~/Applications" # Info # sudo xcode-select --install @@ -26,12 +27,12 @@ if command -v brew 1>/dev/null 2>&1; then brew update && brew upgrade # Install brew packages - brew install -sq coreutils # Install GNU core utilities (those that come with OS X are outdated) - brew install -sq wget # Install standard `vim` with IRI support - brew install -sq findutils # Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. + brew install -sq coreutils # Install GNU core utilities + brew install -sq wget # Install GNU wget + brew install -sq findutils # Install GNU find, locate, updatedb, and xargs, g-prefixed + brew install -sq gnupg # Install GNU gpg (GnuPG) + brew install -sq tree # Install GNU tree brew install -sq pre-commit # Install pre-commit package manager (https://pre-commit.com/#install) - brew install -sq gnupg # Install gpg (GnuPG) - brew install -sq tree # Install tree ## Create symlinks #sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum diff --git a/home/.sh/dotnet.sh b/home/.sh/dotnet.zsh similarity index 100% rename from home/.sh/dotnet.sh rename to home/.sh/dotnet.zsh diff --git a/home/.sh/nerd-fonts.zsh b/home/.sh/nerd-fonts.zsh new file mode 100755 index 0000000..6c3af88 --- /dev/null +++ b/home/.sh/nerd-fonts.zsh @@ -0,0 +1,10 @@ +#!/bin/zsh +# shellcheck disable=all +# https://github.com/ryanoasis/nerd-fonts +# https://github.com/ryanoasis/nerd-fonts#option-4-homebrew-fonts +# Check for brew (Homebrew) +if command -v brew 1>/dev/null 2>&1; then + # Install brew packages + brew tap homebrew/cask-fonts + brew install --cask font-hack-nerd-font +fi diff --git a/home/.sh/powerline.zsh b/home/.sh/powerline-fonts.zsh similarity index 100% rename from home/.sh/powerline.zsh rename to home/.sh/powerline-fonts.zsh diff --git a/home/.zshrc b/home/.zshrc index 00a7b69..4de8db8 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -1,6 +1,9 @@ # .zshrc # shellcheck disable=all # https://zsh.sourceforge.io/Guide/zshguide02.html +LANG=en_US.UTF-8 +LC_ALL=en_US.UTF-8 +export LANG LC_ALL ## Colors # man ls | grep -A 50 'LSCOLORS' @@ -19,9 +22,10 @@ export COMPLETION_WAITING_DOTS ## ZSH w/.oh-my-zsh # https://github.com/ohmyzsh/ohmyzsh ZSH="${HOME}/.oh-my-zsh" -ZSH_THEME="rkj-repos" # Set theme to load. (agnoster, rkj-repos, ys) -zstyle ':omz:update' mode reminder # Set omz update reminder -export ZSH ZSH_THEME +zstyle ':omz:update' mode reminder # Set omz update reminder +#ZSH_THEME="spaceship" # Set theme to load. (agnoster, rkj-repos, ys) +source $(brew --prefix)/opt/spaceship/spaceship.zsh # (brew install spaceship), https://github.com/spaceship-prompt/spaceship-prompt +export ZSH ## Plugins # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) diff --git a/home/Brewfile b/home/Brewfile new file mode 100644 index 0000000..a0b5531 --- /dev/null +++ b/home/Brewfile @@ -0,0 +1,22 @@ +# Brewfile +# https://github.com/Homebrew/homebrew-bundle +# tap "homebrew/cask" +tap "homebrew/cask-fonts" + +# set arguments for all 'brew install --cask' commands +cask_args appdir: "~/Applications", require_sha: true + +# Install brew packages +brew "coreutils" # Install GNU core utilities +brew "wget" # Install GNU wget +brew "findutils" # Install GNU find, locate, updatedb, and xargs, g-prefixed +brew "gnupg" if OS.mac? # Install GNU gpg (GnuPG) +brew "tree" # Install GNU tree + +# Others +#brew "mysql@5.6", restart_service: true, link: true, conflicts_with: ["mysql"] # MySQL 5.6 +brew "pre-commit" # Install pre-commit package manager (https://pre-commit.com/#install) + +# Themes & Fonts +brew "spaceship" # Theme, https://github.com/spaceship-prompt/spaceship-prompt +brew "font-hack-nerd-font" # Fonts, https://github.com/ryanoasis/nerd-fonts \ No newline at end of file