From 4b451fbc8aa91f0d2b2cc839ff1529a35cc95bec Mon Sep 17 00:00:00 2001 From: romkatv Date: Tue, 19 Nov 2019 10:43:51 +0100 Subject: [PATCH] =?UTF-8?q?replace=20=E2=86=B5=20with=20=E2=9C=98=20in=20c?= =?UTF-8?q?onfig=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some terminals are unable to display ↵ even when using fonts that have this ghyph. See #326. --- config/p10k-classic.zsh | 6 +++--- config/p10k-lean.zsh | 6 +++--- config/p10k-rainbow.zsh | 6 +++--- internal/wizard.zsh | 14 ++++++-------- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 10c5809..421e5df 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -455,20 +455,20 @@ # it will signify error by turning red. typeset -g POWERLEVEL9K_STATUS_ERROR=true typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' # Status when the last command was terminated by a signal. typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 # Use terse signal names: "INT" instead of "SIGINT(2)". typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' # Status when some part of a pipe command fails and the overall exit status is also non-zero. # It may look like this: 1|0. typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' ###################[ command_execution_time: duration of the last command ]################### # Show duration of the last command if takes longer than this many seconds. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 0e0b1c2..e9b7664 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -448,20 +448,20 @@ # it will signify error by turning red. typeset -g POWERLEVEL9K_STATUS_ERROR=false typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' # Status when the last command was terminated by a signal. typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 # Use terse signal names: "INT" instead of "SIGINT(2)". typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' # Status when some part of a pipe command fails and the overall exit status is also non-zero. # It may look like this: 1|0. typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' ###################[ command_execution_time: duration of the last command ]################### # Show duration of the last command if takes longer than this many seconds. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index fddefbb..af3bbb2 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -445,7 +445,7 @@ # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as # it will signify error by turning red. typeset -g POWERLEVEL9K_STATUS_ERROR=true - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' # typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 # typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 @@ -453,14 +453,14 @@ typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true # Use terse signal names: "INT" instead of "SIGINT(2)". typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' # typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 # typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 # Status when some part of a pipe command fails and the overall exit status is also non-zero. # It may look like this: 1|0. typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='↵' + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' # typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 # typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 1eed65e..15b2eab 100755 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1443,15 +1443,13 @@ function generate_config() { sub VPN_IP_VISUAL_IDENTIFIER_EXPANSION "'\${P9K_VISUAL_IDENTIFIER}'" fi + if [[ $POWERLEVEL9K_MODE == compatible ]]; then + sub STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION "'х'" + sub STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION "'х'" + sub STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION "'х'" + fi + if [[ $POWERLEVEL9K_MODE == (compatible|powerline) ]]; then - # Many fonts don't have the default icons. - [[ $POWERLEVEL9K_MODE == compatible ]] && local error='х' || local error='✘' - uncomment 'typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION' - sub STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION "'$error'" - uncomment 'typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION' - sub STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION "'$error'" - uncomment 'typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION' - sub STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION "'$error'" uncomment 'typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION' sub DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION "'∅'" uncomment 'typeset -g POWERLEVEL9K_TERRAFORM_VISUAL_IDENTIFIER_EXPANSION'