summaryrefslogtreecommitdiff
path: root/zsh/zshrc
blob: 8272e56c1904dba859add70fd17c18cb42e838d4 (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
#!/usr/bin/env zsh

# Zsh scripts
for zscript in "$XDG_CONFIG_HOME/zsh/zscripts"{/[^\!]*.zsh,/hosts/*.$HOST.zsh,/!*.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
HISTFILE="$ZDATADIR/zhistory"
HISTSIZE=500			# 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

"/home/timmy/.local/opt/shell-color-scripts/colorscripts/$(ls /home/timmy/.local/opt/shell-color-scripts/colorscripts | shuf -n1)"

# Load zsh plugins; should be last
for plugin in ${=ZPLUGINS}; do source "$plugin"; done