diff options
Diffstat (limited to '')
| -rw-r--r-- | shell/bash/.bash_profile | 6 | ||||
| -rw-r--r-- | shell/bash/.bashrc | 100 | ||||
| m--------- | shell/zsh/.zsh/zsh-autosuggestions | 0 | ||||
| m--------- | shell/zsh/.zsh/zsh-syntax-highlighting | 0 | ||||
| -rw-r--r-- | shell/zsh/.zshenv | 1 | ||||
| -rw-r--r-- | shell/zsh/.zshrc | 106 |
6 files changed, 213 insertions, 0 deletions
diff --git a/shell/bash/.bash_profile b/shell/bash/.bash_profile new file mode 100644 index 0000000..aeac56a --- /dev/null +++ b/shell/bash/.bash_profile | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | # | ||
| 2 | # ~/.bash_profile | ||
| 3 | # | ||
| 4 | |||
| 5 | [[ -f ~/.bashrc ]] && . ~/.bashrc | ||
| 6 | . "$HOME/.cargo/env" | ||
diff --git a/shell/bash/.bashrc b/shell/bash/.bashrc new file mode 100644 index 0000000..289d237 --- /dev/null +++ b/shell/bash/.bashrc | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | |||
| 2 | parse_git_branch() { | ||
| 3 | local branch="" | ||
| 4 | branch=$(git branch 2> /dev/null | sed -n '/^[^*]/d;s/* \(.*\)/\1/p') | ||
| 5 | local git_status=$(git status --porcelain 2>/dev/null) | ||
| 6 | |||
| 7 | if [ -n "$branch" ]; then | ||
| 8 | branch="(${branch}) " | ||
| 9 | fi | ||
| 10 | |||
| 11 | echo "$branch" | ||
| 12 | } | ||
| 13 | |||
| 14 | update_prompt() { | ||
| 15 | PS1="\[\e[31m\][\[\e[33m\]\u\[\e[32m\]@\[\e[34m\]\h \[\e[35m\]\w\[\e[31m\]]\[\e[35m\] \[\e[33m\]\$(parse_git_branch)\[\e[34m\]# \[\e[0m\]" | ||
| 16 | } | ||
| 17 | |||
| 18 | PROMPT_COMMAND="update_prompt" | ||
| 19 | |||
| 20 | |||
| 21 | eval "$(zoxide init bash)" | ||
| 22 | |||
| 23 | export XDG_DATA_HOME="$HOME"/.local/share | ||
| 24 | export XDG_CONFIG_HOME="$HOME"/.config | ||
| 25 | export XDG_STATE_HOME="$HOME"/.local/state | ||
| 26 | export XDG_CACHE_HOME="$HOME"/.cache | ||
| 27 | #export PATH=$PATH:$(xdg-user-dir USER)/.local/bin | ||
| 28 | export XDG_CURRENT_DESKTOP=dwm | ||
| 29 | export XDG_SESSION_DESKTOP=dwm | ||
| 30 | export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv | ||
| 31 | export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc | ||
| 32 | export LESSHISTFILE="$XDG_CACHE_HOME"/less/history | ||
| 33 | export EDITOR=nvim | ||
| 34 | export BUILDDIR=/tmp/makepkg | ||
| 35 | export RAVEDUDE_PORT=/dev/ttyACM0 | ||
| 36 | export BUN_INSTALL="$HOME/.bun" | ||
| 37 | export PATH="$BUN_INSTALL/bin:$PATH" | ||
| 38 | export PATH="$HOME/.cargo/bin:$PATH" | ||
| 39 | export ANDROID_HOME=$HOME/Android/sdk | ||
| 40 | export PATH=$PATH:$ANDROID_HOME/emulator | ||
| 41 | export PATH=$PATH:$ANDROID_HOME/platform-tools | ||
| 42 | export AWT_TOOLKIT=MToolkit | ||
| 43 | export JAVA_HOME=/usr/lib/jvm/java-21-openjdk | ||
| 44 | export GEM="/home/fw/.local/share/gem/ruby/3.0.0/bin" | ||
| 45 | |||
| 46 | alias acl="arduino-cli" | ||
| 47 | alias acl="arduino-cli compile" | ||
| 48 | alias aclbl="arduino-cli board list" | ||
| 49 | |||
| 50 | alias ls="eza -l --icons --color=always" | ||
| 51 | alias l="eza -l --icons --color=always" | ||
| 52 | alias ls="eza -l --icons --color=always" | ||
| 53 | alias la="eza -la --icons --color=always" | ||
| 54 | alias ll="eza -l --color=always --group-directories-first" | ||
| 55 | alias lt="eza -T --color=always --group-directories-first" | ||
| 56 | alias v="nvim" | ||
| 57 | alias c="clear" | ||
| 58 | alias e="exit" | ||
| 59 | alias j="joshuto" | ||
| 60 | alias g="grep" | ||
| 61 | alias g="rg" | ||
| 62 | alias zl="zellij" | ||
| 63 | alias h="htop" | ||
| 64 | alias n="neofetch" | ||
| 65 | alias poweroff="doas /usr/bin/poweroff" | ||
| 66 | alias reboot="doas /usr/bin/reboot" | ||
| 67 | |||
| 68 | alias latexmk="latex-mk" | ||
| 69 | |||
| 70 | alias orphans="doas pacman -Rcns $(pacman -Qqdt)" | ||
| 71 | |||
| 72 | alias pf="prettier --write ." | ||
| 73 | |||
| 74 | |||
| 75 | alias gts="git status" | ||
| 76 | alias gta="git add ." | ||
| 77 | alias gtc="git commit -m" | ||
| 78 | alias gpo="git push origin" | ||
| 79 | alias pull="git pull origin" | ||
| 80 | alias glg="git log" | ||
| 81 | |||
| 82 | [ -s "/home/fw/.bun/_bun" ] && source "/home/fw/.bun/_bun" | ||
| 83 | |||
| 84 | if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then | ||
| 85 | exec startx &> /dev/null | ||
| 86 | # exec dbus-run-session run_something &> /dev/null | ||
| 87 | fi | ||
| 88 | |||
| 89 | case ":$PATH:" in | ||
| 90 | *":$GEM:"*) ;; | ||
| 91 | *) export PATH="$GEM:$PATH" ;; | ||
| 92 | esac | ||
| 93 | |||
| 94 | |||
| 95 | # If not running interactively, don't do anything | ||
| 96 | [[ $- != *i* ]] && return | ||
| 97 | |||
| 98 | . "$HOME/.cargo/env" | ||
| 99 | # export PATH=$PATH:$(xdg-user-dir USER)/.local/bin | ||
| 100 | # export PATH=$PATH:$(xdg-user-dir USER)/.local/bin | ||
diff --git a/shell/zsh/.zsh/zsh-autosuggestions b/shell/zsh/.zsh/zsh-autosuggestions new file mode 160000 | |||
| Subproject c3d4e576c9c86eac62884bd47c01f6faed043fc | |||
diff --git a/shell/zsh/.zsh/zsh-syntax-highlighting b/shell/zsh/.zsh/zsh-syntax-highlighting new file mode 160000 | |||
| Subproject e0165eaa730dd0fa321a6a6de74f092fe87630b | |||
diff --git a/shell/zsh/.zshenv b/shell/zsh/.zshenv new file mode 100644 index 0000000..c2f3182 --- /dev/null +++ b/shell/zsh/.zshenv | |||
| @@ -0,0 +1 @@ | |||
| . "$HOME/.cargo/env" | |||
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 | ||
