dotfiles/zsh/Daybreak/.zshrc

133 lines
2.9 KiB
Bash

# Prompt #
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%}%% "
# Starship Prompt #
#eval "$(starship init zsh)" # Starship not installed
# # Output Logging #
# before_each() {
# [ -e ~/.Output ] && unlink ~/.Output
# touch ~/.Output
# exec 3>&1
# exec 1> >(tee ~/.Output) 2>&1
# }
# # Cleaning up
# after_each() {
# exec 1>&3
# exec 3>&-
# }
# precmd() {
# after_each
# }
#
# preexec() {
# before_each
# }
# Aliases #
alias doas="doas "
alias bat="bat --plain --paging never --theme=Daybreak"
alias exa="exa --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="exa"
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"
# Environmental Variables #
# Man
export MANPAGER='nvim +Man!'
# Bat
BAT_PAGER=""
export TERM=xterm
# PATH
PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:$HOME/.cargo/bin:$HOME/.cabal/bin/:/usr/local/jdk-17/bin/
# Plugins
# Syntax Highlighting
source '/home/vehementham/ZSH Plugins/F-Sy-H/F-Sy-H.plugin.zsh'
# Auto Suggestions
source "/home/vehementham/ZSH Plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
# Hisory Substring Search
source "/home/vehementham/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