Last active
May 1, 2024 20:01
-
-
Save maxfenton/0d62dcc40884f881cbea to your computer and use it in GitHub Desktop.
dotfiles for oh-my-zsh + MacOS
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
alias zshconfig="subl $HOME/.zshrc" | |
alias ohmyzsh="subl $HOME/.oh-my-zsh" | |
alias zshrc="source $HOME/.zshrc" | |
alias reload!="source $HOME/.zshrc" | |
####### UPDATES | |
alias brewupdate="brew upgrade; brew update; brew doctor; brew cleanup;" | |
alias npmupdate="npm install -g npm@latest" | |
alias yarnupdate="yarn global upgrade" | |
alias composerupdate="composer self-update && composer global update" | |
alias kirbyupdate="composer global update getkirby/cli" | |
alias vagrant-update="vagrant plugin update; vagrant box prune; vagrant global-status --prune" | |
alias update--all="brewupdate;composerupdate;yarnupdate;npmupdate;nvm cache clear;softwareupdate --all --install" | |
####### APPLICATIONS | |
alias tower="gittower" | |
alias phpstorm="open -na 'PhpStorm.app'" | |
alias pstorm="open -na 'PhpStorm.app'" | |
####### GIT | |
####### VPN | |
alias vpnup="networksetup -connectpppoeservice \"Viget VPN\"" | |
alias vpndown="networksetup -disconnectpppoeservice \"Viget VPN\"" | |
####### FINDER | |
alias dotfiles="cd $DOTFILES" | |
alias library="cd $HOME/Library" | |
alias sites="cd $HOME/Sites" | |
####### MISC | |
alias pubkey="pbcopy < $HOME/.ssh/id_xxxx.pub" | |
alias reloaddns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder" | |
####### |
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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
# Initialization code that may require console input (password prompts, [y/n] | |
# confirmations, etc.) must go above this block; everything else may go below. | |
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# ZSH_THEME="robbyrussell" | |
# ZSH_THEME="cobalt2" | |
ZSH_THEME="powerlevel10k/powerlevel10k" | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
# Comment this out to let ZSH update itself without asking | |
DISABLE_UPDATE_PROMPT="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
export UPDATE_ZSH_DAYS=1 | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much, much faster. | |
DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=(git github macos nvm composer gulp brew zsh-autosuggestions autoupdate history-substring-search zsh-syntax-highlighting) | |
source $ZSH/oh-my-zsh.sh | |
# You may need to manually set your language environment | |
export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
if [[ -n $SSH_CONNECTION ]]; then | |
export EDITOR='nano' | |
else | |
export EDITOR='nano' | |
fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# ssh | |
# export SSH_KEY_PATH="~/.ssh/id_rsa" | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
source $HOME/.aliases | |
# Save MacOS brew casks in the regular Applications folder | |
export HOMEBREW_CASK_OPTS="--appdir=/Applications" | |
# User configuration | |
export PATH="$PATH:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" | |
PATH=$PATH:~/.composer/vendor/bin:~/vendor/vendor/bin | |
export PATH | |
# Set up rbenv for Homebrew. Make sure path is BEFORE Homebrew's /usr/local/[s]bin | |
# To enable shims and autocompletion add to your profile: | |
# if which rbenv > /dev/null; then eval "$(rbenv init -)"; fiexport PATH="/usr/local/bin:$PATH" | |
export PATH="/usr/local/bin:$PATH" | |
# . `brew --prefix`/etc/profile.d/z.sh | |
export PATH=/opt/homebrew/bin:$PATH | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
export PATH="/opt/homebrew/sbin:$PATH" | |
# export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH" | |
# export PATH="/opt/homebrew/opt/[email protected]/sbin:$PATH" | |
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. | |
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment