aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/icons.zsh5
-rw-r--r--internal/p10k.zsh15
2 files changed, 20 insertions, 0 deletions
diff --git a/internal/icons.zsh b/internal/icons.zsh
index e3d71ffa..c67bc45d 100644
--- a/internal/icons.zsh
+++ b/internal/icons.zsh
@@ -148,6 +148,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
+ ARCH_ICON '\uE205' # 
)
;;
'awesome-fontconfig')
@@ -280,6 +281,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
+ ARCH_ICON '\uE205' # 
)
;;
'awesome-mapped-fontconfig')
@@ -415,6 +417,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
+ ARCH_ICON '\uE205' # 
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
@@ -548,6 +551,7 @@ function _p9k_init_icons() {
JULIA_ICON '\uE624' # 
SCALA_ICON '\uE737' # 
TOOLBOX_ICON '\uE20F'$s # 
+ ARCH_ICON '\uE266'
)
;;
ascii)
@@ -810,6 +814,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl'
SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢
+ ARCH_ICON '\uE205' # 
)
;;
esac
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index e797a874..26e43eec 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5625,6 +5625,21 @@ _p9k_prompt_haskell_stack_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[stack]'
}
+################################################################
+# CPU Architecture
+prompt_arch() {
+ if ! _p9k_cache_ephemeral_get $0 ; then
+ _p9k_cache_ephemeral_set $(arch)
+ fi
+ [[ $_p9k__cache_val[1] == $POWERLEVEL9K_ARCH_DEFAULT ]] && return
+ _p9k_prompt_segment "$0" "orange1" "black" 'ARCH_ICON' 0 '' "$_p9k__cache_val[1]"
+}
+
+_p9k_prompt_arch_init() {
+ echo 'arch init' >> ~/p9k_debug.txt
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[arch]'
+}
+
# Use two preexec hooks to survive https://github.com/MichaelAquilina/zsh-you-should-use with
# YSU_HARDCORE=1. See https://github.com/romkatv/powerlevel10k/issues/427.
_p9k_preexec1() {