From 00c41d7552684066ec470212a4cd552542c808e3 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 21 Dec 2021 14:48:18 -0500 Subject: [PATCH] Cleanup from reset after mac setup --- .gitignore | 2 ++ Makefile | 5 +++++ zsh/.config/zsh/.zshrc | 2 ++ zsh/.zshenv | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+) diff --git a/.gitignore b/.gitignore index 18a6a4e..74f9734 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ alacritty/.config/alacritty/alacritty.yml zsh/.config/zsh/.zcompdump +zsh/.config/zsh/.zsh_history +zsh/.config/zsh/.zsh_sessions diff --git a/Makefile b/Makefile index 0c0f598..acc2391 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,11 @@ javascript: nodenv-base nodenv-build linux: sudo apt-get install direnv fzf silversearcher-ag stow tmux vim zsh +mac: + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + sudo mv /etc/{zprofile,zprofile.old} + brew install coreutils direnv fzf git stow the_silver_searcher tmux vim zsh + ruby: rbenv-base rbenv-build vim: diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index ffb757e..a4ecd6c 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -1,3 +1,5 @@ +export GPG_TTY=$(tty) + typeset -U PATH source $ZDOTDIR/aliases diff --git a/zsh/.zshenv b/zsh/.zshenv index 5eb83e0..c63683b 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -5,6 +5,24 @@ RBENV_PATH="$HOME/.rbenv/bin" ZDOTDIR=$HOME/.config/zsh +if [[ "$OSTYPE" == darwin* ]]; then + HOMEBREW_PREFIX="/opt/homebrew" + HOMEBREW_CELLAR="/opt/homebrew/Cellar" + HOMEBREW_REPOSITORY="/opt/homebrew" + + GNU_TOOLS_PATH="/opt/homebrew/opt/coreutils/libexec/gnubin" + GNU_TOOLS_MAN_PATH="/opt/homebrew/opt/coreutils/libexec/gnuman" + + PATH="/usr/local/bin:/Library/Apple/usr/bin:$PATH" + + PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}"; + MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:"; + INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}"; + + [[ -d "$GNU_TOOLS_PATH" ]] && PATH="$GNU_TOOLS_PATH:$PATH" + [[ -d "$GNU_TOOLS_MAN_PATH" ]] && MANPATH="$GNU_TOOLS_MAN_PATH:$MANPATH" +fi + [[ -d "$RBENV_PATH" ]] && PATH="$RBENV_PATH:$PATH" [[ -d "$NODENV_PATH" ]] && PATH="$NODENV_PATH:$PATH" [[ -d "$PERSONAL_BIN_PATH" ]] && PATH="$PERSONAL_BIN_PATH:$PATH"