1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 13:41:56 +00:00

Merge pull request #758 from sambadevi/next

Add icons for more distros in os_icon segment
This commit is contained in:
Ben Hilburn 2018-03-06 21:12:09 -05:00 committed by GitHub
commit 6529b4f2a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 112 additions and 2 deletions

0
functions/colors.zsh Normal file → Executable file
View file

65
functions/icons.zsh Normal file → Executable file
View file

@ -47,6 +47,19 @@ case $POWERLEVEL9K_MODE in
FREEBSD_ICON $'\U1F608 ' # 😈 FREEBSD_ICON $'\U1F608 ' # 😈
ANDROID_ICON $'\uE270' #  ANDROID_ICON $'\uE270' # 
LINUX_ICON $'\uE271' #  LINUX_ICON $'\uE271' # 
LINUX_ARCH_ICON 'Arc'
LINUX_DEBIAN_ICON 'Deb'
LINUX_UBUNTU_ICON 'Ubu'
LINUX_CENTOS_ICON 'Cen'
LINUX_COREOS_ICON 'Cor'
LINUX_ELEMENTARY_ICON 'Elm'
LINUX_MINT_ICON 'LMi'
LINUX_FEDORA_ICON 'Fed'
LINUX_GENTOO_ICON 'Gen'
LINUX_MAGEIA_ICON 'Mag'
LINUX_OPENSUSE_ICON 'OSu'
LINUX_SABAYON_ICON 'Sab'
LINUX_SLACKWARE_ICON 'Sla'
SUNOS_ICON $'\U1F31E ' # 🌞 SUNOS_ICON $'\U1F31E ' # 🌞
HOME_ICON $'\uE12C' #  HOME_ICON $'\uE12C' # 
HOME_SUB_ICON $'\uE18D' #  HOME_SUB_ICON $'\uE18D' # 
@ -125,6 +138,19 @@ case $POWERLEVEL9K_MODE in
FREEBSD_ICON $'\U1F608 ' # 😈 FREEBSD_ICON $'\U1F608 ' # 😈
ANDROID_ICON $'\uE17B' #  ANDROID_ICON $'\uE17B' # 
LINUX_ICON $'\uF17C' #  LINUX_ICON $'\uF17C' # 
LINUX_ARCH_ICON 'Arc'
LINUX_DEBIAN_ICON 'Deb'
LINUX_UBUNTU_ICON 'Ubu'
LINUX_CENTOS_ICON 'Cen'
LINUX_COREOS_ICON 'Cor'
LINUX_ELEMENTARY_ICON 'Elm'
LINUX_MINT_ICON 'LMi'
LINUX_FEDORA_ICON 'Fed'
LINUX_GENTOO_ICON 'Gen'
LINUX_MAGEIA_ICON 'Mag'
LINUX_OPENSUSE_ICON 'OSu'
LINUX_SABAYON_ICON 'Sab'
LINUX_SLACKWARE_ICON 'Sla'
SUNOS_ICON $'\uF185 ' #  SUNOS_ICON $'\uF185 ' # 
HOME_ICON $'\uF015' #  HOME_ICON $'\uF015' # 
HOME_SUB_ICON $'\uF07C' #  HOME_SUB_ICON $'\uF07C' # 
@ -205,6 +231,19 @@ case $POWERLEVEL9K_MODE in
APPLE_ICON '\u'$CODEPOINT_OF_AWESOME_APPLE #  APPLE_ICON '\u'$CODEPOINT_OF_AWESOME_APPLE # 
FREEBSD_ICON $'\U1F608 ' # 😈 FREEBSD_ICON $'\U1F608 ' # 😈
LINUX_ICON '\u'$CODEPOINT_OF_AWESOME_LINUX #  LINUX_ICON '\u'$CODEPOINT_OF_AWESOME_LINUX # 
LINUX_ARCH_ICON 'Arc'
LINUX_DEBIAN_ICON 'Deb'
LINUX_UBUNTU_ICON 'Ubu'
LINUX_CENTOS_ICON 'Cen'
LINUX_COREOS_ICON 'Cor'
LINUX_ELEMENTARY_ICON 'Elm'
LINUX_MINT_ICON 'LMi'
LINUX_FEDORA_ICON 'Fed'
LINUX_GENTOO_ICON 'Gen'
LINUX_MAGEIA_ICON 'Mag'
LINUX_OPENSUSE_ICON 'OSu'
LINUX_SABAYON_ICON 'Sab'
LINUX_SLACKWARE_ICON 'Sla'
SUNOS_ICON '\u'$CODEPOINT_OF_AWESOME_SUN_O' ' #  SUNOS_ICON '\u'$CODEPOINT_OF_AWESOME_SUN_O' ' # 
HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME #  HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME # 
HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN #  HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN # 
@ -278,6 +317,19 @@ case $POWERLEVEL9K_MODE in
WINDOWS_ICON $'\uF17A' #  WINDOWS_ICON $'\uF17A' # 
FREEBSD_ICON $'\UF30E ' #  FREEBSD_ICON $'\UF30E ' # 
ANDROID_ICON $'\uF17B' #  ANDROID_ICON $'\uF17B' # 
LINUX_ARCH_ICON $'\uF300' # 
LINUX_DEBIAN_ICON $'\uF302' # 
LINUX_UBUNTU_ICON $'\uF30C' # 
LINUX_CENTOS_ICON $'\uF301' # 
LINUX_COREOS_ICON $'\uF30F' # 
LINUX_ELEMENTARY_ICON $'\uF311' # 
LINUX_FEDORA_ICON $'\uF303' # 
LINUX_GENTOO_ICON $'\uF310' # 
LINUX_MINT_ICON $'\uF304' # 
LINUX_MAGEIA_ICON $'\uF306' # 
LINUX_OPENSUSE_ICON $'\uF308' # 
LINUX_SABAYON_ICON $'\uF313' # 
LINUX_SLACKWARE_ICON $'\uF30A' # 
LINUX_ICON $'\uF17C' #  LINUX_ICON $'\uF17C' # 
SUNOS_ICON $'\uF185 ' #  SUNOS_ICON $'\uF185 ' # 
HOME_ICON $'\uF015' #  HOME_ICON $'\uF015' # 
@ -353,6 +405,19 @@ case $POWERLEVEL9K_MODE in
FREEBSD_ICON 'BSD' FREEBSD_ICON 'BSD'
ANDROID_ICON 'And' ANDROID_ICON 'And'
LINUX_ICON 'Lx' LINUX_ICON 'Lx'
LINUX_ARCH_ICON 'Arc'
LINUX_DEBIAN_ICON 'Deb'
LINUX_UBUNTU_ICON 'Ubu'
LINUX_CENTOS_ICON 'Cen'
LINUX_COREOS_ICON 'Cor'
LINUX_ELEMENTARY_ICON 'Elm'
LINUX_MINT_ICON 'LMi'
LINUX_FEDORA_ICON 'Fed'
LINUX_GENTOO_ICON 'Gen'
LINUX_MAGEIA_ICON 'Mag'
LINUX_OPENSUSE_ICON 'OSu'
LINUX_SABAYON_ICON 'Sab'
LINUX_SLACKWARE_ICON 'Sla'
SUNOS_ICON 'Sun' SUNOS_ICON 'Sun'
HOME_ICON '' HOME_ICON ''
HOME_SUB_ICON '' HOME_SUB_ICON ''

45
functions/utilities.zsh Normal file → Executable file
View file

@ -102,8 +102,53 @@ case $(uname) in
OS_ICON=$(print_icon 'FREEBSD_ICON') OS_ICON=$(print_icon 'FREEBSD_ICON')
;; ;;
Linux) Linux)
OS='Linux'
os_release_id="$(grep -E '^ID=([a-zA-Z]*)' /etc/os-release | cut -d '=' -f 2)"
case "$os_release_id" in
"arch")
OS_ICON=$(print_icon 'LINUX_ARCH_ICON')
;;
"debian")
OS_ICON=$(print_icon 'LINUX_DEBIAN_ICON')
;;
"ubuntu")
OS_ICON=$(print_icon 'LINUX_UBUNTU_ICON')
;;
"elementary")
OS_ICON=$(print_icon 'LINUX_ELEMENTARY_ICON')
;;
"fedora")
OS_ICON=$(print_icon 'LINUX_FEDORA_ICON')
;;
"coreos")
OS_ICON=$(print_icon 'LINUX_COREOS_ICON')
;;
"gentoo")
OS_ICON=$(print_icon 'LINUX_GENTOO_ICON')
;;
"mageia")
OS_ICON=$(print_icon 'LINUX_MAGEIA_ICON')
;;
"centos")
OS_ICON=$(print_icon 'LINUX_CENTOS_ICON')
;;
"opensuse"|"tumbleweed")
OS_ICON=$(print_icon 'LINUX_OPENSUSE_ICON')
;;
"sabayon")
OS_ICON=$(print_icon 'LINUX_SABAYON_ICON')
;;
"slackware")
OS_ICON=$(print_icon 'LINUX_SLACKWARE_ICON')
;;
"linuxmint")
OS_ICON=$(print_icon 'LINUX_MINT_ICON')
;;
*)
OS='Linux' OS='Linux'
OS_ICON=$(print_icon 'LINUX_ICON') OS_ICON=$(print_icon 'LINUX_ICON')
;;
esac
# Check if we're running on Android # Check if we're running on Android
case $(uname -o 2>/dev/null) in case $(uname -o 2>/dev/null) in

0
functions/vcs.zsh Normal file → Executable file
View file