Last active
March 29, 2018 19:05
-
-
Save fabiocruzcoelho/25480f99b81f51490c5a12f3addaeaab to your computer and use it in GitHub Desktop.
Exemplo zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enviroment variables echo $'\uf303' | |
export ZSH=/home/fabio/.oh-my-zsh | |
export SSH_KEY_PATH="~/.ssh/rsa_id" | |
export LANG=en_US.UTF-8 | |
export TERMINAL=terminator | |
export PAGER=less | |
export VISUAL=vim | |
export TERM="xterm-256color" | |
# Preferred editor for local and remote sessions | |
if [[ -n $SSH_CONNECTION ]]; then | |
export EDITOR='vim' | |
else | |
export EDITOR='vim' | |
fi | |
# Syntax highlighting and tab completion | |
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
autoload -Uz compinit | |
# Colored man pages using less as pager | |
man() { | |
env \ | |
LESS_TERMCAP_mb=$(printf "\e[1;31m") \ | |
LESS_TERMCAP_md=$(printf "\e[1;31m") \ | |
LESS_TERMCAP_me=$(printf "\e[0m") \ | |
LESS_TERMCAP_se=$(printf "\e[0m") \ | |
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ | |
LESS_TERMCAP_ue=$(printf "\e[0m") \ | |
LESS_TERMCAP_us=$(printf "\e[1;32m") \ | |
man "$@" | |
} | |
# Aliases for a few useful commands | |
alias mirrorUpdate="sudo reflector --latest 250 --protocol https --sort rate --save | |
/etc/pacman.d/mirrorlist" | |
alias yaourt="yaourt --pager --color" | |
alias pacmanGhost="~/.pacman.sh" | |
alias shivita="toilet -f mono12 -F rainbow 'andrea' | ponythink -f winona" | |
alias ip="ip -c" | |
alias rm="rm -i" | |
alias x="ranger" | |
alias c="cmus" | |
alias h="htop" | |
alias ltr="ls -ltr" | |
#neofetch | |
# Font mode for powerlevel9k | |
POWERLEVEL9K_MODE="nerdfont-complete" | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
#ZSH_THEME="robbyrussell" | |
ZSH_THEME="powerlevel9k/powerlevel9k" | |
# Prompt settings | |
#POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
#POWERLEVEL9K_RPROMPT_ON_NEWLINE=true | |
#POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%K{white}%k" | |
#POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%K{white}%F{161} \uf155%f%F{white} %k\ue0b0%f " | |
# Separators | |
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=$'\ue0b0' | |
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR=$'\ue231' | |
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=$'\ue0b2' | |
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR=$'\ue0b7' | |
# Context | |
#DEFAULT_USER="fabio" | |
#POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=false | |
#POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND='green' | |
#POWERLEVEL9K_CONTEXT_TEMPLATE="%F{cyan}%n%f" | |
#POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND='black' | |
# Dirs | |
POWERLEVEL9K_DIR_HOME_BACKGROUND='blue' | |
POWERLEVEL9K_DIR_HOME_FOREGROUND='black' | |
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND='blue' | |
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND='black' | |
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND='yellow' | |
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND='black' | |
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 | |
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_from_right" | |
# OS segment | |
POWERLEVEL9K_OS_ICON_BACKGROUND='black' | |
POWERLEVEL9K_LINUX_ICON='%F{cyan}\uf312' | |
#POWERLEVEL9K_LINUX_ICON='%F{cyan}\uf30a %F{white}fedora%F{cyan}linux%f' | |
# VCS icons | |
POWERLEVEL9K_VCS_GIT_ICON=$'\uf1d3' | |
POWERLEVEL9K_VCS_GIT_GITHUB_ICON=$'\uf113' | |
POWERLEVEL9K_VCS_STAGED_ICON=$'\uf055' | |
POWERLEVEL9K_VCS_UNSTAGED_ICON=$'\uf071' | |
POWERLEVEL9K_VCS_UNTRACKED_ICON=$'\uf00d' | |
POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=$'\uf0ab ' | |
POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=$'\uf0aa ' | |
# VCS colours | |
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='black' | |
POWERLEVEL9K_VCS_MODIFIED_FOREGROUND='red' | |
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='black' | |
POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND='yellow' | |
POWERLEVEL9K_VCS_CLEAN_BACKGROUND='black' | |
POWERLEVEL9K_VCS_CLEAN_FOREGROUND='green' | |
# VCS CONFIG | |
POWERLEVEL9K_SHOW_CHANGESET=true | |
# Status | |
POWERLEVEL9K_OK_ICON=$'\uf164' | |
POWERLEVEL9K_FAIL_ICON=$'\uf165' | |
POWERLEVEL9K_CARRIAGE_RETURN_ICON=$'\uf165' | |
# Battery | |
#POWERLEVEL9K_BATTERY_LOW_FOREGROUND='red' | |
#POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND='yellow' | |
#POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND='green' | |
#POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND='blue' | |
# Time | |
#POWERLEVEL9K_TIME_FORMAT="%d.%m.%y}" | |
#POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}" | |
#POWERLEVEL9K_TIME_FORMAT="%F{black}\uf017 %D{%H:%M:%S}%f" | |
POWERLEVEL9K_TIME_BACKGROUND='blue' | |
# Command auto-correction. | |
ENABLE_CORRECTION="true" | |
# Command execution time stamp shown in the history command output. | |
HIST_STAMPS="mm/dd/yyyy" | |
# Plugins to load | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh | |
# Prompt elements | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs) | |
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon context dir vcs) | |
#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(background_jobs time battery) | |
export GPG_TTY=$(tty) | |
unset SSH_ASKPASS | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/data/google-cloud-sdk/completion.zsh.inc' ]; then source '/data/google-cloud-sdk/completion.zsh.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/data/google-cloud-sdk/completion.zsh.inc' ]; then source '/data/google-cloud-sdk/completion.zsh.inc'; fi | |
# Bash completion kubectl | |
source <(kubectl completion zsh) | |
# Bash completion helm | |
source <(helm completion zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment