aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorguixxx <guixxx@users.noreply.github.com>2017-04-12 22:38:43 +0300
committerBen Hilburn <bhilburn@gmail.com>2017-04-19 01:02:37 +0300
commitc403ad6cd72669a1849fc5738ed51acaa946d2e2 (patch)
tree576335e12c06282e9b2b7063ad6136939b87b2be /functions
parent2be5d5071eaec4b6baecd45bca9ecb085953b763 (diff)
Adds Android icon/battery plugin support
Plus fixes bhilburn/powerlevel9k#479, which was causing integer overflow on 32-bit CPUs
Diffstat (limited to 'functions')
-rw-r--r--functions/icons.zsh4
-rw-r--r--functions/utilities.zsh9
2 files changed, 13 insertions, 0 deletions
diff --git a/functions/icons.zsh b/functions/icons.zsh
index 413ea19b..3d99d70a 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -43,6 +43,7 @@ case $POWERLEVEL9K_MODE in
MULTILINE_SECOND_PROMPT_PREFIX $'\u2570'$'\U2500 '
APPLE_ICON $'\uE26E' # 
FREEBSD_ICON $'\U1F608 ' # 😈
+ ANDROID_ICON $'\uE270' # 
LINUX_ICON $'\uE271' # 
SUNOS_ICON $'\U1F31E ' # 🌞
HOME_ICON $'\uE12C' # 
@@ -112,6 +113,7 @@ case $POWERLEVEL9K_MODE in
MULTILINE_SECOND_PROMPT_PREFIX $'\u2570'$'\U2500 ' # ╰─
APPLE_ICON $'\uF179' # 
FREEBSD_ICON $'\U1F608 ' # 😈
+ ANDROID_ICON $'\uE17B' # 
LINUX_ICON $'\uF17C' # 
SUNOS_ICON $'\uF185 ' # 
HOME_ICON $'\uF015' # 
@@ -177,6 +179,7 @@ case $POWERLEVEL9K_MODE in
MULTILINE_SECOND_PROMPT_PREFIX $'\u2570'$'\U2500 ' # ╰─
APPLE_ICON $'\uF179' # 
FREEBSD_ICON $'\UF30E ' # 
+ ANDROID_ICON $'\uF17B' # 
LINUX_ICON $'\uF17C' # 
SUNOS_ICON $'\uF185 ' # 
HOME_ICON $'\uF015' # 
@@ -242,6 +245,7 @@ case $POWERLEVEL9K_MODE in
MULTILINE_SECOND_PROMPT_PREFIX $'\u2570'$'\u2500 '
APPLE_ICON 'OSX'
FREEBSD_ICON 'BSD'
+ ANDROID_ICON 'And'
LINUX_ICON 'Lx'
SUNOS_ICON 'Sun'
HOME_ICON ''
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index 22b53c6a..bdfce5fd 100644
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -111,6 +111,15 @@ case $(uname) in
;;
esac
+# Not all OSes support the '-o' parameter
+# That's why this second condition is needed
+case $(uname -o 2>/dev/null) in
+ Android)
+ OS='Android'
+ OS_ICON=$(print_icon 'ANDROID_ICON')
+ ;;
+esac
+
# Determine the correct sed parameter.
#
# `sed` is unfortunately not consistent across OSes when it comes to flags.