Skip to content

Commit

Permalink
Fix battery block
Browse files Browse the repository at this point in the history
  • Loading branch information
joseangelgm committed Aug 11, 2020
1 parent 918bfdd commit 286ce0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion environment/components/i3/blocks/battery
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ STATE=$(acpi | head -n 1 | awk '{print $3}' | cut -d ',' -f 1)
PERCENTAGE=$(acpi | head -n 1 | awk '{print $4}' | cut -d ',' -f 1 | cut -d '%' -f 1)
TIME_LEFT=$(acpi | head -n 1 | awk '{print $5}')
STATUS=$(acpi -t | head -n 1 | awk '{print $3}' | cut -d ',' -f 1)
TEMPERATURE=$(acpi -t | head -n 1 | awk '{print $4}')
TEMPERATURE=$(acpi -t | tail -n 1 | awk '{print $4}')

if [[ "$STATE" = "Charging" ]]; then
echo "$ICON_CHARGING $PERCENTAGE $TIME_LEFT $STATUS $TEMPERATURE"
Expand Down

0 comments on commit 286ce0f

Please sign in to comment.