mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-01 16:53:07 +01:00
116 lines
3.1 KiB
Bash
116 lines
3.1 KiB
Bash
# PATH variable declaration as array
|
|
# -U means unique, which tells the shell not to add anything to the array if it's
|
|
# already there.
|
|
typeset -U PATH path
|
|
|
|
# Add /usr/local dirs to PATH
|
|
path=("/usr/local/bin" "/usr/local/sbin")
|
|
path+=("/bin" "/sbin" "/usr/bin" "/usr/sbin")
|
|
|
|
# Add nimble (Nim) to PATH
|
|
[ -d "${HOME}/.nimble/bin" ] && path+=("${HOME}/.nimble/bin")
|
|
|
|
# Set Go path if it exist
|
|
[ -d "${HOME}/go" ] && GOPATH="${HOME}/go" && path+=("${GOPATH}/bin")
|
|
|
|
# Set Cargo path for Rust binaries
|
|
[ -d "${HOME}/.cargo/bin" ] && path+=("${HOME}/.cargo/bin")
|
|
|
|
# If ~/bin exists, add it to PATH
|
|
[ -d "${HOME}/bin" ] && path+=("${HOME}/bin")
|
|
|
|
# If ~/.local/bin exists, add it to path
|
|
[ -d "${HOME}/.local/bin" ] && path+=("${HOME}/.local/bin")
|
|
|
|
export PATH
|
|
|
|
# Setup pager
|
|
if [[ -x $(which most) ]]; then
|
|
export PAGER="most"
|
|
export MANPAGER="most"
|
|
else
|
|
export PAGER="less -X"
|
|
export MANPAGER="less -iMXF"
|
|
|
|
if [[ $terminfo[colors] -ge 8 ]]; then
|
|
export LESS_TERMCAP_mb=$'\E[01;31m'
|
|
export LESS_TERMCAP_md=$'\E[01;31m'
|
|
export LESS_TERMCAP_me=$'\E[0m'
|
|
export LESS_TERMCAP_se=$'\E[0m'
|
|
export LESS_TERMCAP_so=$'\E[01;44;33m'
|
|
export LESS_TERMCAP_ue=$'\E[0m'
|
|
export LESS_TERMCAP_us=$'\E[01;32m'
|
|
fi
|
|
fi
|
|
|
|
# Editor - Neovim, else nano
|
|
if test -x "$(command -v nvim)"; then
|
|
EDITOR=nvim
|
|
elif test -x "$(command -v vim)"; then
|
|
EDITOR=vim
|
|
else
|
|
EDITOR=nano
|
|
fi
|
|
|
|
export EDITOR
|
|
|
|
# lscolors (generated from vivid)
|
|
if [ -f ~/.lscolors.sh ]; then
|
|
export LS_COLORS=$(cat ~/.lscolors.sh)
|
|
fi
|
|
|
|
# Format of process time reports with 'time'
|
|
# %% A '%'
|
|
# %U CPU seconds spent in user mode
|
|
# %S CPU seconds spent in kernel mode
|
|
# %E Elapsed time in seconds
|
|
# %P CPU percentage, computed as (%U+%S)/%E
|
|
# %J The name of this job
|
|
# Default is:
|
|
# %E real %U user %S system %P %J
|
|
TIMEFMT="\
|
|
|
|
The name of this job : %J
|
|
CPU seconds spent in user mode : %U
|
|
CPU seconds spent in kernel mode : %S
|
|
Elapsed time in seconds : %E
|
|
CPU percentage : %P"
|
|
|
|
# HISTSIZE is the number of lines of history that is kept within any given
|
|
# running zsh instance. SAVEHIST is the number of lines of history that is
|
|
# written out to the HISTFILE when that event occurs. If you use the
|
|
# HIST_EXPIRE_DUPS_FIRST option, setting this value larger than the SAVEHIST
|
|
# size will give you the difference as a cushion for saving duplicated history
|
|
# events.
|
|
HISTSIZE=100000
|
|
SAVEHIST=65536
|
|
|
|
# Name of the file used to store command history
|
|
HISTFILE=~/.zsh_history
|
|
|
|
# If nonnegative, commands whose combined user and system execution times
|
|
# (measured in seconds) are greater than this value have timing stats printed
|
|
# for them.
|
|
REPORTTIME=10
|
|
|
|
# reply-to email address
|
|
export REPLYTO="hyperreal@fedoraproject.org"
|
|
|
|
# Language
|
|
export LANG="en_US.UTF-8"
|
|
|
|
# Manpages
|
|
export MANPATH="${MANPATH:-/usr/share/man:/usr/local/share/man}"
|
|
|
|
if [ -d "${HOME}/.fzf/man" ]; then
|
|
export MANPATH="${MANPATH}:${HOME}/.fzf/man"
|
|
fi
|
|
|
|
# Bat theme
|
|
export BAT_THEME="Catppuccin"
|
|
|
|
# Automatically remove duplicates from these arrays
|
|
typeset -gU path cdpath manpath fpath
|
|
|
|
# vim:set ft=zsh ai et sw=4 ts=4:
|