cfg/desktop/zsh/.zshrc

56 lines
1.0 KiB
Bash
Raw Normal View History

# Inferencium
2022-10-16 09:18:23 +01:00
# ZSH - rc
# Copyright 2022-2023 Jake Winters
# SPDX-License-Identifier: GPL-3.0-or-later
2022-10-16 09:18:23 +01:00
# Version: 6.0.0.13
2022-10-16 10:41:25 +01:00
2022-10-16 09:18:23 +01:00
# Temporary export variables until permanent solution is found
export LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
# Prompt
2022-10-16 09:18:23 +01:00
PROMPT=%n@%M:%#" "
# Options
2022-10-16 09:18:23 +01:00
setopt extendedglob KSH_ARRAYS nomatch
unsetopt autocd AUTO_REMOVE_SLASH beep
# Keybinds
2022-10-16 09:18:23 +01:00
bindkey -e
bindkey "^[[3" delete-char
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
2022-10-16 09:18:23 +01:00
# zstyle
2022-10-16 09:18:23 +01:00
zstyle :compinstall filename '~/.zshrc'
zstyle ':completion:*' menu select
autoload -Uz compinit
compinit
# History
2022-10-16 09:18:23 +01:00
HISTFILE=~/.zsh-history
HISTSIZE=1024
SAVEHIST=1024
# XDG_RUNTIME_DIR
2022-11-19 17:11:11 +00:00
if test -z "${XDG_RUNTIME_DIR}"; then
export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
if ! test -d "${XDG_RUNTIME_DIR}"; then
mkdir "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
fi
2022-10-16 09:18:23 +01:00
# Aliases.
## Global
if [[ -f ~/.zsh-alias-global ]]; then
. ~/.zsh-alias-global
2022-10-16 09:18:23 +01:00
fi
## User
if [[ -f ~/.zsh-alias-user ]]; then
. ~/.zsh-alias-user
fi