1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-22 04:10:07 +00:00

Merge branch 'romkatv:master' into battery-prompt-for-windows

This commit is contained in:
Li Haoyuan 2024-10-14 19:53:44 +08:00 committed by GitHub
commit 20fc7b8a26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 58 additions and 7 deletions

View file

@ -780,6 +780,12 @@ If you are using a different terminal, proceed with manual font installation.
} }
``` ```
**_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten. **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
- **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section
to it:
```ini
[basic.interface.font]
value = "MesloLGS NF"
```
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work 1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
incorrectly with the new font. incorrectly with the new font.

View file

@ -160,6 +160,12 @@ If you are using a different terminal, proceed with manual font installation.
} }
``` ```
**_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten. **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
- **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section
to it:
```ini
[basic.interface.font]
value = "MesloLGS NF"
```
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work 1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
incorrectly with the new font. incorrectly with the new font.

View file

@ -10,7 +10,7 @@ VERSION ?= $(shell . ./build.info && printf "%s" "$$gitstatus_version")
# #
# Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is # Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is
# missing in macOS prior to 10.13. # missing in macOS prior to 10.13.
CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall # -g -fsanitize=thread CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) # -Wall -g -fsanitize=thread
LDFLAGS += -pthread # -fsanitize=thread LDFLAGS += -pthread # -fsanitize=thread
LDLIBS += -lgit2 # -lprofiler -lunwind LDLIBS += -lgit2 # -lprofiler -lunwind

View file

@ -1,5 +1,9 @@
# gitstatus # gitstatus
- **THE PROJECT HAS VERY LIMITED SUPPORT**
- **NO NEW FEATURES ARE IN THE WORKS**
- **MOST BUGS WILL GO UNFIXED**
**gitstatus** is a 10x faster alternative to `git status` and `git describe`. Its primary use **gitstatus** is a 10x faster alternative to `git status` and `git describe`. Its primary use
case is to enable fast git prompt in interactive shells. case is to enable fast git prompt in interactive shells.

View file

@ -153,7 +153,16 @@ case "$gitstatus_cpu" in
;; ;;
esac esac
cflags="$archflag=$gitstatus_cpu -fno-plt -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie" case "$gitstatus_arch" in
e2k)
nopltflag=""
;;
*)
nopltflag="-fno-plt"
;;
esac
cflags="$archflag=$gitstatus_cpu $nopltflag -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie"
ldflags= ldflags=
static_pie= static_pie=
@ -384,6 +393,7 @@ CFLAGS="$libgit2_cflags" command cmake \
-DUSE_GSSAPI=OFF \ -DUSE_GSSAPI=OFF \
-DUSE_NTLMCLIENT=OFF \ -DUSE_NTLMCLIENT=OFF \
-DBUILD_SHARED_LIBS=OFF \ -DBUILD_SHARED_LIBS=OFF \
-G "Unix Makefiles" \
$libgit2_cmake_flags \ $libgit2_cmake_flags \
.. ..
command make -j "$cpus" VERBOSE=1 command make -j "$cpus" VERBOSE=1
@ -545,6 +555,7 @@ if [ -z "$gitstatus_cpu" ]; then
x86_64|amd64) gitstatus_cpu=x86-64;; x86_64|amd64) gitstatus_cpu=x86-64;;
x86) gitstatus_cpu=i586;; x86) gitstatus_cpu=i586;;
s390x) gitstatus_cpu=z900;; s390x) gitstatus_cpu=z900;;
e2k) gitstatus_cpu=native;;
i386|i586|i686) gitstatus_cpu="$gitstatus_arch";; i386|i586|i686) gitstatus_cpu="$gitstatus_arch";;
*) *)
>&2 echo '[error] unable to infer target CPU architecture' >&2 echo '[error] unable to infer target CPU architecture'

View file

@ -3,7 +3,7 @@
# #
# This value is also read by shell bindings (indirectly, through # This value is also read by shell bindings (indirectly, through
# ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd. # ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd.
gitstatus_version="v1.5.4" gitstatus_version="v1.5.5"
# libgit2 is a build time dependency of gitstatusd. The values of # libgit2 is a build time dependency of gitstatusd. The values of
# libgit2_version and libgit2_sha256 are read by ./build. # libgit2_version and libgit2_sha256 are read by ./build.

View file

@ -74,6 +74,7 @@ function _p9k_init_icons() {
LINUX_AMZN_ICON '\uE271'$s #  LINUX_AMZN_ICON '\uE271'$s # 
LINUX_ENDEAVOUROS_ICON '\uE271'$s #  LINUX_ENDEAVOUROS_ICON '\uE271'$s # 
LINUX_ROCKY_ICON '\uE271'$s #  LINUX_ROCKY_ICON '\uE271'$s # 
LINUX_ALMALINUX_ICON '\uE271'$s # 
LINUX_GUIX_ICON '\uE271'$s #  LINUX_GUIX_ICON '\uE271'$s # 
LINUX_NEON_ICON '\uE271'$s #  LINUX_NEON_ICON '\uE271'$s # 
SUNOS_ICON '\U1F31E'$q # 🌞 SUNOS_ICON '\U1F31E'$q # 🌞
@ -232,6 +233,7 @@ function _p9k_init_icons() {
LINUX_AMZN_ICON '\uF17C'$s #  LINUX_AMZN_ICON '\uF17C'$s # 
LINUX_ENDEAVOUROS_ICON '\uF17C'$s #  LINUX_ENDEAVOUROS_ICON '\uF17C'$s # 
LINUX_ROCKY_ICON '\uF17C'$s #  LINUX_ROCKY_ICON '\uF17C'$s # 
LINUX_ALMALINUX_ICON '\uF17C'$s # 
LINUX_GUIX_ICON '\uF17C'$s #  LINUX_GUIX_ICON '\uF17C'$s # 
LINUX_NEON_ICON '\uF17C'$s #  LINUX_NEON_ICON '\uF17C'$s # 
SUNOS_ICON '\uF185 ' #  SUNOS_ICON '\uF185 ' # 
@ -391,6 +393,7 @@ function _p9k_init_icons() {
LINUX_AMZN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_AMZN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ENDEAVOUROS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_ENDEAVOUROS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ROCKY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_ROCKY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ALMALINUX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_NEON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_NEON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }" SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }"
@ -543,6 +546,7 @@ function _p9k_init_icons() {
LINUX_AMZN_ICON '\uF270'$s #  LINUX_AMZN_ICON '\uF270'$s # 
LINUX_ENDEAVOUROS_ICON '\UF322'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s # 
LINUX_ROCKY_ICON '\UF32B'$s #  LINUX_ROCKY_ICON '\UF32B'$s # 
LINUX_ALMALINUX_ICON '\UF31D'$s # 
LINUX_GUIX_ICON '\UF325'$s #  LINUX_GUIX_ICON '\UF325'$s # 
LINUX_NEON_ICON '\uF17C' #  LINUX_NEON_ICON '\uF17C' # 
LINUX_ICON '\uF17C' #  LINUX_ICON '\uF17C' # 
@ -703,6 +707,7 @@ function _p9k_init_icons() {
LINUX_AMZN_ICON '\uF270'$s #  LINUX_AMZN_ICON '\uF270'$s # 
LINUX_ENDEAVOUROS_ICON '\uF17C' #  LINUX_ENDEAVOUROS_ICON '\uF17C' # 
LINUX_ROCKY_ICON '\uF17C' #  LINUX_ROCKY_ICON '\uF17C' # 
LINUX_ALMALINUX_ICON '\uF17C' # 
LINUX_GUIX_ICON '\uF325'$s #  LINUX_GUIX_ICON '\uF325'$s # 
LINUX_NEON_ICON '\uF17C' #  LINUX_NEON_ICON '\uF17C' # 
LINUX_ICON '\uF17C' #  LINUX_ICON '\uF17C' # 
@ -856,6 +861,7 @@ function _p9k_init_icons() {
LINUX_AMZN_ICON 'amzn' LINUX_AMZN_ICON 'amzn'
LINUX_ENDEAVOUROS_ICON 'edvos' LINUX_ENDEAVOUROS_ICON 'edvos'
LINUX_ROCKY_ICON 'rocky' LINUX_ROCKY_ICON 'rocky'
LINUX_ALMALINUX_ICON 'alma'
LINUX_GUIX_ICON 'guix' LINUX_GUIX_ICON 'guix'
LINUX_NEON_ICON 'neon' LINUX_NEON_ICON 'neon'
SUNOS_ICON 'sunos' SUNOS_ICON 'sunos'
@ -1010,6 +1016,7 @@ function _p9k_init_icons() {
LINUX_AMZN_ICON 'Amzn' LINUX_AMZN_ICON 'Amzn'
LINUX_ENDEAVOUROS_ICON 'Edv' LINUX_ENDEAVOUROS_ICON 'Edv'
LINUX_ROCKY_ICON 'Roc' LINUX_ROCKY_ICON 'Roc'
LINUX_ALMALINUX_ICON 'Alma'
LINUX_GUIX_ICON 'Guix' LINUX_GUIX_ICON 'Guix'
LINUX_NEON_ICON 'Neon' LINUX_NEON_ICON 'Neon'
SUNOS_ICON 'Sun' SUNOS_ICON 'Sun'

View file

@ -1179,7 +1179,7 @@ function _p9k_parse_aws_config() {
################################################################ ################################################################
# AWS Profile # AWS Profile
prompt_aws() { prompt_aws() {
typeset -g P9K_AWS_PROFILE="${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}" typeset -g P9K_AWS_PROFILE="${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}"
local pat class state local pat class state
for pat class in "${_POWERLEVEL9K_AWS_CLASSES[@]}"; do for pat class in "${_POWERLEVEL9K_AWS_CLASSES[@]}"; do
if [[ $P9K_AWS_PROFILE == ${~pat} ]]; then if [[ $P9K_AWS_PROFILE == ${~pat} ]]; then
@ -5870,7 +5870,7 @@ _p9k_preexec2() {
typeset -g _p9k__preexec_cmd=$2 typeset -g _p9k__preexec_cmd=$2
_p9k__timer_start=EPOCHREALTIME _p9k__timer_start=EPOCHREALTIME
P9K_TTY=old P9K_TTY=old
(( ! $+_p9k__iterm_cmd )) || _p9k_iterm2_preexec (( ! $+_p9k__iterm_cmd )) || _p9k_iterm2_preexec "$1"
} }
function _p9k_prompt_net_iface_init() { function _p9k_prompt_net_iface_init() {
@ -8719,6 +8719,7 @@ function _p9k_init_cacheable() {
amzn) _p9k_set_os Linux LINUX_AMZN_ICON;; amzn) _p9k_set_os Linux LINUX_AMZN_ICON;;
endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;; endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;;
rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;; rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;;
almalinux) _p9k_set_os Linux LINUX_ALMALINUX_ICON;;
guix) _p9k_set_os Linux LINUX_GUIX_ICON;; guix) _p9k_set_os Linux LINUX_GUIX_ICON;;
neon) _p9k_set_os Linux LINUX_NEON_ICON;; neon) _p9k_set_os Linux LINUX_NEON_ICON;;
*) _p9k_set_os Linux LINUX_ICON;; *) _p9k_set_os Linux LINUX_ICON;;
@ -8935,7 +8936,17 @@ function _p9k_iterm2_precmd() {
} }
function _p9k_iterm2_preexec() { function _p9k_iterm2_preexec() {
[[ -t 1 ]] && builtin print -n '\e]133;C;\a' if [[ -t 1 ]]; then
if (( ${+__p9k_use_osc133_c_cmdline} )); then
() {
emulate -L zsh -o extended_glob -o no_multibyte
local MATCH MBEGIN MEND
builtin printf '\e]133;C;cmdline_url=%s\a' "${1//(#m)[^a-zA-Z0-9"\/:_.-!'()~"]/%${(l:2::0:)$(([##16]#MATCH))}}"
} "$1"
else
builtin print -n '\e]133;C;\a'
fi
fi
typeset -gi _p9k__iterm_cmd=2 typeset -gi _p9k__iterm_cmd=2
} }
@ -9140,6 +9151,7 @@ _p9k_precmd_first() {
if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then
KITTY_SHELL_INTEGRATION+=' no-prompt-mark' KITTY_SHELL_INTEGRATION+=' no-prompt-mark'
(( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1 (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1
(( $+__p9k_use_osc133_c_cmdline )) || typeset -gri __p9k_use_osc133_c_cmdline=1
elif [[ $TERM_PROGRAM == WarpTerminal ]]; then elif [[ $TERM_PROGRAM == WarpTerminal ]]; then
(( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1 (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1
fi fi
@ -9541,7 +9553,11 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p
zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null
fi fi
typeset -g P9K_VERSION=1.20.10 typeset -g P9K_VERSION=1.20.13
if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then
typeset -gri __p9k_force_term_shell_integration=1
fi
unset VSCODE_SHELL_INTEGRATION unset VSCODE_SHELL_INTEGRATION
_p9k_init_ssh _p9k_init_ssh

View file

@ -1164,6 +1164,7 @@ function os_icon_name() {
amzn) echo LINUX_AMZN_ICON;; amzn) echo LINUX_AMZN_ICON;;
endeavouros) echo LINUX_ENDEAVOUROS_ICON;; endeavouros) echo LINUX_ENDEAVOUROS_ICON;;
rocky) echo LINUX_ROCKY_ICON;; rocky) echo LINUX_ROCKY_ICON;;
almalinux) echo LINUX_ALMALINUX_ICON;;
guix) echo LINUX_GUIX_ICON;; guix) echo LINUX_GUIX_ICON;;
neon) echo LINUX_NEON_ICON;; neon) echo LINUX_NEON_ICON;;
*) echo LINUX_ICON;; *) echo LINUX_ICON;;