11 lines
264 B
Bash
Executable File
11 lines
264 B
Bash
Executable File
#!/bin/bash
|
|
|
|
current=$(acpi --battery | grep -e 'Battery 0' | sed -e 's/%.*//' | sed 's/.*, //')
|
|
state=$(acpi --battery | grep -e 'Battery 0' | sed -e 's/,.*//' | sed 's/.*: //')
|
|
|
|
if [[ "$state" == "Not charging" ]]; then
|
|
state="Full"
|
|
fi
|
|
|
|
echo "$current% $state"
|