diff --git a/themes/powerline/powerline.base.bash b/themes/powerline/powerline.base.bash index c60b45e0..1fa2dd9c 100644 --- a/themes/powerline/powerline.base.bash +++ b/themes/powerline/powerline.base.bash @@ -15,7 +15,7 @@ function __powerline_user_info_prompt { case "${POWERLINE_PROMPT_USER_INFO_MODE}" in "sudo") - if sudo -n uptime 2>&1 | grep -q "load"; then + if sudo -n true >/dev/null 2>&1; then color=${USER_INFO_THEME_PROMPT_COLOR_SUDO} user_info=${USER_INFO_SUDO_CHAR}${USER} fi @@ -80,7 +80,13 @@ function __powerline_scm_prompt { } function __powerline_cwd_prompt { - echo "$(pwd | sed "s|^${HOME}|~|")|${CWD_THEME_PROMPT_COLOR}" + local cwd=$(pwd | sed "s|^${HOME}|~|") + + if [[ -n "${CWD_THEME_DIR_SEPARATOR}" ]]; then + # todo + fi + + echo "${cwd}|${CWD_THEME_PROMPT_COLOR}" } function __powerline_hostname_prompt { @@ -145,7 +151,7 @@ function __powerline_prompt_command { if [[ -n "${POWERLINE_PROMPT_DISTRO_LOGO}" ]]; then - LEFT_PROMPT+="$(set_color ${PROMPT_DISTRO_LOGO_COLOR} ${PROMPT_DISTRO_LOGO_COLORBG})${PROMPT_DISTRO_LOGO}" + LEFT_PROMPT+="$(set_color ${PROMPT_DISTRO_LOGO_COLOR} ${PROMPT_DISTRO_LOGO_COLORBG})${PROMPT_DISTRO_LOGO}$(set_color - -)" fi ## left prompt ## diff --git a/themes/redline/redline.theme.bash b/themes/redline/redline.theme.bash index 0b482772..3d67e8a5 100644 --- a/themes/redline/redline.theme.bash +++ b/themes/redline/redline.theme.bash @@ -35,6 +35,9 @@ RBENV_THEME_PROMPT_SUFFIX="" RUBY_THEME_PROMPT_COLOR=161 RUBY_CHAR=${POWERLINE_RUBY_CHAR:=" "} +CWD_THEME_DIR_SEPARATOR="" +CWD_THEME_DIR_SEPARATOR_COLOR=52 + CWD_THEME_PROMPT_COLOR=238 HOST_THEME_PROMPT_COLOR=88