1 # Copyright (c) 2021 Cameron Katri
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
7 # 1. Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 # 2. Redistributions in binary form must reproduce the above copyright
10 # notice, this list of conditions and the following disclaimer in the
11 # documentation and/or other materials provided with the distribution.
13 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 export ZSH="$HOME/.oh-my-zsh"
28 DISABLE_LS_COLORS="true"
29 plugins=(git man mosh)
30 source $ZSH/oh-my-zsh.sh
32 SPACESHIP_PROMPT_ORDER=(time user dir host git package node docker venv pyenv exec_time line_sep battery vi_mode jobs exit_code char)
34 export LANG=en_US.UTF-8
36 # Various editors and fix aliases with sudo
38 bindkey '^E' edit-command-line
41 alias icat="kitty +kitten icat"
42 alias fuzz="fzf --preview 'bat --style=numbers,changes --color=always --line-range :500 {}' --preview-window=right:66%"
43 alias sort='LC_ALL=C sort'
44 # https://reviews.freebsd.org/D30545
45 alias diff='LC_ALL=C TZ=UTC diff --color=auto'
46 alias ls='ls --color=auto -F'
48 # Setup LSCOLORS, LS_COLORS and completion
49 # https://reviews.freebsd.org/D30547
50 # https://git.cameronkatri.com/opendircolors
51 test -r ~/.nord_colors && eval $(opendircolors ~/.nord_colors)
52 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
54 # Use the correct key with git
55 export GIT_SSH_COMMAND='ssh -i ~/.ssh/git -o IdentitiesOnly=yes'
58 export QT_QPA_PLATFORMTHEME=gtk2
61 cdpath=(. ~/Documents)
63 setxkbmap -option compose:rctrl
67 export GOPATH=$HOME/Documents/go
69 export PATH="$HOME/.local/bin:/usr/local/libexec/ccache:$PATH"
70 export PATH="$GOPATH/bin:$PATH"
73 # Completion for kitty
74 kitty + complete setup zsh | source /dev/stdin
79 export LESS='-FiMRx2$z-4$Dd+c$Du+g'
80 export LESSOPEN="| source-highlight-esc.sh %s"
82 # https://reviews.freebsd.org/D30341
83 if ! mount -t fusefs --libxo=json | \
84 jq -e '.mount.mounted[] | select(.node == "/usr/home/cameron/Documents/smbnetfs")' >/dev/null; then
85 smbnetfs $HOME/Documents/smbnetfs
90 source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
91 source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
93 source /usr/local/share/examples/fzf/shell/completion.zsh
95 PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source $HOME/.config/tea/autocomplete.zsh
97 # I don't regularly check my system mail so give me an alert
102 alias dotconfig='git --git-dir=$HOME/Documents/dotfiles --work-tree=$HOME'