Add new segment, aws_profile, to powerline themes

pull/1259/head
Eduardo Bellido Bellido 2018-10-31 20:09:28 +01:00
parent 73af202a32
commit f757cad45a
9 changed files with 22 additions and 0 deletions

View File

@ -46,6 +46,7 @@ The time/date is printed by the `date` command, so refer to its man page to chan
The contents of both prompt sides can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are: The contents of both prompt sides can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are:
* `aws_profile` - Show the current value of the `AWS_PROFILE` environment variable
* `battery` - Battery information (you'll need to enable the `battery` plugin) * `battery` - Battery information (you'll need to enable the `battery` plugin)
* `clock` - Current time in `HH:MM:SS` format * `clock` - Current time in `HH:MM:SS` format
* `cwd` - Current working directory including full folder hierarchy (c.f. `wd`) * `cwd` - Current working directory including full folder hierarchy (c.f. `wd`)

View File

@ -36,6 +36,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
RUBY_THEME_PROMPT_COLOR=161 RUBY_THEME_PROMPT_COLOR=161
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="r "} RUBY_CHAR=${POWERLINE_RUBY_CHAR:="r "}
AWS_PROFILE_CHAR="${POWERLINE_AWS_PROFILE_CHAR:=aws }"
AWS_PROFILE_PROMPT_COLOR=208
CWD_THEME_PROMPT_COLOR=240 CWD_THEME_PROMPT_COLOR=240
LAST_STATUS_THEME_PROMPT_COLOR=196 LAST_STATUS_THEME_PROMPT_COLOR=196

View File

@ -42,6 +42,7 @@ The time/date is printed by the `date` command, so refer to its man page to chan
The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are: The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are:
* `aws_profile` - Show the current value of the `AWS_PROFILE` environment variable
* `battery` - Battery information (you'll need to enable the `battery` plugin) * `battery` - Battery information (you'll need to enable the `battery` plugin)
* `clock` - Current time in `HH:MM:SS` format * `clock` - Current time in `HH:MM:SS` format
* `cwd` - Current working directory including full folder hierarchy (c.f. `wd`) * `cwd` - Current working directory including full folder hierarchy (c.f. `wd`)

View File

@ -33,6 +33,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
RUBY_THEME_PROMPT_COLOR=161 RUBY_THEME_PROMPT_COLOR=161
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="r "} RUBY_CHAR=${POWERLINE_RUBY_CHAR:="r "}
AWS_PROFILE_CHAR="${POWERLINE_AWS_PROFILE_CHAR:=aws }"
AWS_PROFILE_PROMPT_COLOR=208
CWD_THEME_PROMPT_COLOR=254 CWD_THEME_PROMPT_COLOR=254
LAST_STATUS_THEME_PROMPT_COLOR=124 LAST_STATUS_THEME_PROMPT_COLOR=124

View File

@ -40,6 +40,7 @@ The time/date is printed by the `date` command, so refer to its man page to chan
The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are: The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are:
* `aws_profile` - Show the current value of the `AWS_PROFILE` environment variable
* `battery` - Battery information (you'll need to enable the `battery` plugin) * `battery` - Battery information (you'll need to enable the `battery` plugin)
* `clock` - Current time in `HH:MM:SS` format * `clock` - Current time in `HH:MM:SS` format
* `cwd` - Current working directory including full folder hierarchy (c.f. `wd`) * `cwd` - Current working directory including full folder hierarchy (c.f. `wd`)

View File

@ -28,6 +28,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
RUBY_THEME_PROMPT_COLOR=161 RUBY_THEME_PROMPT_COLOR=161
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="💎 "} RUBY_CHAR=${POWERLINE_RUBY_CHAR:="💎 "}
AWS_PROFILE_CHAR="${POWERLINE_AWS_PROFILE_CHAR:=aws }"
AWS_PROFILE_PROMPT_COLOR=208
CWD_THEME_PROMPT_COLOR=240 CWD_THEME_PROMPT_COLOR=240
LAST_STATUS_THEME_PROMPT_COLOR=52 LAST_STATUS_THEME_PROMPT_COLOR=52

View File

@ -44,6 +44,7 @@ The time/date is printed by the `date` command, so refer to its man page to chan
The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are: The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are:
* `aws_profile` - Show the current value of the `AWS_PROFILE` environment variable
* `battery` - Battery information (you'll need to enable the `battery` plugin) * `battery` - Battery information (you'll need to enable the `battery` plugin)
* `clock` - Current time in `HH:MM:SS` format * `clock` - Current time in `HH:MM:SS` format
* `cwd` - Current working directory including full folder hierarchy (c.f. `wd`) * `cwd` - Current working directory including full folder hierarchy (c.f. `wd`)

View File

@ -136,6 +136,12 @@ function __powerline_in_vim_prompt {
fi fi
} }
function __powerline_aws_profile_prompt {
if [[ -n "${AWS_PROFILE}" ]]; then
echo "${AWS_PROFILE_CHAR}${AWS_PROFILE}|${AWS_PROFILE_PROMPT_COLOR}"
fi
}
function __powerline_left_segment { function __powerline_left_segment {
local OLD_IFS="${IFS}"; IFS="|" local OLD_IFS="${IFS}"; IFS="|"
local params=( $1 ) local params=( $1 )

View File

@ -31,6 +31,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
RUBY_THEME_PROMPT_COLOR=161 RUBY_THEME_PROMPT_COLOR=161
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="r "} RUBY_CHAR=${POWERLINE_RUBY_CHAR:="r "}
AWS_PROFILE_CHAR="${POWERLINE_AWS_PROFILE_CHAR:=aws }"
AWS_PROFILE_PROMPT_COLOR=208
CWD_THEME_PROMPT_COLOR=240 CWD_THEME_PROMPT_COLOR=240
LAST_STATUS_THEME_PROMPT_COLOR=52 LAST_STATUS_THEME_PROMPT_COLOR=52