From a12f7ac8eefd47cd9b58b0ff77c576e194029a0c Mon Sep 17 00:00:00 2001 From: romkatv Date: Wed, 5 Feb 2020 12:50:51 +0100 Subject: when the user's locale is misconfigured, set it to utf8 at the top level fixes #469 --- internal/icons.zsh | 8 -------- 1 file changed, 8 deletions(-) (limited to 'internal/icons.zsh') diff --git a/internal/icons.zsh b/internal/icons.zsh index 012c520a..9c672b38 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -3,12 +3,6 @@ typeset -gA icons function _p9k_init_icons() { [[ $+_p9k_icon_mode == 1 && $_p9k_icon_mode == $POWERLEVEL9K_MODE/$POWERLEVEL9K_LEGACY_ICON_SPACING ]] && return typeset -g _p9k_icon_mode=$POWERLEVEL9K_MODE/$POWERLEVEL9K_LEGACY_ICON_SPACING - zmodload zsh/langinfo - if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then - typeset -g _p9k_locale=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8} - else - typeset -g _p9k_locale= - fi if [[ $POWERLEVEL9K_LEGACY_ICON_SPACING == true ]]; then local s= @@ -614,7 +608,6 @@ function _p9k_init_icons() { # Sadly, this is a part of public API. Its use is emphatically discouraged. function _p9k_print_icon() { _p9k_init_icons - [[ -z $_p9k_locale ]] || local LC_ALL=$_p9k_locale local icon_name=$1 local var_name=POWERLEVEL9K_${icon_name} if [[ -n "${(tP)var_name}" ]]; then @@ -631,7 +624,6 @@ function _p9k_print_icon() { # overrides into account. function _p9k_get_icon_names() { _p9k_init_icons - [[ -z $_p9k_locale ]] || local LC_ALL=$_p9k_locale # Iterate over a ordered list of keys of the icons array for key in ${(@kon)icons}; do echo -n "POWERLEVEL9K_$key: " -- cgit v1.2.3 From d7168759181d2b80689637b87083bca3e5279935 Mon Sep 17 00:00:00 2001 From: romkatv Date: Thu, 6 Feb 2020 08:44:03 +0100 Subject: replace terraform icon; several terminals have bugs that prevent them from rendering the current icon correctly --- internal/icons.zsh | 10 +++++----- internal/wizard.zsh | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'internal/icons.zsh') diff --git a/internal/icons.zsh b/internal/icons.zsh index 9c672b38..f5f4065b 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -115,7 +115,7 @@ function _p9k_init_icons() { RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' - TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ + TERRAFORM_ICON 'tf' PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ @@ -228,7 +228,7 @@ function _p9k_init_icons() { RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' - TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ + TERRAFORM_ICON 'tf' PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ @@ -345,7 +345,7 @@ function _p9k_init_icons() { RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' - TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ + TERRAFORM_ICON 'tf' PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ @@ -459,7 +459,7 @@ function _p9k_init_icons() { RANGER_ICON '\uF00b' #  MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON '\uE62B' #  - TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ + TERRAFORM_ICON '\uF1BB' #  PROXY_ICON '\u2B82' # ⮂ DOTNET_ICON '\uE77F' #  AZURE_ICON '\uFD03' # ﴃ @@ -572,7 +572,7 @@ function _p9k_init_icons() { RANGER_ICON '\u2B50' # ⭐ MIDNIGHT_COMMANDER_ICON 'mc' VIM_ICON 'vim' - TERRAFORM_ICON '\U1F6E0\u00A0' # 🛠️ + TERRAFORM_ICON 'tf' PROXY_ICON '\u2194' # ↔ DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 66150bb0..8162b7c2 100755 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1564,8 +1564,6 @@ function generate_config() { if [[ $POWERLEVEL9K_MODE == (compatible|powerline) ]]; then 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' - sub TERRAFORM_VISUAL_IDENTIFIER_EXPANSION "'tf'" uncomment 'typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION' sub RANGER_VISUAL_IDENTIFIER_EXPANSION "'▲'" uncomment 'typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION' -- cgit v1.2.3