Add basic zsh configuration

Added basic zsh configuration
This commit is contained in:
c47 2024-02-18 00:27:46 +01:00
parent b52a84b68b
commit 6e68096cde
Signed by: c47
SSH key fingerprint: SHA256:FIo5G1VJnESaIB/8N5lcc2IDuZ02Sl2Qyye15i4w7jQ
4 changed files with 68 additions and 0 deletions

View file

@ -51,3 +51,16 @@ fi
if [[ ! -L ${HOME}/.xsessionrc ]]; then
ln -s ${WORKING_DIR}/xsessionrc .xsessionrc 2>/dev/null
fi
# Zsh
if [[ ! -d ${HOME}/.zsh ]]; then
mkdir ~/.zsh 2>/dev/null
fi
if [[ ! -L ${HOME}/.zshenv ]]; then
ln -s ${WORKING_DIR}/zshenv .zshenv 2>/dev/null
fi
if [[ ! -L ${HOME}/.zshrc ]]; then
ln -s ${WORKING_DIR}/zshrc .zshrc 2>/dev/null
fi

28
zsh/zaliases Normal file
View file

@ -0,0 +1,28 @@
alias vim='nvim'
alias :e='vim'
alias :q='exit'
alias T='tmux a'
if [[ -f ${HOME}/.zaliases.local ]]; then
source ${HOME}/.zaliases.local
fi
alias R='rem -b1 -mclc+6'
alias RR='rem -b1 -mclc+6 -iprivate=1'
alias r='rem -b1 -mclc+4'
alias rr='rem -b1 -mclc+4 -iprivate=1'
alias rrm='rem -b1 -imoon=1'
alias cal='ncal -bM'
alias pipu='pip install --user --break-system-packages'
alias SR='sudo shutdown -r now'
alias SH='sudo shutdown -h now'
alias ncmpcpp='if [[ `pidof mpd` ]]; then ncmpcpp; else mpd && ncmpcpp; fi'
alias RP='bash .local/scripts/random-password.sh'
#alias ls='ls -F --color=auto'
alias l='ls'
alias ll='ls -l'
alias llh='ls -lh'
alias la='ls -a'
alias lah='ls -lah'

4
zsh/zshenv Normal file
View file

@ -0,0 +1,4 @@
export ZDOTDIR=${HOME}/.zsh
if [[ -f ${ZDOTDIR}/.zshrc ]]; then
source ${ZDOTDIR}/.zshrc
fi

23
zsh/zshrc Normal file
View file

@ -0,0 +1,23 @@
# Lines configured by zsh-newuser-install
HISTFILE=~/.zsh/.zhistory
HISTSIZE=100
SAVEHIST=100
setopt autocd extendedglob nomatch notify
unsetopt beep
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/c47/.zsh/.zshrc'
autoload -Uz compinit promptinit
compinit
# End of lines added by compinstall
promptinit
umask 0077
prompt elite2 magenta yellow
bindkey '\e.' insert-last-word
if [[ -f ${ZDOTDIR}/.zaliases ]]; then
source ${ZDOTDIR}/.zaliases
fi