Skip to content

Commit

Permalink
Use # for root
Browse files Browse the repository at this point in the history
Closes #19
  • Loading branch information
sobolevn authored May 5, 2024
1 parent 2174263 commit 6cd1554
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sobole.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# These settings changes how your terminal prompt looks like
# ----------------------------------------------------------------------------

if [[ "$USER" == "root" ]]; then
if [[ "$USER" == 'root' ]] || [[ "$(id -u "$USER")" == 0 ]]; then
CARETCOLOR="red"
elif [[ "$SOBOLE_THEME_MODE" == 'dark' ]]; then
CARETCOLOR='white'
Expand All @@ -39,9 +39,9 @@ RPROMPT='%{$(echotc UP 1)%} $(git_prompt_status) ${_return_status}%{$(echotc DO
function current_caret {
# This function sets caret color and sign
# based on theme and privileges.
if [[ "$USER" == 'root' ]]; then
if [[ "$USER" == 'root' ]] || [[ "$(id -u "$USER")" == 0 ]]; then
CARET_COLOR='red'
CARET_SIGN='$'
CARET_SIGN='#'
else
CARET_SIGN='»'

Expand Down

0 comments on commit 6cd1554

Please sign in to comment.