Fix battery empty remaining (), add git aliases

This commit is contained in:
Riyyi
2018-01-21 18:49:30 +01:00
parent 0318e459c5
commit 6a687d8a7f
2 changed files with 25 additions and 2 deletions
+8 -1
View File
@@ -4,6 +4,13 @@ BAT_INFO=${BLOCK_INSTANCE:-"$(acpi -b | grep ': [^Unknown]')"}
CAPACITY=$(echo $BAT_INFO | awk '{ print int($4) }')
TIME="$(echo $BAT_INFO | awk '{ print substr($5, 0, length($5) - 3) }')"
CHARACTER=":"
if [ "$TIME" != "" ] && [ "${TIME#*$CHARACTER}" != "$TIME" ]; then
TIME=" ($TIME)"
else
TIME=""
fi
if [ "$(echo $BAT_INFO | awk '{ print $6 }')" = "remaining" ]; then
if [ "$CAPACITY" -ge "80" ]; then
@@ -21,6 +28,6 @@ else
ICON=""
fi
echo "$ICON $CAPACITY% ($TIME)"
echo "$ICON $CAPACITY%$TIME"
echo "$ICON $CAPACITY%"
echo "#FFFFFF"