refactoring to comply with standards
parent
4eeb98772b
commit
7d9628d4f5
|
|
@ -5,7 +5,7 @@ A colorful theme, where shows a lot information about your shell session.
|
||||||
**IMPORTANT:** This theme requires that [a font with the Powerline symbols](https://github.com/powerline/fonts) needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator.
|
**IMPORTANT:** This theme requires that [a font with the Powerline symbols](https://github.com/powerline/fonts) needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator.
|
||||||
|
|
||||||
**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If it's not the case (i.e you are running on
|
**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If it's not the case (i.e you are running on
|
||||||
a corporate network) you can set the flag 'THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=false}' in powerline.theme.bash
|
a corporate network) you can set the flag 'THEME_CHECK_SUDO=false' in your ~/.bashrc or ~/.bash_profile
|
||||||
|
|
||||||
## Provided Information
|
## Provided Information
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ function __powerline_user_info_prompt {
|
||||||
local user_info=""
|
local user_info=""
|
||||||
local color=${USER_INFO_THEME_PROMPT_COLOR}
|
local color=${USER_INFO_THEME_PROMPT_COLOR}
|
||||||
|
|
||||||
if [[ "THEME_CHECK_SUDO" = true ]]; then
|
if [[ "${THEME_CHECK_SUDO}" = true ]]; then
|
||||||
if sudo -n uptime 2>&1 | grep -q "load"; then
|
if sudo -n uptime 2>&1 | grep -q "load"; then
|
||||||
color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}
|
color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue