Skip to content
Merged
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
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ themes/oh-my-posh
themes/p4helpers.theme.bash
themes/pete
themes/powerline
themes/powerline-naked
themes/powerline-multiline
themes/pure
themes/purity
Expand Down
15 changes: 10 additions & 5 deletions themes/powerline-naked/powerline-naked.base.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
. "$BASH_IT/themes/powerline/powerline.base.bash"
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
# shellcheck source-path=SCRIPTDIR/../powerline
source "${BASH_IT?}/themes/powerline/powerline.base.bash"

function __powerline_left_segment {
local OLD_IFS="${IFS}"
Expand All @@ -18,19 +21,21 @@ function __powerline_left_segment {
fi
# Since the previous segment wasn't the last segment, add padding, if needed
#
if [[ "${POWERLINE_COMPACT_BEFORE_SEPARATOR}" -eq 0 ]]; then
if [[ "${POWERLINE_COMPACT_BEFORE_SEPARATOR:-0}" -eq 0 ]]; then
LEFT_PROMPT+=" "
fi
LEFT_PROMPT+="${POWERLINE_LEFT_SEPARATOR}"
fi

LEFT_PROMPT+="$(set_color ${params[1]} -)${pad_before_segment}${params[0]}${normal}"
LAST_SEGMENT_COLOR=${params[1]}
#change here to cahnge fg color
LEFT_PROMPT+="$(set_color "${params[1]:-}" -)${pad_before_segment}${params[0]}${normal?}"
#seperator char color == current bg
LAST_SEGMENT_COLOR="${params[1]:-}"
((SEGMENTS_AT_LEFT += 1))

_save-and-reload-history "${HISTORY_AUTOSAVE:-0}"
}

function __powerline_left_last_segment_padding {
LEFT_PROMPT+="$(set_color ${LAST_SEGMENT_COLOR} -) ${normal}"
LEFT_PROMPT+="$(set_color "${LAST_SEGMENT_COLOR?}" -) ${normal?}"
}
27 changes: 14 additions & 13 deletions themes/powerline-naked/powerline-naked.theme.bash
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/usr/bin/env bash

. "$BASH_IT/themes/powerline-naked/powerline-naked.base.bash"
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
# shellcheck source-path=SCRIPTDIR/../powerline
source "${BASH_IT?}/themes/powerline/powerline.base.bash"

PROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=""}
POWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=""}
: "${POWERLINE_LEFT_SEPARATOR:=""}"
POWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR=""

POWERLINE_COMPACT=${POWERLINE_COMPACT:=0}
POWERLINE_COMPACT_BEFORE_SEPARATOR=${POWERLINE_COMPACT_BEFORE_SEPARATOR:=${POWERLINE_COMPACT}}
POWERLINE_COMPACT_AFTER_SEPARATOR=${POWERLINE_COMPACT_AFTER_SEPARATOR:=${POWERLINE_COMPACT}}
POWERLINE_COMPACT_BEFOR_FIRST_SEGMENT=${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:=${POWERLINE_COMPACT}}
POWERLINE_COMPACT_AFTER_LAST_SEGMENT=${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:=${POWERLINE_COMPACT}}
POWERLINE_COMPACT_PROMPT=${POWERLINE_COMPACT_PROMPT:=${POWERLINE_COMPACT}}
: "${POWERLINE_COMPACT:=0}"
: "${POWERLINE_COMPACT_BEFORE_SEPARATOR:=${POWERLINE_COMPACT}}"
: "${POWERLINE_COMPACT_AFTER_SEPARATOR:=${POWERLINE_COMPACT}}"
: "${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:=${POWERLINE_COMPACT}}"
: "${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:=${POWERLINE_COMPACT}}"
: "${POWERLINE_COMPACT_PROMPT:=${POWERLINE_COMPACT}}"

POWERLINE_PROMPT_FOREGROUND_COLOR=${POWERLINE_PROMPT_FOREGROUND_COLOR:=-}

Expand Down Expand Up @@ -66,12 +67,12 @@ LAST_STATUS_THEME_PROMPT_COLOR=${POWERLINE_LAST_STATUS_COLOR:=124}

CLOCK_THEME_PROMPT_COLOR=${POWERLINE_CLOCK_COLOR:=240}

BATTERY_AC_CHAR=${BATTERY_AC_CHAR:="⚡"}
: "${BATTERY_AC_CHAR:="⚡"}"
BATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=${POWERLINE_BATTERY_GOOD_COLOR:=70}
BATTERY_STATUS_THEME_PROMPT_LOW_COLOR=${POWERLINE_BATTERY_LOW_COLOR:=208}
BATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=${POWERLINE_BATTERY_CRITICAL_COLOR:=160}

THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:="%H:%M:%S"}
: "${THEME_CLOCK_FORMAT:="%H:%M:%S"}"

IN_VIM_THEME_PROMPT_COLOR=${POWERLINE_IN_VIM_COLOR:=245}
IN_VIM_THEME_PROMPT_TEXT=${POWERLINE_IN_VIM_TEXT:="vim"}
Expand All @@ -96,6 +97,6 @@ COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
GCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}
GCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:="❲G❳ "}

POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}
: "${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}"

safe_append_prompt_command __powerline_prompt_command
Loading