]> git.cameronkatri.com Git - dotfiles.git/blob - .zshrc
Major mail changes
[dotfiles.git] / .zshrc
1 # Copyright (c) 2021 Cameron Katri
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
6 # are met:
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.
12 #
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
23 # SUCH DAMAGE.
24 #
25
26 export ZSH="$HOME/.oh-my-zsh"
27 ZSH_THEME="spaceship"
28 DISABLE_LS_COLORS="true"
29 plugins=(git man mosh)
30 source $ZSH/oh-my-zsh.sh
31
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)
33
34 export LANG=en_US.UTF-8
35
36 # Various editors and fix aliases with sudo
37 export EDITOR=nvim
38 export COLORTERM=1 CLICOLOR=1
39 bindkey '^E' edit-command-line
40 alias code='code-oss'
41 alias sudo='sudo '
42 alias icat="kitty +kitten icat"
43 alias fuzz="fzf --preview 'bat --style=numbers,changes --color=always --line-range :500 {}' --preview-window=right:66%"
44 alias sort='LC_ALL=C sort'
45 # https://reviews.freebsd.org/D30545
46 alias diff='LC_ALL=C TZ=UTC diff'
47 alias ls='ls --color=auto -F'
48 alias diffstat='diffstat -C'
49 export BAT_THEME="Nord"
50
51 # Setup LSCOLORS, LS_COLORS and completion
52 # https://reviews.freebsd.org/D30547
53 # https://git.cameronkatri.com/opendircolors
54 test -r ~/.nord_colors && eval $(opendircolors ~/.nord_colors)
55 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
56
57 # Use the correct key with git
58 export GIT_SSH_COMMAND='ssh -i ~/.ssh/git -o IdentitiesOnly=yes'
59
60 # Qt Theme
61 export QT_QPA_PLATFORMTHEME=gtk2
62
63 setopt AUTO_CD
64 cdpath=(. ~/Documents)
65
66 setxkbmap -option compose:rctrl
67
68 export GPG_TTY=$(tty)
69
70 # Completion for kitty
71 #kitty + complete setup zsh | source /dev/stdin
72
73 export LESS='-FiMRx2$z-4$Dd+c$Du+g'
74
75 # https://reviews.freebsd.org/D30341
76 #if ! mount -t fusefs --libxo=json | \
77 #jq -e '.mount.mounted[] | select(.node == "/usr/home/cameron/Documents/smbnetfs")' >/dev/null; then
78 # smbnetfs $HOME/Documents/smbnetfs
79 #fi
80
81 source ~/.crossenv.zsh
82
83 source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
84 source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
85
86 source /usr/local/share/examples/fzf/shell/completion.zsh
87
88 PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source $HOME/.config/tea/autocomplete.zsh
89
90 # I don't regularly check my system mail so give me an alert
91 if mail -e; then
92 echo "You have mail!"
93 fi
94
95 export CVS_RSH=ssh
96
97 alias dotgit='git --git-dir=$HOME/Documents/dotfiles --work-tree=$HOME'