Skip to content

Commit

Permalink
Merge pull request #2041 from gaelicWizard/theme/sudo
Browse files Browse the repository at this point in the history
lib/theme: disable THEME_CHECK_SUDO
  • Loading branch information
NoahGorny committed Jan 25, 2022
2 parents 035eaba + 18536ed commit dd83efc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions template/bash_profile.template.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export BASH_IT="{{BASH_IT}}"
# location /.bash_it/themes/
export BASH_IT_THEME='bobby'

# Some themes can show whether `sudo` has a current token or not.
# Set `$THEME_CHECK_SUDO` to `true` to check every prompt:
#THEME_CHECK_SUDO='true'

# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
# export BASH_IT_REMOTE='bash-it'
Expand Down
4 changes: 3 additions & 1 deletion themes/base.theme.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ SCM_THEME_CURRENT_USER_SUFFIX=''
SCM_THEME_CHAR_PREFIX=''
SCM_THEME_CHAR_SUFFIX=''

THEME_BATTERY_PERCENTAGE_CHECK=${THEME_BATTERY_PERCENTAGE_CHECK:=true}
# Define this here so it can be used by all of the themes
: "${THEME_CHECK_SUDO:=false}"
: "${THEME_BATTERY_PERCENTAGE_CHECK:=true}"

SCM_GIT_SHOW_DETAILS=${SCM_GIT_SHOW_DETAILS:=true}
SCM_GIT_SHOW_REMOTE_INFO=${SCM_GIT_SHOW_REMOTE_INFO:=auto}
Expand Down
2 changes: 0 additions & 2 deletions themes/gitline/powerline.base.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Sudo check after every command
THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=true}

#To set color for foreground and background
function set_color {
Expand Down
3 changes: 0 additions & 3 deletions themes/powerline/powerline.base.bash
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

# Define this here so it can be used by all of the Powerline themes
THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=true}

function set_color() {
local fg='' bg=''
if [[ "${1:-}" != "-" ]]; then
Expand Down

0 comments on commit dd83efc

Please sign in to comment.