-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmac.cshrc
55 lines (46 loc) · 1.86 KB
/
mac.cshrc
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
if (-f /sw/bin/keychain ) then
/sw/bin/keychain $HOME/.ssh/id_dsa
set host=`hostname`
if (-f $HOME/.keychain/$host-csh) then
source $HOME/.keychain/$host-csh
endif
endif
# Set the DISPLAY variable -- works for Apple X11 with Fast User Switching
if (! $?DISPLAY && ! $?SSH_CONNECTION ) then
setenv DISPLAY `ps -wwx | grep -F X11.app | awk '{print $NF}' | grep -e ":[0-9]"`.0
if ( $DISPLAY == '.0' )then
setenv DISPLAY :0.0
endif
echo "DISPLAY has been set to $DISPLAY"
endif
# iTerm Tab and Title Customization and prompt customization
# Set the title bar and tabs of iTerm separately in tcsh
#
# The full path of current working directory will appear in the title bar
#
alias settitle 'echo -n "]2; "\!*""'
alias SetTitle 'settitle \[tcsh\]\ \ \ $HOST:r:r\:\:$cwd '
#
# The last two directories in the path will appear in the tab
# However, this is what will appear in the title bar of terminal.app
#
alias settab 'echo -n "]1; "\!*""'
alias SetTab 'settab $cwd:h:t/$cwd:t '
#
# This dynamically updates both titles whenever you change directories
# If you use pushd and popd, alias them likewise to redefine them.
#
alias cd 'cd \!*;SetTab;SetTitle'
#
# Start the label update process on login to window
SetTitle;SetTab
setenv PATH "$HOME/config/binmac:${PATH}"
setenv PATH "/usr/local/homebrew/bin:$PATH"
setenv PYTHONPATH "/usr/local/homebrew/lib/python3.9/site-packages:$PATH"
setenv PATH /usr/local/texlive/2018/bin/x86_64-darwin:${PATH}
alias mvim /Applications/MacVim.app/Contents/bin/mvim
#alias mvim /Applications/MacVim\ 2.app/Contents/bin/mvim
# Useful for Mac
alias myps 'ps -u kruger | grep -v login | grep -v tcsh | grep -v Applications | grep -v mdworker | grep -v System | grep -v /usr/lib | grep -v Library | grep -v agilebits | grep -v /usr/sbin'
alias mdfindn 'mdfind -name \!$'
alias mdutiln 'mdutil -name \!$'