summaryrefslogtreecommitdiff
path: root/zshrc
blob: 13f7e674d656f45ef3b956fbae81a4800157e71c (plain)
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
export VCPKG_ROOT=/home/aura/code/vcpkg
export VITASDK=/usr/local/vitasdk
export PATH=$VCPKG_ROOT:$PATH
export PATH=$HOME/bin:/usr/local/bin:$HOME/.cargo/bin:$PATH
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools-bin
export PATH=$VITASDK/bin:$PATH

source ~/.keys

fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src

source <(fzf --zsh)
if [[ -f '$HOME/linuxbrew/.linuxbrew/bin/brew' ]]; then
  eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
clear

export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="evan"
HYPHEN_INSENSITIVE="true"

# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled  # disable automatic updates
# zstyle ':omz:update' mode auto      # update automatically without asking
# zstyle ':omz:update' mode reminder  # just remind me to update when it's time
plugins=(
  git
  zsh-syntax-highlighting
  zsh-autosuggestions
)

source $ZSH/oh-my-zsh.sh

export TERMINAL=urxvt

git_prompt() {
  if git rev-parse --git-dir > /dev/null 2>&1; then
    local branch=$(git symbolic-ref --short HEAD 2>/dev/null)

    if [ -z "$branch" ]; then
      branch=$(git rev-parse --short HEAD 2>/dev/null)
      if [[ ! -z "$branch" ]]; then
        echo "@${branch} (detached)"
      fi
    else
      if [[ "$branch" == "main" ]]; then
        echo ''
      else
        echo "%F{#FFFFFF}@%b%F{#505050}${branch}%F{#FFFFFF}"
      fi
    fi
  fi
}

setopt PROMPT_SUBST

export PS1=$'%m :: %2~$(git_prompt) %B»%b '
# User configuration

autoload -Uz compinit && compinit
alias vim=nvim
alias vi=nvim
alias mpa="mpv --no-video"

alias l='ls'
alias ll='ls -lahG'
alias lg='lazygit'

alias musik='musikcube'

export ANDROID_HOME=/media/data/android-projects

export MANPATH="/usr/local/man:$MANPATH"

export EDITOR='nvim'
export ARCHFLAGS="-arch x86_64"

OLLAMA_HOME="/media/dev/ollama"
OLLAMA_MODELS="/media/dev/ollama/models"
export OLLAMA_HOME
export OLLAMA_MODELS


if [[ -f '$HOME/code/emsdk/emsdk_env.sh' ]]; then
  EMSDK_QUIET=1 source $HOME/code/emsdk/emsdk_env.sh
fi

alias pkg='sudo slpkg --repository="*"'
alias sbopkg='sudo slpkg --repository="sbo"'
alias slpkg="sudo slpkg"
alias fz="rg --color=always --files  ./ |
  fzf --ansi \
      --color 'hl:-1:underline,hl+:-1:underline:reverse' \
      --delimiter : \
      --preview 'bat --theme=ansi --color=always {1} --line-range=:500' \
      --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
      --bind \"enter:become( ~/.cd {1} )\""

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/aurelia/google-cloud-sdk/path.zsh.inc' ]; then . '/home/aurelia/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/aurelia/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/aurelia/google-cloud-sdk/completion.zsh.inc'; fi

zstyle ':completion:*' menu select
fpath+=~/.zfunc

source ~/.lscolors
source ~/.profile

if [[ $TTY =~ '/dev/tty'* ]]; then
else
  if [[ -f ~/.todo ]]; then
    ~/.todo
  fi
fi