diff options
| author | philw <dscr@duck.com> | 2024-02-10 20:00:48 +0100 |
|---|---|---|
| committer | philw <dscr@duck.com> | 2024-02-10 20:00:48 +0100 |
| commit | 51573d35e989d45f047b0b34fd9293be459d346b (patch) | |
| tree | a59277e4b8c841a196de792e507d635a3db14ba2 /shell/zsh/.zshrc | |
| download | dotfiles-51573d35e989d45f047b0b34fd9293be459d346b.tar.gz dotfiles-51573d35e989d45f047b0b34fd9293be459d346b.zip | |
Update dots
Diffstat (limited to 'shell/zsh/.zshrc')
| -rw-r--r-- | shell/zsh/.zshrc | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/shell/zsh/.zshrc b/shell/zsh/.zshrc new file mode 100644 index 0000000..11170c6 --- /dev/null +++ b/shell/zsh/.zshrc | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | parse_git_branch() { | ||
| 2 | local branch="" | ||
| 3 | branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | ||
| 4 | local git_status=$(git status --porcelain 2>/dev/null) | ||
| 5 | local color=red | ||
| 6 | if [[ -n "$branch" ]]; then | ||
| 7 | branch=" (${branch})" | ||
| 8 | fi | ||
| 9 | echo "$branch " | ||
| 10 | } | ||
| 11 | update_prompt() { | ||
| 12 | PS1="%F{red}[%F{yellow}%n%F{green}@%F{blue}%m %F{magenta}%c%f%F{red}]%F{magenta}%F{yellow}$(parse_git_branch)%F{blue}# %F{reset}" | ||
| 13 | } | ||
| 14 | precmd_functions+=(update_prompt) | ||
| 15 | update_prompt | ||
| 16 | |||
| 17 | HISTFILE="$XDG_CACHE_HOME"/zsh-histfile | ||
| 18 | HISTSIZE=2500 | ||
| 19 | SAVEHIST=2000 | ||
| 20 | setopt INC_APPEND_HISTORY | ||
| 21 | setopt HIST_EXPIRE_DUPS_FIRST | ||
| 22 | setopt HIST_FIND_NO_DUPS | ||
| 23 | unsetopt beep | ||
| 24 | bindkey -e | ||
| 25 | zstyle :compinstall filename "/home/$USER/.zshrc" | ||
| 26 | autoload -Uz compinit | ||
| 27 | compinit | ||
| 28 | setopt autocd | ||
| 29 | eval "$(zoxide init zsh)" | ||
| 30 | |||
| 31 | export XDG_DATA_HOME="$HOME"/.local/share | ||
| 32 | export XDG_CONFIG_HOME="$HOME"/.config | ||
| 33 | export XDG_STATE_HOME="$HOME"/.local/state | ||
| 34 | export XDG_CACHE_HOME="$HOME"/.cache | ||
| 35 | #export PATH=$PATH:$(xdg-user-dir USER)/.local/bin | ||
| 36 | export XDG_CURRENT_DESKTOP=dwm | ||
| 37 | export XDG_SESSION_DESKTOP=dwm | ||
| 38 | export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv | ||
| 39 | export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc | ||
| 40 | export LESSHISTFILE="$XDG_CACHE_HOME"/less/history | ||
| 41 | export EDITOR=nvim | ||
| 42 | export BUILDDIR=/tmp/makepkg | ||
| 43 | export RAVEDUDE_PORT=/dev/ttyACM0 | ||
| 44 | export BUN_INSTALL="$HOME/.bun" | ||
| 45 | export PATH="$BUN_INSTALL/bin:$PATH" | ||
| 46 | export PATH="$HOME/.cargo/bin:$PATH" | ||
| 47 | export ANDROID_HOME=$HOME/Android/sdk | ||
| 48 | export PATH=$PATH:$ANDROID_HOME/emulator | ||
| 49 | export PATH=$PATH:$ANDROID_HOME/platform-tools | ||
| 50 | export AWT_TOOLKIT=MToolkit | ||
| 51 | export JAVA_HOME=/usr/lib/jvm/java-21-openjdk | ||
| 52 | export GEM="/home/fw/.local/share/gem/ruby/3.0.0/bin" | ||
| 53 | . "${HOME}/.cache/wal/colors.sh" | ||
| 54 | |||
| 55 | alias dmenu='dmenu_run -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15"' | ||
| 56 | |||
| 57 | alias acl='arduino-cli' | ||
| 58 | alias acl='arduino-cli compile' | ||
| 59 | alias aclbl='arduino-cli board list' | ||
| 60 | |||
| 61 | alias ls='eza -l --icons --color=always' | ||
| 62 | alias l='eza -l --icons --color=always' | ||
| 63 | alias ls='eza -l --icons --color=always' | ||
| 64 | alias la='eza -la --icons --color=always' | ||
| 65 | alias ll='eza -l --color=always --group-directories-first' | ||
| 66 | alias lt='eza -T --color=always --group-directories-first' | ||
| 67 | alias v="nvim" | ||
| 68 | alias c="clear" | ||
| 69 | alias e="exit" | ||
| 70 | alias j="joshuto" | ||
| 71 | alias g="grep" | ||
| 72 | alias g="rg" | ||
| 73 | alias zl="zellij" | ||
| 74 | alias h="htop" | ||
| 75 | alias n="neofetch" | ||
| 76 | alias poweroff="doas /usr/bin/poweroff" | ||
| 77 | alias reboot="doas /usr/bin/reboot" | ||
| 78 | |||
| 79 | alias latexmk="latex-mk" | ||
| 80 | |||
| 81 | alias orphans='doas pacman -Rcns $(pacman -Qqdt)' | ||
| 82 | |||
| 83 | alias pf="prettier --write ." | ||
| 84 | |||
| 85 | |||
| 86 | alias gts="git status" | ||
| 87 | alias gta="git add ." | ||
| 88 | alias gtc="git commit -m" | ||
| 89 | alias gpo="git push origin" | ||
| 90 | alias pull="git pull origin" | ||
| 91 | alias glg="git log" | ||
| 92 | |||
| 93 | [ -s "/home/fw/.bun/_bun" ] && source "/home/fw/.bun/_bun" | ||
| 94 | |||
| 95 | if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then | ||
| 96 | exec startx &> /dev/null | ||
| 97 | # exec dbus-run-session run_something &> /dev/null | ||
| 98 | fi | ||
| 99 | |||
| 100 | case ":$PATH:" in | ||
| 101 | *":$GEM:"*) ;; | ||
| 102 | *) export PATH="$GEM:$PATH" ;; | ||
| 103 | esac | ||
| 104 | |||
| 105 | source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh | ||
| 106 | source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | ||
