68 lines
1.5 KiB
Bash
68 lines
1.5 KiB
Bash
#!/bin/bash
|
|
#
|
|
# SCRIPT NAME:
|
|
# .zshrc
|
|
#
|
|
# AUTHOR:
|
|
# Severin Kaderli <severin@kaderli.dev>
|
|
#
|
|
# DESCRIPTION:
|
|
# This script is called when you start a new shell.
|
|
#
|
|
# USAGE:
|
|
# This script is automatically executed when you start a new shell.
|
|
|
|
# Zsh options
|
|
setopt prompt_subst
|
|
setopt HIST_IGNORE_DUPS
|
|
setopt INC_APPEND_HISTORY
|
|
setopt SHARE_HISTORY
|
|
unsetopt correct
|
|
|
|
# Zsh keybindings
|
|
|
|
# Ctrl + Left
|
|
bindkey "^[[1;5C" forward-word
|
|
# Ctrl + Right
|
|
bindkey "^[[1;5D" backward-word
|
|
|
|
# Home
|
|
bindkey "^[[H" beginning-of-line
|
|
|
|
# End
|
|
bindkey "^[[F" end-of-line
|
|
|
|
|
|
# Enable autocompletion features
|
|
autoload -Uz compinit
|
|
compinit
|
|
zstyle ':completion:*' menu select
|
|
|
|
# Persistent rehash
|
|
zstyle ':completion:*' rehash true
|
|
|
|
# Enable color support of ls
|
|
if [ -f "${XDG_CONFIG_HOME}/custom/dircolors" ]; then
|
|
dircolors -b "${XDG_CONFIG_HOME}/custom/dircolors" > /dev/null 2>&1
|
|
fi
|
|
|
|
# Sourcing alias definitions
|
|
if [ -f "${XDG_CONFIG_HOME}/custom/aliases" ]; then
|
|
. "${XDG_CONFIG_HOME}/custom/aliases"
|
|
fi
|
|
|
|
# Create necessary directories
|
|
mkdir -p "${__GL_SHADER_DISK_CACHE_PATH}"
|
|
mkdir -p "${XDG_DATA_HOME}/wine/prefixes"
|
|
mkdir -p "${XDG_CONFIG_HOME}/bazaar"
|
|
mkdir -p "${XDG_STATE_HOME}/zsh"
|
|
mkdir -p "${XDG_DATA_HOME}/zsh/zcompdump-${ZSH_VERSION}"
|
|
if [ -n "$(command -v compinit)" ]; then
|
|
compinit -d "${XDG_DATA_HOME}/zsh/zcompdump-${ZSH_VERSION}"
|
|
fi
|
|
|
|
# Initialize prompt
|
|
eval "$(starship init zsh)"
|
|
|
|
# Plugins
|
|
source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|