-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
68 lines (53 loc) · 2.03 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
#!/bin/zsh
# Source shared configuration
source "$HOME/Documents/repos/dotfiles/scripts/shell.sh"
# Set fzf installation directory path
export FZF_BASE=/usr/local/bin/fzf
# Source fzf configuration
[ -f $HOME/.fzf.zsh ] && source $HOME/.fzf.zsh
if [[ $OSTYPE == 'linux-gnu' ]]; then
ZSH_PLUGINS_PATH="/usr/share/zsh/plugins"
else
ZSH_PLUGINS_PATH="/opt/homebrew/share"
fi
# zsh-autosuggestions setup
source "$ZSH_PLUGINS_PATH/zsh-autosuggestions/zsh-autosuggestions.zsh"
# zsh-syntax-highlighting setup must be sourced last
source "$ZSH_PLUGINS_PATH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
# zsh-autocomplete setup
# source /Users/bradleycushing/Documents/repos/zsh-autocomplete/zsh-autocomplete.plugin.zsh
# Completion configuration
autoload -Uz compinit # Mark compinit function
compinit # Load complist module
zmodload zsh/complist # Load completion list
zstyle ':completion:*' menu select # Highlight tab selections
_comp_options+=(globdots) # Show hidden files for completion
# Use vi/vim bindings for selections
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
# Init starship shell prompt
eval "$(starship init zsh)"
# Bun auto-completion for zsh
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# Add Bun to path
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
if [[ $OSTYPE == "linux-gnu" ]]; then
# Setup keychain with ssh and gpg keys
# GPG key still needs to be entered every time
eval $(keychain --eval --quiet --agents ssh,gpg --noask \
id_ed25519_arch_github_personal 0DC07BB23793C014)
fi
# zsh history is weak by default so we allow more
# entries, save it, and share it accross sessions
HISTFILE=~/.zsh_history
HISTSIZE=99999
SAVEHIST=$HISTSIZE
setopt HIST_IGNORE_ALL_DUPS
setopt SHARE_HISTORY
# Enable dark theming
export GTK_THEME="Adwaita:dark"
export GTK2_RC_FILES="/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc"
export QT_STYLE_OVERRIDE="Adwaita-Dark"