dotfiles/.zshrc
2025-06-29 04:09:46 +03:30

56 lines
1.7 KiB
Bash

#!/bin/zsh
#history settings
HISTFILE=$HOME/.cache/zsh/history
SAVEHIST=100000000
HISTSIZE=$SAVEHIST
setopt appendhistory
#completion
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
comp_options+=(globdots)
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
source /usr/share/zsh/site-functions/zsh-autosuggestions.zsh && fpath=(/usr/share/zsh/site-functions $fpath) && source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
#colors & prompt
autoload -U colors && colors && setopt prompt_subst
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=5"
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=12"
PROMPT="%F{25}[%f%F{25}!%f%F{25}%n%f%F{25}@%f%F{25}%m%f %F{28}%~%f%F{25}]%f%B%F{7}%% %b"
#aliases
alias nf="clear && fastfetch"
alias ascdis="fastfetch --logo $1"
alias emoji="cat ~/.local/share/emoji | grep $1"
alias cst="emacs ~/.config/st/config.h"
alias ls="ls --color=auto"
alias lasal="ls -al"
alias ahl="ls -ahl"
alias resmacs="systemctl --user restart emacsd"
alias smi="doas nvidia-smi"
alias srczsh="source ~/.zshrc"
alias battery="sb-battery"
alias quit="exit"
alias :q="exit"
alias :q!="exit"
alias q="exit"
alias "push"="git push"
alias weather="curl wttr.in/masjedsoleyman"
alias las="ls"
alias lasa="ls -a"
alias c="clear"
alias cear="clear"
alias "cd.."="cd .."
alias claer="clear"
alias claer="clear"
alias clare="clear"
alias cleae="clear"
alias clera="clear"
alias hotp="htop"
#paths and environment
fpath=(~/.zsh/completions $fpath)
export PATH=$HOME/.local/bin:$PATH
export EDITOR="emacs"
export PATH=/usr/pkg/sbin:/usr/pkg/bin:$PATH
export MANPATH=/usr/pkg/man:$MANPATH
export XDG_DATA_DIRS="/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share:/usr/local/share:/usr/share"
export PATH=$PATH:/home/coast/.spicetify