-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc.macos
33 lines (29 loc) · 1.04 KB
/
zshrc.macos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# User configuration
path+=(
"/opt/homebrew/bin"
"/opt/homebrew/sbin"
)
# tmux fix nvm
# https://superuser.com/questions/544989/does-tmux-sort-the-path-variable/583502#583502
if [ -f /etc/profile ]; then
source /etc/profile
fi
# just in case
# trash is keg-only, which means it was not symlinked into /opt/homebrew,
# because macOS provides similar software and installing this software in
# parallel can cause all kinds of trouble.
# If you need to have trash first in your PATH:
path+=(
"/opt/homebrew/opt/trash/bin"
)
alias rm=trash
# switch to headphones
alias shead="SwitchAudioSource -s \"External Headphones\" && osascript -e 'display notification \"Switched to headphones\" with title \"Audio source\"'"
# switch to speakers
alias smac="SwitchAudioSource -s \"MacBook Pro Speakers\" && osascript -e 'display notification \"Switched to speakers\" with title \"Audio source\"'"
# list all options
alias sall="SwitchAudioSource -a"
# show current option
alias scur="SwitchAudioSource -c"
# hombrew bin
eval "$(/opt/homebrew/bin/brew shellenv)"