refactor themes to support standardized clock functions

This commit is contained in:
MunifTanjim
2016-10-18 20:25:51 +06:00
parent 8dde691671
commit a2a6fa2812
20 changed files with 110 additions and 66 deletions

View File

@@ -33,7 +33,7 @@ For now, the only supported value is `sudo`, which hides the username and hostna
By default, the current time is shown on the right hand side, you can change the format using the following variable:
POWERLINE_PROMPT_CLOCK_FORMAT="%H:%M:%S"
THEME_CLOCK_FORMAT="%H:%M:%S"
The time/date is printed by the `date` command, so refer to its man page to change the format.

View File

@@ -40,7 +40,7 @@ BATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70
BATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208
BATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160
THEME_PROMPT_CLOCK_FORMAT=${POWERLINE_PROMPT_CLOCK_FORMAT:="%H:%M:%S"}
THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:="%H:%M:%S"}
IN_VIM_THEME_PROMPT_COLOR=245
IN_VIM_THEME_PROMPT_TEXT="vim"
@@ -136,7 +136,7 @@ function __powerline_cwd_prompt {
}
function __powerline_clock_prompt {
echo "$(date +"${THEME_PROMPT_CLOCK_FORMAT}")|${CLOCK_THEME_PROMPT_COLOR}"
echo "$(date +"${THEME_CLOCK_FORMAT}")|${CLOCK_THEME_PROMPT_COLOR}"
}
function __powerline_battery_prompt {