Created
September 3, 2018 12:05
-
-
Save GeneralD/a9be93f3c28940c339a259da5bbbb62d to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env zsh | |
# powerlevel9k theme settings (https://github.com/bhilburn/powerlevel9k) | |
# font mode | |
POWERLEVEL9K_MODE='nerdfont-complete' | |
# light theme? | |
# POWERLEVEL9K_COLOR_SCHEME='light' | |
# datetime format | |
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S}" | |
POWERLEVEL9K_TIME_FOREGROUND='red' | |
POWERLEVEL9K_TIME_BACKGROUND='white' | |
# command execution | |
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 | |
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=2 | |
# user name | |
export DEFAULT_USER=$USER | |
POWERLEVEL9K_ALWAYS_SHOW_CONTEXT=false | |
POWERLEVEL9K_ALWAYS_SHOW_USER=false | |
POWERLEVEL9K_USER_TEMPLATE="%n@%m" | |
# shorten | |
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 | |
POWERLEVEL9K_SHORTEN_STRATEGY='truncate_middle' | |
POWERLEVEL9K_SHORTEN_DELIMITER='…' | |
# separator | |
POWERLEVEL9K_DIR_PATH_SEPARATOR=$'\ue0c1 ' | |
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=$'\ue0c0 ' | |
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=$'\ue0c2 ' | |
# prompts (https://github.com/bhilburn/powerlevel9k#available-prompt-segments) | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs) | |
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(background_jobs time load ram battery) | |
POWERLEVEL9K_DISABLE_RPROMPT=false | |
# put an empty before prompt? | |
POWERLEVEL9K_PROMPT_ADD_NEWLINE=false | |
# multiline | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=false | |
POWERLEVEL9K_RPROMPT_ON_NEWLINE=false | |
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=$'\ue231 ' | |
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=$'\ue289 ' | |
# status | |
POWERLEVEL9K_STATUS_OK_BACKGROUND='black' | |
POWERLEVEL9K_STATUS_OK_FOREGROUND='green' | |
POWERLEVEL9K_STATUS_ERROR_BACKGROUND='black' | |
POWERLEVEL9K_STATUS_ERROR_FOREGROUND='red' | |
# dir | |
POWERLEVEL9K_DIR_SHOW_WRITABLE=false | |
POWERLEVEL9K_DIR_HOME_FOREGROUND='black' | |
POWERLEVEL9K_DIR_HOME_BACKGROUND='magenta' | |
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND='black' | |
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND='yellow' | |
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND='black' | |
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND='green' | |
# vcs | |
POWERLEVEL9K_HIDE_BRANCH_ICON=false | |
POWERLEVEL9K_SHOW_CHANGESET=true | |
POWERLEVEL9K_CHANGESET_HASH_LENGTH=6 | |
POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY=true | |
POWERLEVEL9K_VCS_HIDE_TAGS=false | |
POWERLEVEL9K_VCS_CLEAN_FOREGROUND='black' | |
POWERLEVEL9K_VCS_CLEAN_BACKGROUND='cyan' | |
POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND='black' | |
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='yellow' | |
POWERLEVEL9K_VCS_MODIFIED_FOREGROUND='black' | |
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='red' | |
POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND='black' | |
POWERLEVEL9K_VI_MODE_INSERT_BACKGROUND='blue' | |
# nvm | |
POWERLEVEL9K_NVM_FOREGROUND='black' | |
POWERLEVEL9K_NVM_BACKGROUND='yellow' | |
POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_COLOR='black' | |
# rvm | |
POWERLEVEL9K_RVM_FOREGROUND='black' | |
POWERLEVEL9K_RVM_BACKGROUND='red' | |
POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_COLOR='black' | |
# os | |
POWERLEVEL9K_OS_ICON_BACKGROUND='white' | |
POWERLEVEL9K_OS_ICON_FOREGROUND='cyan' | |
# background_jobs | |
POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE='false' | |
POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS='false' | |
# disk_usage | |
POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false | |
POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 | |
POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 | |
# load | |
POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND='black' | |
POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND='red' | |
POWERLEVEL9K_LOAD_CRITICAL_VISUAL_IDENTIFIER_COLOR='black' | |
POWERLEVEL9K_LOAD_WARNING_FOREGROUND='black' | |
POWERLEVEL9K_LOAD_WARNING_BACKGROUND='yellow' | |
POWERLEVEL9K_LOAD_WARNING_VISUAL_IDENTIFIER_COLOR='black' | |
POWERLEVEL9K_LOAD_NORMAL_FOREGROUND='black' | |
POWERLEVEL9K_LOAD_NORMAL_BACKGROUND='green' | |
POWERLEVEL9K_LOAD_NORMAL_VISUAL_IDENTIFIER_COLOR='black' | |
# ram | |
POWERLEVEL9K_RAM_BACKGROUND='magenta' | |
POWERLEVEL9K_RAM_FOREGROUND='black' | |
POWERLEVEL9K_RAM_ELEMENTS=(ram_free) | |
# battery | |
POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND='black' | |
POWERLEVEL9K_BATTERY_CHARGING_BACKGROUND='cyan' | |
POWERLEVEL9K_BATTERY_CHARGING_VISUAL_IDENTIFIER_COLOR='white' | |
POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND='black' | |
POWERLEVEL9K_BATTERY_CHARGED_BACKGROUND='blue' | |
POWERLEVEL9K_BATTERY_CHARGED_VISUAL_IDENTIFIER_COLOR='white' | |
POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND='black' | |
POWERLEVEL9K_BATTERY_DISCONNECTED_BACKGROUND='green' | |
POWERLEVEL9K_BATTERY_DISCONNECTED_VISUAL_IDENTIFIER_COLOR='cyan' | |
POWERLEVEL9K_BATTERY_LOW_FOREGROUND='black' | |
POWERLEVEL9K_BATTERY_LOW_BACKGROUND='red' | |
POWERLEVEL9K_BATTERY_LOW_VISUAL_IDENTIFIER_COLOR='yellow' | |
POWERLEVEL9K_BATTERY_LOW_THRESHOLD=10 | |
POWERLEVEL9K_BATTERY_VERBOSE=false | |
# aws | |
AWS_DEFAULT_PROFILE='' | |
# anaconda | |
POWERLEVEL9K_ANACONDA_LEFT_DELIMITER='(' | |
POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER=')' | |
# vi mode | |
POWERLEVEL9K_VI_INSERT_MODE_STRING="INSERT" | |
POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND='black' | |
POWERLEVEL9K_VI_MODE_INSERT_BACKGROUND='green' | |
POWERLEVEL9K_VI_COMMAND_MODE_STRING="NORMAL" | |
POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND='black' | |
POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND='blue' | |
# todo | |
POWERLEVEL9K_TODO_BACKGROUND='black' | |
POWERLEVEL9K_TODO_FOREGROUND='white' | |
# host | |
POWERLEVEL9K_HOST_TEMPLATE="%2m" | |
POWERLEVEL9K_HOST_ICON="\uF109 " | |
POWERLEVEL9K_SSH_ICON="\uF489 " | |
# custom_unity_version | |
powerlevel9k_unity_version() { | |
[[ -d ProjectSettings ]] || return | |
local version=`head -n 1 ProjectSettings/ProjectVersion.txt 2> /dev/null | cut -d " " -f 2-2` | |
[[ $version ]] && version="\ue721 $version" | |
echo $version | |
} | |
POWERLEVEL9K_CUSTOM_UNITY_VERSION='powerlevel9k_unity_version' | |
POWERLEVEL9K_CUSTOM_UNITY_VERSION_FOREGROUND='white' | |
POWERLEVEL9K_CUSTOM_UNITY_VERSION_BACKGROUND='blue' | |
# custom_idea | |
powerlevel9k_idea() { | |
[[ -d .idea ]] && echo $'\ue7b5' | |
} | |
POWERLEVEL9K_CUSTOM_IDEA='powerlevel9k_idea' | |
POWERLEVEL9K_CUSTOM_IDEA_FOREGROUND='yellow' | |
POWERLEVEL9K_CUSTOM_IDEA_BACKGROUND='blue' | |
# custom_project | |
powerlevel9k_project() { | |
setopt +o nomatch | |
# xcode project | |
if \ls -d *.xcodeproj 1>/dev/null 2>/dev/null && echo $'\uE713' | |
# android project | |
[[ -f app/src/main/AndroidManifest.xml ]] && echo $'\uE70E' | |
} | |
POWERLEVEL9K_CUSTOM_PROJECT='powerlevel9k_project' | |
POWERLEVEL9K_CUSTOM_PROJECT_FOREGROUND='cyan' | |
POWERLEVEL9K_CUSTOM_PROJECT_BACKGROUND='black' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment