More user customizability and light organization
This commit is contained in:
parent
bf216fd8a7
commit
e3cd70ae4e
1 changed files with 12 additions and 14 deletions
26
.zshrc
26
.zshrc
|
@ -6,7 +6,9 @@
|
||||||
### Basic shell configuration >>>
|
### Basic shell configuration >>>
|
||||||
### Environment variables >>>
|
### Environment variables >>>
|
||||||
{
|
{
|
||||||
|
# optionally source an external environment variable file
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/envrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/envrc"
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/envrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/envrc"
|
||||||
|
|
||||||
# Intelligently set $EDITOR
|
# Intelligently set $EDITOR
|
||||||
if command -v nvim > /dev/null;then
|
if command -v nvim > /dev/null;then
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
@ -18,6 +20,10 @@
|
||||||
|
|
||||||
export PATH="$PATH:${XDG_DATA_HOME:-$HOME/.local/bin}"
|
export PATH="$PATH:${XDG_DATA_HOME:-$HOME/.local/bin}"
|
||||||
export SYSTEMD_EDITOR="$EDITOR"
|
export SYSTEMD_EDITOR="$EDITOR"
|
||||||
|
|
||||||
|
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||||
|
export ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/zsh"
|
||||||
|
|
||||||
# Plugin setting >>>
|
# Plugin setting >>>
|
||||||
{
|
{
|
||||||
# ZSH Vi Mode
|
# ZSH Vi Mode
|
||||||
|
@ -33,6 +39,7 @@
|
||||||
# <<<
|
# <<<
|
||||||
### Aliases >>>
|
### Aliases >>>
|
||||||
{
|
{
|
||||||
|
# optionally source an external alias file
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
||||||
## Short hand programs (ex: sc = shellcheck) >>>
|
## Short hand programs (ex: sc = shellcheck) >>>
|
||||||
# use nvim rather than vim if the command exists
|
# use nvim rather than vim if the command exists
|
||||||
|
@ -123,6 +130,7 @@
|
||||||
# <<<
|
# <<<
|
||||||
### Functions >>>
|
### Functions >>>
|
||||||
{
|
{
|
||||||
|
# optionally source an external function file
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc"
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc"
|
||||||
|
|
||||||
# Simple extraction script. Taken from manjaro's .bashrc
|
# Simple extraction script. Taken from manjaro's .bashrc
|
||||||
|
@ -355,7 +363,6 @@
|
||||||
setopt pipe_fail # When a pipe fails, show the non-0 exit code for the exit code
|
setopt pipe_fail # When a pipe fails, show the non-0 exit code for the exit code
|
||||||
}
|
}
|
||||||
# <<<
|
# <<<
|
||||||
|
|
||||||
## ZSH Completion Options >>>
|
## ZSH Completion Options >>>
|
||||||
{
|
{
|
||||||
# Mine
|
# Mine
|
||||||
|
@ -381,7 +388,6 @@
|
||||||
WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain characters part of the word
|
WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain characters part of the word
|
||||||
}
|
}
|
||||||
# <<<
|
# <<<
|
||||||
|
|
||||||
## Keybindings >>>
|
## Keybindings >>>
|
||||||
bindkey -v # Enable Vi mode
|
bindkey -v # Enable Vi mode
|
||||||
bindkey '^[[7~' beginning-of-line # Home key
|
bindkey '^[[7~' beginning-of-line # Home key
|
||||||
|
@ -420,11 +426,7 @@ bindkey -M vicmd 'k' history-substring-search-up
|
||||||
bindkey -M vicmd 'j' history-substring-search-down
|
bindkey -M vicmd 'j' history-substring-search-down
|
||||||
# <<<
|
# <<<
|
||||||
|
|
||||||
autoload -U compinit colors zcalc
|
# Colors and compinit >>>
|
||||||
compinit -d
|
|
||||||
colors
|
|
||||||
|
|
||||||
# Color man pages >>>
|
|
||||||
export LESS_TERMCAP_mb=$'\E[01;32m'
|
export LESS_TERMCAP_mb=$'\E[01;32m'
|
||||||
export LESS_TERMCAP_md=$'\E[01;32m'
|
export LESS_TERMCAP_md=$'\E[01;32m'
|
||||||
export LESS_TERMCAP_me=$'\E[0m'
|
export LESS_TERMCAP_me=$'\E[0m'
|
||||||
|
@ -433,15 +435,11 @@ export LESS_TERMCAP_so=$'\E[01;47;34m'
|
||||||
export LESS_TERMCAP_ue=$'\E[0m'
|
export LESS_TERMCAP_ue=$'\E[0m'
|
||||||
export LESS_TERMCAP_us=$'\E[01;36m'
|
export LESS_TERMCAP_us=$'\E[01;36m'
|
||||||
export LESS=-R
|
export LESS=-R
|
||||||
# <<<
|
|
||||||
|
|
||||||
# Offer to install missing package if command is not found >>>
|
autoload -U compinit colors zcalc
|
||||||
# if [[ -r /usr/share/zsh/functions/command-not-found.zsh ]]; then
|
compinit -d
|
||||||
# source /usr/share/zsh/functions/command-not-found.zsh
|
colors
|
||||||
# export PKGFILE_PROMPT_INSTALL_MISSING=1
|
|
||||||
# fi
|
|
||||||
# <<<
|
# <<<
|
||||||
|
|
||||||
### Various manjaro ZSH functions >>>
|
### Various manjaro ZSH functions >>>
|
||||||
|
|
||||||
# Set terminal window and tab/icon title
|
# Set terminal window and tab/icon title
|
||||||
|
|
Loading…
Add table
Reference in a new issue