diff options
-rwxr-xr-x | zsh/zprofile | 12 | ||||
-rwxr-xr-x | zsh/zshrc | 30 |
2 files changed, 19 insertions, 23 deletions
diff --git a/zsh/zprofile b/zsh/zprofile index 79e87c5..2f58046 100755 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -7,7 +7,7 @@ export BROWSER='launch firefox' export SUDO='doas' # Use sudo=${SUDO-sudo} -[ $EUID = 0 ] && export SUDO='' # When running as root, don't use sudo +[ $EUID = 0 ] && export SUDO='' # When running as root, don't use sudo # Make programs follow the XDG base directory specification export XDG_CACHE_HOME="$HOME/.cache" @@ -22,7 +22,7 @@ export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/config" export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config" export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" -export X11CONFIG="$XDG_CONFIG_HOME/x11" # Used for X11 scripts +export X11CONFIG="$XDG_CONFIG_HOME/x11" # Used for X11 scripts export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export XDG_DATA_HOME="$HOME/.local/share" @@ -34,11 +34,11 @@ export PYTHONUSERBASE="$XDG_DATA_HOME/python" export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_DATA_HOME/java" export XDG_STATE_HOME="$HOME/.local/state" -export LESSHISTFILE='-' # Disable this, but it would be considered a state file -export ZHISTFILE="$XDG_STATE_HOME/zsh/zhistory" # Used to set HISTFILE in zshrc without exporting since HISTFILE is generic to most shells, and desired behavior is for zsh to have its own history file +export LESSHISTFILE='-' # Disable this, but it would be considered a state file +export ZHISTFILE="$XDG_STATE_HOME/zsh/zhistory" # Used to set HISTFILE in zshrc without exporting since HISTFILE is generic to most shells, and desired behavior is for zsh to have its own history file # Path -for lbin in "$HOME/.local/bin"{/,/*/}; do export PATH="${lbin%/}:$PATH"; done 2>/dev/null # Add ~/.local/bin and all sub dirs +for lbin in "$HOME/.local/bin"{/,/*/}; do export PATH="${lbin%/}:$PATH"; done 2>/dev/null # Add ~/.local/bin and all sub dirs export PATH="$HOME/.local/opt:$PATH" export PATH="$CARGO_HOME/bin:$PATH" export PATH="$PYTHONUSERBASE/bin:$PATH" @@ -48,7 +48,7 @@ export QT_QPA_PLATFORMTHEME='qt5ct' # Misc Zsh setup mkdir -p "$(dirname "$ZHISTFILE")" -source "$ZDOTDIR/profiles/zprofile.$HOST" 2>/dev/null # Source additional host-specific profiles +source "$ZDOTDIR/profiles/zprofile.$HOST" 2>/dev/null # Source additional host-specific profiles # Autostart X after login [ -z $DISPLAY ] && [[ $UID != 0 ]] && [[ $TTY =~ /dev/tty(1|C0) ]] && startx "$X11CONFIG/xinitrc" @@ -1,8 +1,8 @@ #!/usr/bin/env zsh -setopt +o NOMATCH # Non-existant wildcard matches won't produce an error +setopt +o NOMATCH # Non-existant wildcard matches won't produce an error -# Zsh scripts (load general scripts, then host specific scripts, then scripts prepended with !) +# Zsh scripts (load general scripts, then host specific scripts, then scripts with ! prefix) (loaded later = higher priority) for zscript in "$XDG_CONFIG_HOME/zsh/zscripts"{/[^\!]*.zsh,/hosts/*.$HOST.zsh,/!*.zsh}; do source "$zscript"; done 2>/dev/null # Colors! + Prompt @@ -10,24 +10,20 @@ autoload -U colors && colors [ -z "$PS1OVERRIDE" ] && PS1="%B%F{${colbr:-red}}[%F{${colname:-yellow}}%n%F{${colat:-green}}@%F{${colhost:-blue}}%m %F{${coldir:-magenta}}%U%~%u%F{${colbr:-red}}]%f%b%(!.#.$) " # Cd settings -setopt AUTO_CD # `cd` is implied -#setopt CDABLE_VARS # '~/' is implied for `cd` (doesn't work?) +setopt AUTO_CD # `cd` is implied when path is entered # History settings HISTFILE="${ZHISTFILE:-$HOME/.zhistory}" -HISTSIZE=500 # Max lines of history loaded into memory for each zsh session -SAVEHIST=10000000 # Max lines of history saved to HISTFILE before overwriting -setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes when using INC_APPEND_HISTORY or SHARE_HISTORY -setopt HIST_IGNORE_DUPS # Successive duplicate entries ignored -setopt HIST_IGNORE_SPACE # Entries with leading space ignored -setopt HIST_REDUCE_BLANKS # Remove superfluous blank characters before saving -setopt INC_APPEND_HISTORY # Create entries after each command, not after zsh exits -setopt SHARE_HISTORY # Share history between zsh sessions +HISTSIZE=500 # Max lines of history loaded into memory for each zsh session +SAVEHIST=10000000 # Max lines of history saved to HISTFILE before overwriting +setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes when using INC_APPEND_HISTORY or SHARE_HISTORY +setopt HIST_IGNORE_DUPS # Successive duplicate entries ignored +setopt HIST_IGNORE_SPACE # Entries with leading space aren't stored in histfile +setopt HIST_REDUCE_BLANKS # Remove superfluous blank characters before saving +setopt INC_APPEND_HISTORY # Create entries after each command, not after zsh exits +setopt SHARE_HISTORY # Share history between zsh sessions # Input/output settings -setopt INTERACTIVE_COMMENTS # Comments won't be interpreted in an interactive zsh session +setopt INTERACTIVE_COMMENTS # Comments won't be interpreted in an interactive shell -# tmp thing -[ $TTY = /dev/tty2 ] && "/home/timmy/.local/opt/shell-color-scripts/colorscripts/$(ls /home/timmy/.local/opt/shell-color-scripts/colorscripts 2>/dev/null | shuf -n1)" 2>/dev/null - -zplugInitialize # Load zsh plugins using zplug; should be last +zplugInitialize # Load zsh plugins using zplug; goes last |