zshrc
This commit is contained in:
parent
1387bdc89f
commit
47552f881d
1 changed files with 12 additions and 26 deletions
38
.zshrc
38
.zshrc
|
@ -1,12 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/zsh
|
||||||
|
#history settings
|
||||||
# History settings
|
|
||||||
HISTFILE=$HOME/.cache/zsh/history
|
HISTFILE=$HOME/.cache/zsh/history
|
||||||
SAVEHIST=100000000
|
SAVEHIST=100000000
|
||||||
HISTSIZE=$SAVEHIST
|
HISTSIZE=$SAVEHIST
|
||||||
setopt appendhistory
|
setopt appendhistory
|
||||||
|
#completion
|
||||||
# Completion
|
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
zmodload zsh/complist
|
zmodload zsh/complist
|
||||||
|
@ -14,25 +12,22 @@ compinit
|
||||||
comp_options+=(globdots)
|
comp_options+=(globdots)
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
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
|
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
|
||||||
|
#colors & prompt
|
||||||
# Colors and prompt
|
|
||||||
autoload -U colors && colors && setopt prompt_subst
|
autoload -U colors && colors && setopt prompt_subst
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=5"
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=5"
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=12"
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=12"
|
||||||
|
|
||||||
[ "$(id -u)" = 0 ] && PS1ICON="#" || PS1ICON='%'
|
[ "$(id -u)" = 0 ] && PS1ICON="#" || PS1ICON='%'
|
||||||
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")%} '
|
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")%} '
|
||||||
|
#aliases
|
||||||
# Aliases
|
|
||||||
alias xi="doas xbps-install -S $1"
|
alias xi="doas xbps-install -S $1"
|
||||||
alias nf="clear && fastfetch"
|
alias nf="clear && fastfetch"
|
||||||
alias ascdis="fastfetch --logo $1"
|
alias ascdis="fastfetch --logo $1"
|
||||||
alias forge="su forgejo"
|
alias forge="su forgejo"
|
||||||
alias emoji="cat ~/.local/share/emoji | grep $1"
|
alias emoji="cat ~/.local/share/emoji | grep $1"
|
||||||
alias cst="swallow emacsd ~/.config/st/config.h"
|
alias cst="swallow emacsd ~/.config/st/config.h"
|
||||||
alias lasal="eza -al"
|
alias ls="ls --color=auto"
|
||||||
alias ls="eza"
|
alias lasal="ls -al"
|
||||||
alias anal="eza -ahl"
|
alias ahl="ls -ahl"
|
||||||
alias resmacs="systemctl --user restart emacsd"
|
alias resmacs="systemctl --user restart emacsd"
|
||||||
alias smi="nvidia-smi"
|
alias smi="nvidia-smi"
|
||||||
alias src="source ~/.zshrc"
|
alias src="source ~/.zshrc"
|
||||||
|
@ -52,22 +47,17 @@ alias :QUIT="exit"
|
||||||
alias :QUIT!="exit"
|
alias :QUIT!="exit"
|
||||||
alias q="exit"
|
alias q="exit"
|
||||||
alias fnl="fennel"
|
alias fnl="fennel"
|
||||||
alias "push"="git push -u origin main"
|
alias "push"="git push"
|
||||||
alias irc="irssi"
|
alias irc="irssi"
|
||||||
alias hsw="home-manager switch --flake ~/.config/home-manager"
|
alias hsw="home-manager switch --flake ~/.config/home-manager"
|
||||||
alias hsc="swallow emacsd ~/.config/home-manager/home.nix"
|
alias hsc="swallow emacsd ~/.config/home-manager/home.nix"
|
||||||
alias yell="echo"
|
alias yell="echo"
|
||||||
alias chm="ecop cat ~/.config/home-manager/home.nix"
|
alias chm="ecop cat ~/.config/home-manager/home.nix"
|
||||||
if [ -n "$ZSH_VERSION" ]; then
|
|
||||||
alias ed="ed -p '%: '"
|
|
||||||
else
|
|
||||||
alias ed="ed -p '$: '"
|
|
||||||
fi
|
|
||||||
alias weather="curl wttr.in/masjedsoleyman"
|
alias weather="curl wttr.in/masjedsoleyman"
|
||||||
alias emacs="swallow emacsd $1"
|
alias emacs="swallow emacsd $1"
|
||||||
alias emacsd="swallow emacsd $1"
|
alias emacsd="swallow emacsd $1"
|
||||||
alias las="eza"
|
alias las="ls"
|
||||||
alias lasa="eza -a"
|
alias lasa="ls -a"
|
||||||
alias c="clear"
|
alias c="clear"
|
||||||
alias cear="clear"
|
alias cear="clear"
|
||||||
alias "cd.."="cd .."
|
alias "cd.."="cd .."
|
||||||
|
@ -77,14 +67,10 @@ alias clare="clear"
|
||||||
alias cleae="clear"
|
alias cleae="clear"
|
||||||
alias clera="clear"
|
alias clera="clear"
|
||||||
alias hotp="htop"
|
alias hotp="htop"
|
||||||
|
#paths and environment
|
||||||
# Paths and environment
|
|
||||||
fpath=(~/.zsh/completions $fpath)
|
fpath=(~/.zsh/completions $fpath)
|
||||||
export PATH=$HOME/.local/bin:$PATH
|
export PATH=$HOME/.local/bin:$PATH
|
||||||
export PATH=$HOME/.luarocks/bin:$PATH
|
export PATH=$HOME/.luarocks/bin:$PATH
|
||||||
if [ -n "$ZSH_VERSION" ]; then
|
|
||||||
export ZSH="/home/avery/.oh-my-zsh"
|
|
||||||
fi
|
|
||||||
export NIXPKGS_ALLOW_UNFREE=1
|
export NIXPKGS_ALLOW_UNFREE=1
|
||||||
export EDITOR="emacs"
|
export EDITOR="emacs"
|
||||||
export PATH=/usr/pkg/sbin:/usr/pkg/bin:$PATH
|
export PATH=/usr/pkg/sbin:/usr/pkg/bin:$PATH
|
||||||
|
|
Loading…
Add table
Reference in a new issue