-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
172 lines (128 loc) · 5.24 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#to disable warnings with powerlevel9k theme
export TERM="xterm-256color"
#to enable patched glyphs
source ~/.fonts/*.sh
POWERLEVEL9K_MODE='awesome-fontconfig'
# enable command completion
autoload -Uz compinit
compinit
# enable commong keybindings
source $HOME/.config/zsh/scripts/keybindings.zsh
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=$HOME/.dotnet/tools:$PATH
# for running npm without global permissions
export NPM_PACKAGES="/home/daedalus/.npm-packages"
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
#checking out powerlevel9k
source ~/Workspace/Packages/powerlevel9k/powerlevel9k.zsh-theme
#Use case-insensitive completion.
CASE_SENSITIVE="false"
# Enable command rehashing
zstyle ':completion:*' rehash true
#configure the history
HISTFILE=.config/zsh/history/zhistory
HISTSIZE=1000
SAVEHIST=1000
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Disable marking untracked files under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Plugins to load
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
#archlinux
python
rust
rustup
adb
)
#enable autocompletion for aliases
setopt COMPLETE_ALIASES
#to search for package if command isn't found
#to use zsh-syntax-highlighting
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# 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='kak'
else
export EDITOR='kak'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# completion for powerpill
##################### 9k tweaks ################################################
################################################################################
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context history time dir vcs newline os_icon)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status)
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
################################# Aliases #####################################
###############################################################################
#the below is to allow aliases to be passed to sudo
alias sudo='sudo '
#the below is to backup my dotfiles to github
alias config='git --git-dir=$HOME/.config/cfg/ --work-tree=$HOME'
#the below alias is to modify default ls behavior
alias ls='ls -1lih --color=auto'
#color output with grep
alias grep='grep --color=auto'
#reload zsh
alias zr='source $HOME/.zshrc'
#reading list
alias rtask="task rc.data.location=~/gdrive/.reading_list"
#markdown to pdf conversion, will complete later
alias md2p="pandoc --from markdown --to markdown --wrap=preserve --reference-links --output Downloads/OS_HW.md Workspace$/Classes/Operating_Systems/HW/OS_Homework.md"
############################### Environment Variables ########################
##############################################################################
#using rust
export PATH=$PATH:~/.cargo/bin:$HOME/.local/bin
#the location of the self_log directory
export SLog_directory="$HOME/Gdrive/self_log"
#the location of system tools
export Sys_Tools_Directory="$HOME/Workspace/System_Tools"
#for using docsets from the commandline
export DASHT_DOCSETS_DIR=$HOME/.local/share/Zeal/Zeal/docsets
#for changing the default QT style
#export QT_STYLE_OVERRIDE=kvantum
########################### Colored output for man ########################
###########################################################################
man() {
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
command man "$@"
}
# For a full list of active aliases, run `alias`.
if [ -e /home/daedalus/.nix-profile/etc/profile.d/nix.sh ]; then . /home/daedalus/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer