diff options
Diffstat (limited to 'functions')
-rwxr-xr-x[-rw-r--r--] | functions/colors.zsh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | functions/icons.zsh | 72 | ||||
-rwxr-xr-x[-rw-r--r--] | functions/utilities.zsh | 47 | ||||
-rwxr-xr-x[-rw-r--r--] | functions/vcs.zsh | 0 |
4 files changed, 115 insertions, 4 deletions
diff --git a/functions/colors.zsh b/functions/colors.zsh index f421165c..f421165c 100644..100755 --- a/functions/colors.zsh +++ b/functions/colors.zsh diff --git a/functions/icons.zsh b/functions/icons.zsh index 6000e108..b929f73a 100644..100755 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -48,6 +48,19 @@ case $POWERLEVEL9K_MODE in FREEBSD_ICON $'\U1F608 ' # 😈 ANDROID_ICON $'\uE270' # 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 ' # 🌞 HOME_ICON $'\uE12C' # HOME_SUB_ICON $'\uE18D' # @@ -127,6 +140,19 @@ case $POWERLEVEL9K_MODE in FREEBSD_ICON $'\U1F608 ' # 😈 ANDROID_ICON $'\uE17B' # 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 ' # HOME_ICON $'\uF015' # HOME_SUB_ICON $'\uF07C' # @@ -153,7 +179,7 @@ case $POWERLEVEL9K_MODE in VCS_GIT_GITLAB_ICON $'\uF296 ' # VCS_HG_ICON $'\uF0C3 ' # VCS_SVN_ICON '(svn) ' - RUST_ICON $'\uE6A8' # + RUST_ICON $'\uE6A8' # PYTHON_ICON $'\ue63c' # SWIFT_ICON '' GO_ICON '' @@ -208,6 +234,19 @@ case $POWERLEVEL9K_MODE in APPLE_ICON '\u'$CODEPOINT_OF_AWESOME_APPLE # FREEBSD_ICON $'\U1F608 ' # 😈 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' ' # HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME # HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN # @@ -251,6 +290,7 @@ case $POWERLEVEL9K_MODE in 'nerdfont-complete'|'nerdfont-fontconfig') # nerd-font patched (complete) font required! See # https://github.com/ryanoasis/nerd-fonts + # http://nerdfonts.com/#cheat-sheet # Set the right locale to protect special characters local LC_ALL="" LC_CTYPE="en_US.UTF-8" icons=( @@ -281,6 +321,19 @@ case $POWERLEVEL9K_MODE in WINDOWS_ICON $'\uF17A' # FREEBSD_ICON $'\UF30E ' # 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' # SUNOS_ICON $'\uF185 ' # HOME_ICON $'\uF015' # @@ -302,8 +355,8 @@ case $POWERLEVEL9K_MODE in VCS_COMMIT_ICON $'\uE729 ' # VCS_BRANCH_ICON $'\uF126 ' # VCS_REMOTE_BRANCH_ICON $'\uE728 ' # - VCS_GIT_ICON $'\uF113 ' # - VCS_GIT_GITHUB_ICON $'\uE709 ' # + VCS_GIT_ICON $'\uF1D3 ' # + VCS_GIT_GITHUB_ICON $'\uF113 ' # VCS_GIT_BITBUCKET_ICON $'\uE703 ' # VCS_GIT_GITLAB_ICON $'\uF296 ' # VCS_HG_ICON $'\uF0C3 ' # @@ -357,6 +410,19 @@ case $POWERLEVEL9K_MODE in FREEBSD_ICON 'BSD' ANDROID_ICON 'And' 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' HOME_ICON '' HOME_SUB_ICON '' diff --git a/functions/utilities.zsh b/functions/utilities.zsh index b4bfb838..1f4df9bc 100644..100755 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -103,7 +103,52 @@ case $(uname) in ;; Linux) OS='Linux' - OS_ICON=$(print_icon 'LINUX_ICON') + 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_ICON=$(print_icon 'LINUX_ICON') + ;; + esac # Check if we're running on Android case $(uname -o 2>/dev/null) in diff --git a/functions/vcs.zsh b/functions/vcs.zsh index e2e9f3a3..e2e9f3a3 100644..100755 --- a/functions/vcs.zsh +++ b/functions/vcs.zsh |