~mehdix/dotfiles

ref: 2cbfc2b0317fa6462c676d62ae80949a6aad4696 dotfiles/.zshrc -rw-r--r-- 1.9 KiB
2cbfc2b0Mehdi Sadeghi Add kanshi config. 9 months ago
                                                                                
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
# Path to your oh-my-zsh installation.
if [ ! -d "/usr/share/oh-my-zsh" ]; then
	export ZSH=$HOME/.oh-my-zsh
else
	export ZSH="/usr/share/oh-my-zsh"
fi

# simple, arrow, edvardm, random 
ZSH_THEME=simple

# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="false"

# HYPHEN_INSENSITIVE="true"
DISABLE_AUTO_UPDATE="true"

# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
plugins=(git autojump history-substring-search)# timer gem rust cargo)

# Activate oh-my-zsh
source $ZSH/oh-my-zsh.sh

# Add direnv hook
_direnv_hook() {
  eval "$("/usr/bin/direnv" export zsh)";
}
typeset -ag precmd_functions;
if [[ -z ${precmd_functions[(r)_direnv_hook]} ]]; then
  precmd_functions+=_direnv_hook;
fi

# nvm settings (good)
#export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

# Enable kubectl completion if present
if [[ -a `which kubectl` ]]; then
	source <(kubectl completion zsh 2> /dev/null);
fi

# Add X.org keyboard mapping (of no use on Wayland)
#setxkbmap \
#  -layout de,ir \
#  -variant nodeadkeys,pes_keypad \
#  -option '' \
#  -option 'grp:alt_shift_toggle' \
#  -option 'shift:both_shiftlock' \
#  -option 'lv3:caps_switch' \
#  -option 'terminate:ctrl_alt_bkspc' \
#  -option 'eurosign:e'

# Aliases
# `githome` alias is a trick to avoid having git prompt when working
# in different directories of my home folder. I simply rename `.git`
# folder to `.githome` and use the following alias to interact with it.
# On new systems I only need to do the following:
# cd ~
# git init
# git remote add origin git@git.sr.ht:~mehdix/dotfiles
# or
# git remote add origin https://git.sr.ht/~mehdix/dotfiles
# git fetch
# git checkout -f master
# mv .git .githome
alias githome='git --git-dir ~/.githome --work-tree ~'


[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh