mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 13:30:07 +00:00
detect artix linux for the sake of displaying os logo; see #898
This commit is contained in:
parent
86b747f434
commit
7a114ad6fb
3 changed files with 13 additions and 1 deletions
|
@ -68,6 +68,7 @@ function _p9k_init_icons() {
|
|||
LINUX_SABAYON_ICON '\uE271'$s #
|
||||
LINUX_SLACKWARE_ICON '\uE271'$s #
|
||||
LINUX_VOID_ICON '\uE271'$s #
|
||||
LINUX_ARTIX_ICON '\uE271'$s #
|
||||
SUNOS_ICON '\U1F31E'$q # 🌞
|
||||
HOME_ICON '\uE12C'$s #
|
||||
HOME_SUB_ICON '\uE18D'$s #
|
||||
|
@ -198,6 +199,7 @@ function _p9k_init_icons() {
|
|||
LINUX_SABAYON_ICON '\uF17C'$s #
|
||||
LINUX_SLACKWARE_ICON '\uF17C'$s #
|
||||
LINUX_VOID_ICON '\uF17C'$s #
|
||||
LINUX_ARTIX_ICON '\uF17C'$s #
|
||||
SUNOS_ICON '\uF185 ' #
|
||||
HOME_ICON '\uF015'$s #
|
||||
HOME_SUB_ICON '\uF07C'$s #
|
||||
|
@ -329,6 +331,7 @@ function _p9k_init_icons() {
|
|||
LINUX_SABAYON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
|
||||
LINUX_SLACKWARE_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
|
||||
LINUX_VOID_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
|
||||
LINUX_ARTIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
|
||||
SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }"
|
||||
HOME_ICON "${CODEPOINT_OF_AWESOME_HOME:+\\u$CODEPOINT_OF_AWESOME_HOME$s}"
|
||||
HOME_SUB_ICON "${CODEPOINT_OF_AWESOME_FOLDER_OPEN:+\\u$CODEPOINT_OF_AWESOME_FOLDER_OPEN$s}"
|
||||
|
@ -452,6 +455,7 @@ function _p9k_init_icons() {
|
|||
LINUX_SABAYON_ICON '\uF317'$s #
|
||||
LINUX_SLACKWARE_ICON '\uF319'$s #
|
||||
LINUX_VOID_ICON '\uF17C' #
|
||||
LINUX_ARTIX_ICON '\uF17C' #
|
||||
LINUX_UBUNTU_ICON '\uF31b'$s #
|
||||
LINUX_ICON '\uF17C' #
|
||||
SUNOS_ICON '\uF185 ' #
|
||||
|
@ -578,6 +582,7 @@ function _p9k_init_icons() {
|
|||
LINUX_SABAYON_ICON 'sabayon'
|
||||
LINUX_SLACKWARE_ICON 'slack'
|
||||
LINUX_VOID_ICON 'void'
|
||||
LINUX_ARTIX_ICON 'artix'
|
||||
SUNOS_ICON 'sunos'
|
||||
HOME_ICON ''
|
||||
HOME_SUB_ICON ''
|
||||
|
@ -704,6 +709,7 @@ function _p9k_init_icons() {
|
|||
LINUX_SABAYON_ICON 'Sab'
|
||||
LINUX_SLACKWARE_ICON 'Sla'
|
||||
LINUX_VOID_ICON 'Vo'
|
||||
LINUX_ARTIX_ICON 'Art'
|
||||
SUNOS_ICON 'Sun'
|
||||
HOME_ICON ''
|
||||
HOME_SUB_ICON ''
|
||||
|
|
|
@ -7742,7 +7742,7 @@ _p9k_must_init() {
|
|||
[[ $sig == $_p9k__param_sig ]] && return 1
|
||||
_p9k_deinit
|
||||
fi
|
||||
_p9k__param_pat=$'v101\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
|
||||
_p9k__param_pat=$'v102\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
|
||||
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
|
||||
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
|
||||
_p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1'
|
||||
|
@ -7838,6 +7838,8 @@ function _p9k_init_cacheable() {
|
|||
local lines=(${(f)"$(</etc/os-release)"})
|
||||
lines=(${(@M)lines:#ID=*})
|
||||
(( $#lines == 1 )) && os_release_id=${lines[1]#ID=}
|
||||
elif [[ -e /etc/artix-release ]]; then
|
||||
os_release_id=artix
|
||||
fi
|
||||
case $os_release_id in
|
||||
*arch*) _p9k_set_os Linux LINUX_ARCH_ICON;;
|
||||
|
@ -7860,6 +7862,7 @@ function _p9k_init_cacheable() {
|
|||
*devuan*) _p9k_set_os Linux LINUX_DEVUAN_ICON;;
|
||||
*manjaro*) _p9k_set_os Linux LINUX_MANJARO_ICON;;
|
||||
*void*) _p9k_set_os Linux LINUX_VOID_ICON;;
|
||||
*artix*) _p9k_set_os Linux LINUX_ARTIX_ICON;;
|
||||
*) _p9k_set_os Linux LINUX_ICON;;
|
||||
esac
|
||||
;;
|
||||
|
|
|
@ -1047,6 +1047,8 @@ function os_icon_name() {
|
|||
local lines=(${(f)"$(</etc/os-release)"})
|
||||
lines=(${(@M)lines:#ID=*})
|
||||
(( $#lines == 1 )) && os_release_id=${lines[1]#ID=}
|
||||
elif [[ -e /etc/artix-release ]]; then
|
||||
os_release_id=artix
|
||||
fi
|
||||
case $os_release_id in
|
||||
*arch*) echo LINUX_ARCH_ICON;;
|
||||
|
@ -1069,6 +1071,7 @@ function os_icon_name() {
|
|||
*devuan*) echo LINUX_DEVUAN_ICON;;
|
||||
*manjaro*) echo LINUX_MANJARO_ICON;;
|
||||
*void*) echo LINUX_VOID_ICON;;
|
||||
*artix*) echo LINUX_ARTIX_ICON;;
|
||||
*) echo LINUX_ICON;;
|
||||
esac
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue