diff --git a/scripts/status-bat b/scripts/status-bat index 2b2bc95..02c78cb 100755 --- a/scripts/status-bat +++ b/scripts/status-bat @@ -3,7 +3,7 @@ icon="" current=$(acpi --battery | sed -e 's/%.*//' | sed 's/.*, //') - +status="$current%" state=$(acpi --battery | sed -e 's/,.*//' | sed 's/.*: //') if [[ "$state" == "Discharging" ]]; then @@ -30,4 +30,13 @@ if [[ "$state" == "Not charging" ]]; then icon="" fi -echo "$icon $current%" +if [[ "$state" == "Full" ]]; then + icon="" + status="Full" +fi + +if [[ "$state" == "Charging" ]]; then + icon="" +fi + +echo "$icon $status" diff --git a/scripts/xmobar-status-bat b/scripts/xmobar-status-bat new file mode 100755 index 0000000..2d742ca --- /dev/null +++ b/scripts/xmobar-status-bat @@ -0,0 +1,9 @@ +#!/bin/bash + +# a simple wrapper for inserting xmobar stuff + +status=$(status-bat) + +parts=($status) + +echo "${parts[0]} ${parts[1]}"