diff options
Diffstat (limited to 'zsh/zshrc')
-rwxr-xr-x | zsh/zshrc | 39 |
1 files changed, 14 insertions, 25 deletions
@@ -1,15 +1,19 @@ #!/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%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " # TODO: change $ to # when root - -# Load aliasrc and keybindrc -source "$XDG_CONFIG_HOME/zsh/aliasrc" -source "$XDG_CONFIG_HOME/zsh/aliasrc.$(hostname)" -source "$XDG_CONFIG_HOME/zsh/keybindrc" -# lf icons -#source "$XDG_CONFIG_HOME/zsh/lficons" +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/" @@ -24,23 +28,8 @@ 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 -# Change cursor shape for different vi modes (Cred: LARBS) -if [ -n "$DISPLAY" ]; then - function zle-keymap-select () { - case $KEYMAP in - vicmd) echo -n '\e[1 q';; # block - viins|main) echo -n '\e[5 q';; # beam - esac - } - zle -N zle-keymap-select - zle-line-init() { - #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -n "\e[5 q" - } - zle -N zle-line-init - echo -n '\e[5 q' # Use beam shape cursor on startup - preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt -fi +# Other settings +setopt autocd # 'cd' is implied # Load zsh plugins; should be last for plugin in ${=ZPLUGINS}; do |