-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdot_zshrc.tmpl
82 lines (72 loc) · 2.7 KB
/
dot_zshrc.tmpl
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
# Commenting out the Distro's default prompt
USE_POWERLINE="false"
# Source {{ .chezmoi.osRelease.id }}-zsh-configuration
if [[ -e /usr/share/zsh/{{ .chezmoi.osRelease.id }}-zsh-config ]]; then
source /usr/share/zsh/{{ .chezmoi.osRelease.id }}-zsh-config
fi
# Use {{ .chezmoi.osRelease.id }} zsh prompt
#if [[ -e /usr/share/zsh/{{ .chezmoi.osRelease.id }}-zsh-prompt ]]; then
# source /usr/share/zsh/{{ .chezmoi.osRelease.id }}-zsh-prompt
#fi
export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"
bindkey '^r' _atuin_search_widget
alias monhd="sudo ddcutil -d 1 setvcp 60 0x12"
alias mondp="sudo ddcutil -d 1 setvcp 60 0x0F"
alias cz='chezmoi'
alias dk='docker'
#alias docker='podman' # remove this is you don't want to obfuscate docker with podman
alias dx='distrobox'
alias ls='eza --icons --git'
alias zl='zellij'
alias code="flatpak run com.visualstudio.code"
#alias code="flatpak run com.vscodium.codium"
alias sgpt="docker run --rm --env OPENAI_API_KEY --env DEFAULT_MODEL --volume gpt-cache:/tmp/shell_gpt ghcr.io/ther1d/shell_gpt"
alias sgpt="docker run --rm --env OPENAI_API_KEY --env DEFAULT_MODEL --volume gpt-cache:/tmp/shell_gpt ghcr.io/ther1d/shell_gpt"
export PATH=$PATH:$HOME/.npm-global/bin:$HOME/.local/bin:$(go env GOBIN):$(go env GOPATH)/bin:$HOME/.cargo/bin
export OPENAI_API_KEY="{{ .openai.secretKey }}";
export DEFAULT_MODEL="gpt-4-turbo";
export EDITOR="lvim";
#export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
#export JAVA_HOME='/usr/lib/jvm/java-11-openjdk'
#export ANDROID_SDK_ROOT='{{ .chezmoi.homeDir }}/Android/Sdk'
#if [ -d $ANDROID_SDK_ROOT ]; then
# export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools/;
# export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin/;
# export PATH=$PATH:$ANDROID_ROOT/emulator;
# export PATH=$PATH:$ANDROID_SDK_ROOT/tools/;
# export PATH=$PATH:/opt/flutter/bin;
#fi
if [ -d /opt/microsoft/msedge ]; then
export CHROME_EXECUTABLE=/opt/microsoft/msedge/msedge;
else
export CHROME_EXECUTABLE=/usr/sbin/chromium;
fi
export CARGO_TARGET_DIR=/tmp/cargo
mkdir -p /tmp/cargo
# for scripts you don't want to keep synchronized
if test -n "$(find $HOME/.config/zsh/ -maxdepth 1 -type f -name '*.zsh' -print -quit 2>/dev/null)"; then
for script in $HOME/.config/zsh/*.zsh; do
source "$script"
done
fi
if [ -f /usr/bin/neofetch ]; then
neofetch
fi
eval "$(starship init zsh)"
eval "$(~/.cargo/bin/mise activate zsh)
if [ -z "$TMUX" ]; then
if [[ $(tmux list-sessions) ]]; then
echo "Existing detected, attach? (y/n)"
read choice
if [[ "$choice" =~ ^(yes|y|Y)$ ]]; then
tmux attach-session -t 0
elif [[ "$choice" =~ ^(console|c|C)$ ]]; then
# do nothing
else
tmux new-session
fi
else
tmux new-session
fi
fi