From b3abfc089a86f6a4e71d91c46361f3f56acd6b9f Mon Sep 17 00:00:00 2001
From: romkatv <roman.perepelitsa@gmail.com>
Date: Mon, 26 Aug 2019 12:05:42 +0200
Subject: fix detection of awesome-mapped-fontconfig in the wizard

---
 internal/configure.zsh | 8 +++++++-
 internal/p10k.zsh      | 9 ++++++++-
 internal/wizard.zsh    | 7 +++++--
 3 files changed, 20 insertions(+), 4 deletions(-)

(limited to 'internal')

diff --git a/internal/configure.zsh b/internal/configure.zsh
index d7a253d9..c04ad413 100644
--- a/internal/configure.zsh
+++ b/internal/configure.zsh
@@ -60,6 +60,12 @@ function _p9k_can_configure() {
 
 function p9k_configure() {
   emulate -L zsh && setopt no_hist_expand extended_glob
-  $__p9k_root_dir/internal/wizard.zsh -d $__p9k_root_dir -f || return
+  (
+    local p=("${(@)parameters[(I)AWESOME_*|CODEPOINT_*]}")
+    if (( $#p )); then
+      typeset -x -- $p
+    fi
+    $__p9k_root_dir/internal/wizard.zsh -d $__p9k_root_dir -f $awesome
+  ) || return
   source $__p9k_cfg_path
 }
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 0c9948f8..ab1db6f6 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3243,7 +3243,14 @@ _p9k_precmd() {
     if (( !__p9k_configured )); then
       __p9k_configured=1
       if [[ "${parameters[(I)POWERLEVEL9K_*]}" == (POWERLEVEL9K_MODE|) ]] && _p9k_can_configure -q; then
-        if $__p9k_root_dir/internal/wizard.zsh -d $__p9k_root_dir; then
+        (
+          local p=("${(@)parameters[(I)AWESOME_*|CODEPOINT_*]}")
+          if (( $#p )); then
+            typeset -x -- $p
+          fi
+          $__p9k_root_dir/internal/wizard.zsh -d $__p9k_root_dir -f $awesome
+        )
+        if (( !$? )); then
           source $__p9k_cfg_path
           _p9k_must_init
         fi
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 5c5572d9..df5a7d50 100755
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -292,7 +292,10 @@ function ask_narrow_icons() {
   text+="%3F${icons[DATE_ICON]// }%fX"
   text+="%4F${icons[TIME_ICON]// }%fX"
   text+="%5F${icons[RUBY_ICON]// }%fX"
-  text+="%6F${icons[AWS_EB_ICON]// }%fX"
+  text+="%6F${icons[HOME_ICON]// }%fX"
+  text+="%1F${icons[HOME_SUB_ICON]// }%fX"
+  text+="%2F${icons[FOLDER_ICON]// }%fX"
+  text+="%3F${icons[RAM_ICON]// }%fX"
   while true; do
     clear
     centered "%BDo all these icons %b%2Ffit between the crosses%f%B?%b"
@@ -1080,7 +1083,7 @@ while true; do
   local -a options=()
 
   ask_diamond || continue
-  if [[ -n $AWESOME_GLYPHS_LOADED ]]; then
+  if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then
     POWERLEVEL9K_MODE=awesome-mapped-fontconfig
   else
     ask_lock '\uF023' || continue
-- 
cgit v1.2.3