aboutsummaryrefslogtreecommitdiff
path: root/functions/utilities.zsh
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/utilities.zsh
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/utilities.zsh')
-rw-r--r--functions/utilities.zsh9
1 files changed, 9 insertions, 0 deletions
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.