Last active
March 15, 2025 11:49
-
-
Save gerwld/ac6c3c361482768fb436327b5aab7b5f to your computer and use it in GitHub Desktop.
.zshrc config
This file contains hidden or 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
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="robbyrussell" | |
export PATH="/usr/local/opt/ruby/bin:$PATH" | |
#17 java | |
export JAVA_HOME=$(/usr/libexec/java_home -v 17) | |
# android paths | |
export ANDROID_HOME=$HOME/Library/Android/sdk | |
export PATH=$PATH:$ANDROID_HOME/emulator | |
export PATH=$PATH:$ANDROID_HOME/platform-tools | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh | |
# nav to proj | |
seme() { | |
cd ~/Desktop/prog/projects/"$@" | |
} | |
# fastcommit | |
ftcommit() { | |
git add . && git commit -m "Updates" | |
} | |
ftpush() { | |
git push origin main | |
} | |
# fastdeploy | |
ftdeploy() { | |
pnpm run build && pnpm run deploy | |
} | |
laf() { | |
ftcommit | |
ftpush | |
} | |
gs() { | |
git status | |
} | |
# prevents opening 50 Finder windows & other apps on boot | |
disable_macos_boot_shitload () { | |
sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow.* | |
sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow.* | |
sudo chown root ~/Library/Saved\ Application\ State/com.apple.finder.savedState | |
sudo chmod 000 ~/Library/Saved\ Application\ State/com.apple.finder.savedState | |
defaults write -g ApplePersistence -bool false | |
defaults write com.apple.loginwindow TALLogoutSavesState -bool false | |
} | |
# brings it back | |
enable_macos_boot_shitload () { | |
defaults write -g ApplePersistence -bool true | |
defaults write com.apple.loginwindow TALLogoutSavesState -bool true | |
sudo rm -rf ~/Library/Preferences/ByHost/com.apple.loginwindow.* | |
sudo rm -rf ~/Library/Saved\ Application\ State/com.apple.finder.savedState | |
} | |
# disables update iPhone iOS popup (macos) | |
disable_ios_update_popup(){ | |
cd /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/ | |
sudo mv MobileDeviceUpdater.app MobileDeviceUpdaterDISABLED.app | |
} | |
# enables it back | |
enable_ios_update_popup(){ | |
cd /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/ | |
sudo mv MobileDeviceUpdaterDISABLED.app MobileDeviceUpdater.app | |
} | |
# fixes the iPhone USB cycle connected-disconnected-connected issue | |
fixiphone() { | |
sudo killall -STOP -c usbd | |
} | |
# shows mylocalip | |
getmyip() { | |
ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2 | |
} | |
# fixes node package manager perms | |
fixnpmpermissions() { | |
sudo chown -R $(whoami) ~/.npm | |
} | |
# No update | |
HOMEBREW_NO_AUTO_UPDATE="1" | |
# plugins | |
plugins=(git) | |
# pnpm | |
export PNPM_HOME="/Users/apple/Library/pnpm" | |
case ":$PATH:" in | |
*":$PNPM_HOME:"*) ;; | |
*) export PATH="$PNPM_HOME:$PATH" ;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment