This repository has been archived by the owner on Dec 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
executable file
·102 lines (81 loc) · 2.45 KB
/
.zshrc
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Path to your oh-my-zsh configuration.
ZSH=~/.oh-my-zsh/
source ~/.zprofile
ZSH_THEME="robbyrussell"
DISABLE_AUTO_UPDATE="true"
COMPLETION_WAITING_DOTS="true"
plugins=(git themes)
export LANG=en_US.UTF8
export EDITOR='vim'
unset MALLOC_PERTURB_
# Coq things
# export OPAMROOT=~/opam-coq.8.8.2
# eval `opam config env`
########################## Color Commands
if [ -x /usr/bin/dircolors ]; then
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
#######################################################################
############################ Aliases ##################################
#######################################################################
### Debian
alias ulock='gnome-screensaver-command -l'
alias agu='sudo apt-get update'
alias agi='sudo apt-get install'
### Misc
alias rm='rm -i'
alias l='ls -lah'
alias c='clear'
alias ..='cd ..'
alias k='exit'
alias rmr='rm -r'
alias ed='emacs --daemon=ed'
alias e='emacsclient -t --socket-name ed'
alias E='sudo emacsclient -t'
alias eZ="$EDITOR ~/.zshrc"
alias Z='source ~/.zshrc'
alias v='vim'
alias g='git'
hidpi () {
xrandr --output eDP-1 --dpi 192
i3-msg restart
}
lodpi () {
xrandr --output eDP-1 --dpi 96
i3-msg restart
}
record () {
ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 0 "$1"
}
###################################################################
# Phoenix things
function prompt_nix_shell_precmd {
if [[ -n ${IN_NIX_SHELL} && ${IN_NIX_SHELL} != "1" ]] then
if [[ -n ${IN_WHICH_NIX_SHELL} ]] then
NIX_SHELL_NAME=": ${IN_WHICH_NIX_SHELL}"
fi
NIX_PROMPT="%F{8}[%F{3}nix-shell${NIX_SHELL_NAME}%F{8}]%f"
if [[ $PROMPT != *"$NIX_PROMPT"* ]] then
PROMPT="$NIX_PROMPT $PROMPT"
fi
fi
}
# Show [nix-shell] in the prompt
function prompt_nix_shell_setup {
autoload -Uz add-zsh-hook
add-zsh-hook precmd prompt_nix_shell_precmd
}
if [ "$HOSTNAME" = "phoenix.sice.indiana.edu" ]; then
export PATH="/l/racket-7.2/bin:$PATH"
source $HOME/.nix-profile/etc/profile.d/nix.sh
prompt_nix_shell_setup
fi
###################################################################
ZSH_DISABLE_COMPFIX=true
source $ZSH/oh-my-zsh.sh
if [ -e /Users/ckoparkar/.nix-profile/etc/profile.d/nix.sh ]; then . /Users/ckoparkar/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer