-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
155 lines (128 loc) · 4.22 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
if (( ${+DISPLAY} )); then
export TERMINAL=xterm-kitty
export TERM=xterm-kitty
fi
export PATH=$PATH:$HOME/.scripts:$HOME/bin:$HOME/.local/bin:$HOME/.emacs.d/bin
export ZSH=$HOME/.oh-my-zsh
# export DOTNET_CLI_TELEMETRY_OUTPUT=1
if type nvim > /dev/null; then
export EDITOR="nvim"
export VISUAL="nvim"
fi
export THCRAP_DIR="/mnt/HDD/game/touhou/game/thcrap"
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
# https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="philips"
# philips
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
HIST_STAMPS="dd.mm.yyyy"
set -o extendedglob
plugins=(git autoupdate zshmarks zsh-autosuggestions colorize colored-man-pages zsh-syntax-highlighting)
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
source $ZSH/oh-my-zsh.sh
autoload -U compinit
compinit
export MANPATH="/usr/local/man:$MANPATH"
export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nvim'
else
export EDITOR='nvim'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
PROMPT="%B%F{207}%n%f%b:%F{45}%d%f %B%F{yellow}$%f%b "
RPROMPT="[%F{40}%*%f]"
setopt HIST_IGNORE_DUPS
HISTSIZE=1000000
SAVEHIST=$HISTSIZE
if [[ -f ~/.playlists ]]; then
. ~/.playlists
fi
if [[ -f /usr/share/LS_COLORS/dircolors.sh ]]; then
. "/usr/share/LS_COLORS/dircolors.sh"
fi
# For a full list of active aliases, run `alias`.
if [ "$TERMINAL" = "kitty" ]; then
alias ssh="kitty +kitten ssh"
fi
lfcd ()
{
tmp="$(mktemp)"
lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
bindkey -s '^o' 'lfcd\n'
alias zshcfg="$EDITOR ~/.zshrc"
alias vimcfg="$EDITOR ~/.config/nvim/init.vim"
alias i3cfg="$EDITOR ~/.config/i3/config"
alias i3statuscfg="$EDITOR ~/.config/i3status-rust/config.toml"
alias autoexec="$EDITOR ~/.steam/steam/steamapps/common/team\ fortress\ 2/tf/cfg/overrides/autoexec.cfg"
alias fstab="sudo $EDITOR /etc/fstab"
alias sudo="sudo "
alias piserver="ssh [email protected] -p 255"
alias audiodevices="pacmd list-sinks | grep -e 'name:' -e 'index:'"
alias nano="nano --rcfile ~/.nanorc"
alias jp="LANG=ja_JP.UTF-8"
alias sdn="sudo shutdown now"
alias srn="sudo reboot now"
alias sus="systemctl suspend"
alias printeron="sudo systemctl start cups.service"
alias printeroff="sudo systemctl stop cups.service"
alias startx="startx ~/.xinitrc"
alias hg="kitty +kitten hyperlinked_grep"
alias ccat="highlight -O ansi"
alias task="go-task"
alias vpn="mullvad-exclude"
alias thunar="vpn thunar"
alias jakdebug="cd /home/philip/code/git/pcsx2/release/pcsx2-qt; ./pcsx2-qt"
alias winepfx="export WINEPREFIX=$(pwd)"
alias tfl="cd /home/philip/code/git/jak-clones/TFL/jak-project"
alias ptraceoff="echo 1 | sudo tee /proc/sys/kernel/yama/ptrace_scope"
alias ptraceon="echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope"
alias tfsrv_start="sudo systemctl start tfsrv"
alias tfsrv_restart="sudo systemctl restart tfsrv"
alias tfsrv_stop="sudo systemctl stop tfsrv"
unalias gk
alias goto="jump"
alias bm="bookmark"
alias d="deletemark"
alias p="showmarks"
# devkitpro vars
DEVKITPRO=/opt/devkitpro
DEVKITARM=/opt/devkitpro/devkitARM
DEVKITPPC=/opt/devkitpro/devkitPPC
bashcompinit
if [[ -f $HOME/.config/broot/launcher/bash/br ]]; then
source $HOME/.config/broot/launcher/bash/br
fi
export MANGOHUD=1
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export WEBKIT_DISABLE_DMABUF_RENDERER=1 # https://bugs.webkit.org/show_bug.cgi?id=259644
export BROWSER=firefox
# opam configuration
[[ ! -r /home/philip/.opam/opam-init/init.zsh ]] || source /home/philip/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
source /usr/share/nvm/init-nvm.sh
zstyle ':completion:*:*:update-gsrc:*' file-patterns '%p:globbed-files'
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/usr/etc/profile.d/conda.sh" ]; then
. "/usr/etc/profile.d/conda.sh"
else
export PATH="/usr/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<