1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 13:30:07 +00:00

Merge branch 'brent-moffit-master'

This commit is contained in:
Roman Perepelitsa 2022-10-08 16:13:48 +02:00
commit f89b54faf2
6 changed files with 42 additions and 0 deletions

View file

@ -95,6 +95,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
# arch # current CPU Architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
newline # \n newline # \n
@ -1560,6 +1561,10 @@
# P9K_WIFI_NOISE | noise in dBm, from -120 to 0 # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
# P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
##############################[ arch: current cup architecture ]##############################
# Default CPU Aricheture (section is hidden when current architecture matches default)
# typeset -g POWERLEVEL9K_ARCH_DEFAULT='i386'
####################################[ time: current time ]#################################### ####################################[ time: current time ]####################################
# Current time color. # Current time color.
typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 typeset -g POWERLEVEL9K_TIME_FOREGROUND=66

View file

@ -94,6 +94,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
# arch # current CPU Architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
newline # \n newline # \n
@ -1541,6 +1542,10 @@
# P9K_WIFI_NOISE | noise in dBm, from -120 to 0 # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
# P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
##############################[ arch: current cup architecture ]##############################
# Default CPU Aricheture (section is hidden when current architecture matches default)
# typeset -g POWERLEVEL9K_ARCH_DEFAULT='i386'
####################################[ time: current time ]#################################### ####################################[ time: current time ]####################################
# Current time color. # Current time color.
typeset -g POWERLEVEL9K_TIME_FOREGROUND=6 typeset -g POWERLEVEL9K_TIME_FOREGROUND=6

View file

@ -94,6 +94,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
# arch # current CPU Architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
newline newline
@ -1537,6 +1538,10 @@
# P9K_WIFI_NOISE | noise in dBm, from -120 to 0 # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
# P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
##############################[ arch: current cup architecture ]##############################
# Default CPU Aricheture (section is hidden when current architecture matches default)
# typeset -g POWERLEVEL9K_ARCH_DEFAULT='i386'
####################################[ time: current time ]#################################### ####################################[ time: current time ]####################################
# Current time color. # Current time color.
typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 typeset -g POWERLEVEL9K_TIME_FOREGROUND=66

View file

@ -95,6 +95,7 @@
todo # todo items (https://github.com/todotxt/todo.txt-cli) todo # todo items (https://github.com/todotxt/todo.txt-cli)
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
# arch # current CPU Architecture
# time # current time # time # current time
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
newline newline
@ -1645,6 +1646,10 @@
# P9K_WIFI_NOISE | noise in dBm, from -120 to 0 # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
# P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
##############################[ arch: current cup architecture ]##############################
# Default CPU Aricheture (section is hidden when current architecture matches default)
# typeset -g POWERLEVEL9K_ARCH_DEFAULT='i386'
####################################[ time: current time ]#################################### ####################################[ time: current time ]####################################
# Current time color. # Current time color.
typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 typeset -g POWERLEVEL9K_TIME_FOREGROUND=0

View file

@ -148,6 +148,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl' JULIA_ICON 'jl'
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON '\uE205' # 
) )
;; ;;
'awesome-fontconfig') 'awesome-fontconfig')
@ -280,6 +281,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl' JULIA_ICON 'jl'
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON '\uE205' # 
) )
;; ;;
'awesome-mapped-fontconfig') 'awesome-mapped-fontconfig')
@ -415,6 +417,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl' JULIA_ICON 'jl'
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON '\uE205' # 
) )
;; ;;
'nerdfont-complete'|'nerdfont-fontconfig') 'nerdfont-complete'|'nerdfont-fontconfig')
@ -548,6 +551,7 @@ function _p9k_init_icons() {
JULIA_ICON '\uE624' #  JULIA_ICON '\uE624' # 
SCALA_ICON '\uE737' #  SCALA_ICON '\uE737' # 
TOOLBOX_ICON '\uE20F'$s #  TOOLBOX_ICON '\uE20F'$s # 
ARCH_ICON '\uE266'
) )
;; ;;
ascii) ascii)
@ -810,6 +814,7 @@ function _p9k_init_icons() {
JULIA_ICON 'jl' JULIA_ICON 'jl'
SCALA_ICON 'scala' SCALA_ICON 'scala'
TOOLBOX_ICON '\u2B22' # ⬢ TOOLBOX_ICON '\u2B22' # ⬢
ARCH_ICON '\uE205' # 
) )
;; ;;
esac esac

View file

@ -5644,6 +5644,23 @@ _p9k_prompt_haskell_stack_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$commands[stack]' 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" "$_p9k_color1" "orange1" 'ARCH_ICON' 0 '' "$_p9k__cache_val[1]"
}
instant_prompt_arch() { prompt_arch; }
_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 # 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. # YSU_HARDCORE=1. See https://github.com/romkatv/powerlevel10k/issues/427.
_p9k_preexec1() { _p9k_preexec1() {