cuyu / thunderbolt100k

A collection of interesting widgets to enhance powerlevel9k theme for ZSH
MIT License
6 stars 0 forks source link

Sharing your configuration #1

Open dritter opened 7 years ago

dritter commented 7 years ago

Hi there!

I am one of the collaborators of P9K. You have a pretty interesting P9K configuration in your screenshot. Do you mind sharing it in the official wiki?

Keep up the good work! 👍

cuyu commented 7 years ago

@dritter Sure. It's my pleasure to share the configurations. But some scripts are written in Python (the weather info displayed in the screenshot) and thus cannot simply be shown in .zshrc file.

I will publish the configurations of the .zshrc part as below~

cuyu commented 7 years ago
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(virtualenv dir_writable dir rbenv vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(command_execution_time status load ram root_indicator background_jobs battery custom_weather time)
POWERLEVEL9K_MODE='nerdfont-complete'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%{%F{013}%}\u250f"
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="%{%F{013}%}\u2517%{%F{default}%} "

POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=''
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=''
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR=''
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR=''

POWERLEVEL9K_VIRTUALENV_BACKGROUND="clear"
POWERLEVEL9K_VIRTUALENV_FOREGROUND="123"

POWERLEVEL9K_DIR_HOME_BACKGROUND="clear"
POWERLEVEL9K_DIR_HOME_FOREGROUND="013"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="clear"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="013"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_BACKGROUND="clear"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_FOREGROUND="160"
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="clear"
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="white"

POWERLEVEL9K_VCS_CLEAN_BACKGROUND="clear"
POWERLEVEL9K_VCS_CLEAN_FOREGROUND="036"
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND="clear"
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND="clear"
POWERLEVEL9K_VCS_MODIFIED_FOREGROUND="yellow"
POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND="191"

POWERLEVEL9K_SHORTEN_DIR_LENGTH=8
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"

POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='clear'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='213'

POWERLEVEL9K_RAM_BACKGROUND="clear"
POWERLEVEL9K_RAM_FOREGROUND="110"
POWERLEVEL9K_RAM_ELEMENTS="ram_free"
POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND="clear"
POWERLEVEL9K_LOAD_WARNING_BACKGROUND="clear"
POWERLEVEL9K_LOAD_NORMAL_BACKGROUND="clear"
POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND="125"
POWERLEVEL9K_LOAD_WARNING_FOREGROUND="202"
POWERLEVEL9K_LOAD_NORMAL_FOREGROUND="106"

POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S} \uf43a"
POWERLEVEL9K_TIME_BACKGROUND="clear"
POWERLEVEL9K_TIME_FOREGROUND="cyan"

POWERLEVEL9K_BATTERY_LOW_BACKGROUND="clear"
POWERLEVEL9K_BATTERY_CHARGING_BACKGROUND="clear"
POWERLEVEL9K_BATTERY_CHARGED_BACKGROUND="clear"
POWERLEVEL9K_BATTERY_DISCONNECTED_BACKGROUND="clear"
POWERLEVEL9K_BATTERY_LOW_FOREGROUND="088"
POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND="137"
POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND="136"
POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND="138"

POWERLEVEL9K_STATUS_OK_BACKGROUND="clear"
POWERLEVEL9K_STATUS_OK_FOREGROUND="082"
POWERLEVEL9K_STATUS_ERROR_BACKGROUND="clear"
POWERLEVEL9K_STATUS_ERROR_FOREGROUND="196"

POWERLEVEL9K_CUSTOM_WEATHER="zsh_weather"
POWERLEVEL9K_CUSTOM_WEATHER_BACKGROUND="clear"
cuyu commented 7 years ago

And the configurations for this project (defines the zsh_weather above, also located in .zshrc):

############################
# For THUNDERBOLT100K
POWERLEVEL9K_CUSTOM_WEATHER="zsh_weather"
PYTHON_PATH=$(which python)
zsh_weather() {
    $PYTHON_PATH /REPLACE_WITH_YOUR_PATH/thunderbolt100k/src/main.py
    echo $($PYTHON_PATH /REPLACE_WITH_YOUR_PATH/thunderbolt100k/src/zsh_weather.py)
}
THUNDERBOLT100K_WEATHER_TOKEN=REPLACE_WITH_YOUR_TOKEN
THUNDERBOLT100K_WEATHER_CITY=REPLACE_WITH_YOUR_CITY
# Customise the colors (default ones as below)
THUNDERBOLT100K_WEATHER_SUN_COLOR="202"
THUNDERBOLT100K_WEATHER_RAIN_COLOR="153"
THUNDERBOLT100K_WEATHER_CLOUD_COLOR="250"
THUNDERBOLT100K_WEATHER_THUNDER_COLOR="226"
THUNDERBOLT100K_WEATHER_OVERCAST_COLOR="244"
THUNDERBOLT100K_WEATHER_SNOW_COLOR="white"
THUNDERBOLT100K_WEATHER_DEFAULT_COLOR="green"
THUNDERBOLT100K_WEATHER_HIGH_TEMP_COLOR="196"
THUNDERBOLT100K_WEATHER_MIDDLE_TEMP_COLOR="214"
THUNDERBOLT100K_WEATHER_LOW_TEMP_COLOR="blue"
THUNDERBOLT100K_WEATHER_DEFAULT_COLOR="195"
THUNDERBOLT100K_WEATHER_SHOW_UPDATE_TIME=60