diff options
Diffstat (limited to 'i3blocks')
-rwxr-xr-x | i3blocks/i3battery.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/i3blocks/i3battery.sh b/i3blocks/i3battery.sh index 735b1b4..3232a48 100755 --- a/i3blocks/i3battery.sh +++ b/i3blocks/i3battery.sh @@ -31,6 +31,7 @@ fi [ "$status" = "Charging" ] && color="#1fffaf" -printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" +remaining=$(acpi | cut -d' ' -f5) +printf "<span color='%s'>%s%s%s (%s)</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" "$remaining" echo "" |