135 lines
3.1 KiB
Bash
135 lines
3.1 KiB
Bash
#############
|
|
# Autostart #
|
|
#############
|
|
|
|
# Test for an interactive shell. There is no need to set anything
|
|
# past this point for scp and rcp, and it's important to refrain from
|
|
# outputting anything in those cases.
|
|
if [[ $- != *i* ]] ; then
|
|
# Shell is non-interactive. Be done now!
|
|
return
|
|
fi
|
|
|
|
##########
|
|
# Prompt #
|
|
##########
|
|
if [[ $(tty) != "/dev/tty"* ]]; then
|
|
eval "$(starship init zsh)"
|
|
else
|
|
autoload -U colors && colors
|
|
|
|
# No Directory Shortening
|
|
#PS1="%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[red]%}%m %{$fg[magenta]%}%~ %{$reset_color%}%% "
|
|
|
|
# Directory Shortening
|
|
PS1="%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[red]%}%m %{$fg[magenta]%}%(5~|%-1~/.../%3~|%4~) %{$reset_color%}%% "
|
|
fi
|
|
|
|
###########
|
|
# Aliases #
|
|
###########
|
|
alias doas="doas "
|
|
alias bat="bat --plain --paging never --theme='Catppuccin-macchiato'"
|
|
alias eza="eza --long --icons --git --no-permissions"
|
|
alias neofetch="clear && neofetch"
|
|
alias audio-dlp="yt-dlp -f \"bestaudio\" --extract-audio --audio-format vorbis"
|
|
alias hfnn="fc -ln 0"
|
|
alias cmd="command"
|
|
alias c="cd"
|
|
alias e="eza"
|
|
alias b="bat"
|
|
alias n="nvim"
|
|
alias d="pwd"
|
|
alias k="rm"
|
|
alias y="cp"
|
|
alias no="nano"
|
|
alias v="vi"
|
|
alias vm="vim"
|
|
alias src="source"
|
|
alias gr="grep"
|
|
alias g="git"
|
|
alias p="pkg"
|
|
alias pa="pkg_add"
|
|
alias pi="pkg_info"
|
|
alias cm="chmod"
|
|
alias cr="chroot"
|
|
alias da="doas"
|
|
alias s="su"
|
|
alias sd="sudo"
|
|
alias mk="make"
|
|
alias mkd="mkdir"
|
|
alias x="mv"
|
|
alias m="mg"
|
|
alias em="emacs"
|
|
alias tn="ping suckless.org"
|
|
alias mnt="mount"
|
|
alias u="dd"
|
|
alias wai="whoami"
|
|
alias h="echo"
|
|
alias a="awk"
|
|
alias llama2="~/LLaMa2/llama.cpp/main -m ~/LLaMa2/llama.cpp/models/llama-2-13b-chat.Q6_K.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -i -ins"
|
|
|
|
###########################
|
|
# Environmental Variables #
|
|
###########################
|
|
|
|
# Man
|
|
export MANPAGER='nvim +Man!'
|
|
|
|
# Bat
|
|
BAT_PAGER=""
|
|
|
|
export TERM=xterm
|
|
|
|
###########
|
|
# Plugins #
|
|
###########
|
|
|
|
# Syntax Highlighting
|
|
source "/home/vehementham/.config/zsh/Plugins/F-Sy-H/F-Sy-H.plugin.zsh"
|
|
|
|
# Auto Suggestions
|
|
source "/home/vehementham/.config/zsh/Plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
|
|
|
# Hisory Substring Search
|
|
source "/home/vehementham/.config/zsh/Plugins/zsh-history-substring-search/zsh-history-substring-search.zsh"
|
|
|
|
###########
|
|
# Options #
|
|
###########
|
|
HISTFILE=~/.histfile
|
|
HISTSIZE=1000
|
|
SAVEHIST=1000
|
|
setopt appendhistory
|
|
|
|
###############
|
|
# Keybindings #
|
|
###############
|
|
|
|
# Bind Alt + Delete for forward deleting a word
|
|
bindkey -M emacs '^[[3;3~' kill-word
|
|
|
|
# Bind Delete to delete a letter to the right
|
|
bindkey "^[[3~" delete-char
|
|
|
|
# Ctrl binds
|
|
# Bind Ctrl + Delete to delete word to the right
|
|
bindkey '^[[3;5~' kill-word
|
|
|
|
# Bind Ctrl + Backspace to delete word to the left
|
|
bindkey '^H' backward-kill-word
|
|
|
|
# Bind Ctrl + Right Arrow to move to the next word
|
|
bindkey '^[[1;5C' forward-word
|
|
|
|
# Bind Ctrl + Left Arrow to move to the previous word
|
|
bindkey '^[[1;5D' backward-word
|
|
|
|
# Hisory Substring Search Options
|
|
bindkey '^[[A' history-substring-search-up
|
|
bindkey '^[[B' history-substring-search-down
|
|
|
|
if [ -e /home/vehementham/.nix-profile/etc/profile.d/nix.sh ]; then . /home/vehementham/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
|
|
|
|
|