dotfiles/roles/shell-dotfiles/files/zshrc

82 lines
2.1 KiB
Bash

#!/usr/bin/env zsh
# Term
export TERM="xterm-256color"
# Ruta de oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(battery time context dir virtualenv vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_exec_time status background_jobs kubectl_context)
POWERLEVEL9K_PYTHON_ICON=""
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_BATTERY_ICON='\uf1e6 '
# Acortar a partir de un directorio
POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
# Acortar path que se muestra en el prompt
POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
# No comprobar si hay actualizaciones
DISABLE_AUTO_UPDATE="true"
# Corregir
ENABLE_CORRECTION="false"
# Mostrar puntos rojos mientras se espera el completado
COMPLETION_WAITING_DOTS="true"
# Formato de tiempo
HIST_STAMPS="dd/mm/yyyy"
# Plugins
plugins=(git colored-man-pages sprunge gpg-agent pip urlencode ssh-agent aws)
# Path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/sbin:/usr/local/bin:$HOME/Scripts/bin/"
export MANPATH="/usr/local/man:$MANPATH"
# Usar oh-my-zsh
source $ZSH/oh-my-zsh.sh
# Lenguaje
export LANG=es_ES.UTF-8
export LANGUAGE=es_ES.UTF-8
export LC_ALL=es_ES.UTF-8
# Editor preferido
export EDITOR="emacsclient -t -c"
export ALTERNATE_EDITOR="nano"
# Funciones personalizadas
source $HOME/.oh-my-zsh/custom/themes/custom.zsh
# Alias
source $HOME/.aliases
# Python virtualenv
export WORKON_HOME=$HOME/.virtualenvs
mkdir -p $HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper_lazy.sh > /dev/null
# Cargar funciones
source $HOME/.functions
# Filtro para less
export LESS='-R'
export LESSOPEN='|~/.lessfilter %s'
# Systemd stuff
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
# fzf stuff
source ~/.fzf.zsh
source ~/Instalados/z/z.sh
source ~/Instalados/fz/fz.plugin.zsh
source ~/Instalados/zsh-interactive-cd/zsh-interactive-cd.plugin.zsh
# --select-1 automatically selects the item if there's only one
export FZF_CTRL_T_OPTS="--select-1 --exit-0"
# The following example uses tree command to show the entries of the directory
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"