zshrc: moved the unsupported OSes for the battery info in the battery function
authorMoviuro <moviuro+grml@gmail.com>
Tue, 16 Sep 2014 11:49:28 +0000 (13:49 +0200)
committerFrank Terbeck <ft@grml.org>
Tue, 16 Sep 2014 12:16:34 +0000 (14:16 +0200)
etc/zsh/zshrc

index a810b26..ae42923 100644 (file)
@@ -1650,12 +1650,6 @@ PS4='+%N:%i:%_> '
 #    - vcs_info setup and version specific fixes
 
 # display battery status on right side of prompt using 'GRML_DISPLAY_BATTERY=1' in .zshrc.pre
-if [[ $GRML_DISPLAY_BATTERY -gt 0 ]] ; then
-    if ! islinux && ! isopenbsd && ! isfreebsd ; then
-        # not yet supported
-        GRML_DISPLAY_BATTERY=0
-    fi
-fi
 
 battery() {
 if [[ $GRML_DISPLAY_BATTERY -gt 0 ]] ; then
@@ -1665,6 +1659,9 @@ if [[ $GRML_DISPLAY_BATTERY -gt 0 ]] ; then
         batteryopenbsd
     elif isfreebsd ; then
         batteryfreebsd
+    else
+        #not yet supported
+        GRML_DISPLAY_BATTERY=0
     fi
 fi
 }