dotfiles/.zshrc

78 lines
2.4 KiB
Bash
Raw Normal View History

2025-06-14 19:50:32 +03:30
#!/bin/zsh
#history settings
2025-05-29 22:33:42 +02:00
HISTFILE=$HOME/.cache/zsh/history
SAVEHIST=100000000
HISTSIZE=$SAVEHIST
setopt appendhistory
2025-06-14 19:50:32 +03:30
#completion
2025-05-29 22:33:42 +02:00
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
2025-06-04 04:38:36 +03:30
comp_options+=(globdots)
2025-06-10 14:26:39 +03:30
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh && fpath=(/usr/share/zsh/stie-functions $fpath) && source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
2025-06-14 19:50:32 +03:30
#colors & prompt
2025-06-04 04:38:36 +03:30
autoload -U colors && colors && setopt prompt_subst
2025-06-04 07:57:39 +03:30
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=5"
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=12"
2025-06-10 14:26:39 +03:30
[ "$(id -u)" = 0 ] && PS1ICON="#" || PS1ICON='%'
2025-06-14 16:41:27 +03:30
PROMPT='%{$(echo -e "\e[38;2;120;160;200m")%}[%{$(echo -e "\e[38;2;197;198;200m")%}%n%{$(echo -e "\e[38;2;120;160;200m")%}@core %{$(echo -e "\e[38;2;197;198;200m")%}%~%{$(echo -e "\e[38;2;120;160;200m")%}]%$PS1ICON%{$(echo -e "\e[0m")%} '
2025-06-14 19:50:32 +03:30
#aliases
2025-06-09 02:00:48 +03:30
alias xi="doas xbps-install -S $1"
alias nf="clear && fastfetch"
alias ascdis="fastfetch --logo $1"
alias forge="su forgejo"
alias emoji="cat ~/.local/share/emoji | grep $1"
alias cst="swallow emacsd ~/.config/st/config.h"
2025-06-14 19:50:32 +03:30
alias ls="ls --color=auto"
alias lasal="ls -al"
alias ahl="ls -ahl"
2025-06-09 02:00:48 +03:30
alias resmacs="systemctl --user restart emacsd"
alias smi="nvidia-smi"
alias src="source ~/.zshrc"
alias bat="sb-battery"
alias battery="sb-battery"
alias vimrc="vim .vimrc"
alias ri="ranger"
alias rim="ranger"
alias quit="exit"
alias :q="exit"
alias :q!="exit"
alias :Q="exit"
alias :Q!="exit"
alias :quit="exit"
alias :quit!="exit"
alias :QUIT="exit"
alias :QUIT!="exit"
alias q="exit"
alias fnl="fennel"
2025-06-14 19:50:32 +03:30
alias "push"="git push"
2025-06-09 02:00:48 +03:30
alias irc="irssi"
alias hsw="home-manager switch --flake ~/.config/home-manager"
alias hsc="swallow emacsd ~/.config/home-manager/home.nix"
alias yell="echo"
alias chm="ecop cat ~/.config/home-manager/home.nix"
alias weather="curl wttr.in/masjedsoleyman"
alias emacs="swallow emacsd $1"
alias emacsd="swallow emacsd $1"
2025-06-14 19:50:32 +03:30
alias las="ls"
alias lasa="ls -a"
2025-06-09 02:00:48 +03:30
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"
2025-06-14 19:50:32 +03:30
#paths and environment
2025-06-05 09:30:06 +03:30
fpath=(~/.zsh/completions $fpath)
2025-06-09 02:00:48 +03:30
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/.luarocks/bin:$PATH
export NIXPKGS_ALLOW_UNFREE=1
export EDITOR="emacs"
export PATH=/usr/pkg/sbin:/usr/pkg/bin:$PATH
export MANPATH=/usr/pkg/man:$MANPATH