Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

themes/powerline: Set terminal title #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions themes/brainy/brainy.theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function ___brainy_prompt_user_info {
color=$_omb_prompt_bold_navy
if [ "${THEME_SHOW_SUDO}" == "true" ]; then
if [ $(sudo -n id -u 2>&1 | grep 0) ]; then
color=$_omb_prompt_bold_brown
color=$_omb_prompt_bold_purple
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems unrelated to setting the terminal title.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I commented on #161 (comment), these changes are likely to be their personal settings, but not the changes intended for the PR.

fi
fi
box="[|]"
Expand Down Expand Up @@ -122,7 +122,8 @@ function ___brainy_prompt_python {
[ "${THEME_SHOW_PYTHON}" != "true" ] && return
color=$_omb_prompt_bold_olive
box="[|]"
info="$(python_version_prompt)"
info="$(_omb_prompt_print_virtualenv)$(_omb_prompt_print_condaenv)"
[ -z "${info}" ] && return
printf "%s|%s|%s|%s" "${color}" "${info}" "${_omb_prompt_bold_navy}" "${box}"
}

Expand Down Expand Up @@ -256,7 +257,7 @@ export SCM_THEME_PROMPT_CLEAN=" ${_omb_prompt_bold_green}✓${_omb_prompt_normal
THEME_SHOW_SUDO=${THEME_SHOW_SUDO:-"true"}
THEME_SHOW_SCM=${THEME_SHOW_SCM:-"true"}
THEME_SHOW_RUBY=${THEME_SHOW_RUBY:-"false"}
THEME_SHOW_PYTHON=${THEME_SHOW_PYTHON:-"false"}
THEME_SHOW_PYTHON=${THEME_SHOW_PYTHON:-"true"}
Comment on lines -259 to +260
Copy link
Contributor

@RobLoach RobLoach Sep 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also seems unrelated to the title.

THEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-"true"}
THEME_SHOW_TODO=${THEME_SHOW_TODO:-"false"}
THEME_SHOW_BATTERY=${THEME_SHOW_BATTERY:-"false"}
Expand Down Expand Up @@ -288,7 +289,7 @@ function __brainy_ps2 {
function _omb_theme_PROMPT_COMMAND {
exitcode="$?"

PS1="$(__brainy_ps1)"
PS1="\[\e]0;\u@\h: \w\a\]$(__brainy_ps1)"
PS2="$(__brainy_ps2)"
}

Expand Down
2 changes: 1 addition & 1 deletion themes/powerline/powerline.base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function __powerline_prompt_command {
[[ "${last_status}" -ne 0 ]] && __powerline_left_segment $(__powerline_last_status_prompt ${last_status})
[[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${_omb_prompt_normal}"

PS1="${LEFT_PROMPT} "
PS1="\[\e]0;\u@\h: \w\a\]${LEFT_PROMPT} "

## cleanup ##
unset LAST_SEGMENT_COLOR \
Expand Down
Loading