-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
64 lines (49 loc) · 1.15 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
export ZSH=/usr/share/oh-my-zsh
ZSH_THEME="grzegorz"
DISABLE_AUTO_UPDATE="true"
ENABLE_CORRECTION="true"
plugins=(
docker
sudo
)
source $ZSH/oh-my-zsh.sh
# == User configuration == #
# Compilation flags
export ARCHFLAGS="-arch x86_64"
# ssh
export SSH_KEY_PATH="~/.ssh/rsa_id"
# Emacs
export ALTERNATE_EDITOR=""
export EDITOR="vim"
export VISUAL="emacsclient -c -a emacs"
# RubyGems
PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
# Aliases
## Config git dotfiles alias
alias config='/usr/bin/git --git-dir=$HOME/.config_git/ --work-tree=$HOME'
## Test editing
alias e="$EDITOR"
alias v="$VISUAL"
## Cat
export BAT_THEME=base16
alias cat=bat
## Git
g() {
if [[ $# > 0 ]]; then
git "$@"
else
git status
fi
}
compdef g=git
# Start tmux scratch on shell start
if [[ -z "$TMUX" ]]; then
if [[ $(tmux ls | grep "^scratch:" | wc -l) == 0 ]]; then
tmux new-session -d -s "scratch"
fi
session_id=$(date +%Y%m%d%H%M%S)
tmux new-session -d -t "scratch" -s "scratch_$session_id"
exec tmux attach-session -t "scratch_$session_id" \; set-option destroy-unattached && exit;
fi
# ASDF-VM
. /home/grzegorz/.asdf/asdf.sh