blob: 648ea3c3ff009bdae3ff7ee2897ddfeba9e91144 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/usr/bin/env zsh
# Zsh scripts
zscripts="$XDG_CONFIG_HOME/zsh/zscripts"
source $zscripts/aliasrc.zsh # General aliases
source $zscripts/keybindrc.zsh # Zsh keybindings
source $zscripts/lfub.zsh # lf + ueberzug configuration
source $zscripts/vicursor.zsh # Change cursor for different vi modes
# Host specific scripts
for zscript in $zscripts/*.$HOST.zsh; do
source $zscript
done
# Colors! + Prompt
autoload -U colors && colors
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%(!.#.$) "
# History settings
HISTDIR="$XDG_DATA_HOME/zsh/"
mkdir -p "$HISTDIR"
HISTFILE="$HISTDIR/zhistory"
HISTSIZE=200 # Max lines of history loaded into memory
SAVEHIST=10000000 # Max lines of history saved to the histfile
setopt INC_APPEND_HISTORY # Create entries after each command, not after zsh exits
setopt SHARE_HISTORY # Share history between zsh sessions
setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_DUPS # Successive duplicate entries ignored
setopt HIST_IGNORE_SPACE # Entries with leading space ignored
setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes
# Other settings
setopt autocd # 'cd' is implied
# Load zsh plugins; should be last
for plugin in ${=ZPLUGINS}; do
source $plugin
done
|