diff --git a/bash/bashrc b/bash/bashrc index 768ca43a..1f6ef57e 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -137,6 +137,13 @@ function h() { fi } + +# Google Stuff +if `env | grep -q google`; then + . ~/.google_rc +fi + + # Check Starship is installed if which starship &>/dev/null; then if [ $SHELL == '/bin/zsh' ]; then @@ -160,3 +167,4 @@ for bcfile in ~/.bash_completion.d/*; do done fi done + diff --git a/config.yaml b/config.yaml index a6beb3d1..01c40b9e 100644 --- a/config.yaml +++ b/config.yaml @@ -51,6 +51,12 @@ if: '`command -v git >/dev/null 2>&1`' path: git + + ## Google + ~/.google_rc: + if: 'env | grep -q google' + path: google/google_rc + # - create: # - ~/downloads # - ~/.vim/undo-history diff --git a/google/google_rc b/google/google_rc index 9f28276e..1a926296 100644 --- a/google/google_rc +++ b/google/google_rc @@ -25,13 +25,17 @@ _display_bug_machine_info() { # If the combined output string is not empty, print it if [ -n "$output" ]; then - echo "$output" # echo adds the needed newline after the combined string + if [ -n "$STARSHIP_SESSION_KEY" ]; then + printf "%s" "$output" # echo adds the needed newline after the combined string + else + echo "$output" + fi fi return 0 } -if [[ ! "$PROMPT_COMMAND" =~ _display_bug_machine_info_bash ]]; then +if [[ ! "$PROMPT_COMMAND" =~ _display_bug_machine_info ]]; then # Prepend the function call PROMPT_COMMAND="_display_bug_machine_info${PROMPT_COMMAND:+;}${PROMPT_COMMAND}" fi diff --git a/starship/.config/starship.toml b/starship/.config/starship.toml index f69d14dc..49ea9818 100644 --- a/starship/.config/starship.toml +++ b/starship/.config/starship.toml @@ -1,3 +1,5 @@ +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' format = """ ${custom.tztime}\ @@ -36,12 +38,15 @@ $status # $username # """ +add_newline = false + [fill] symbol = ' ' disabled = false + [line_break] -disabled = false +disabled = true [aws] format = '\[AWS: [$profile/($region)]($style)\]'