updated bat status to use correct method
This commit is contained in:
parent
e675a92c21
commit
385d742676
@ -1,10 +1,10 @@
|
||||
#!/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/.*: //')
|
||||
current=$(upower -i $(upower -e | grep 'BAT') | grep -E "percentage" | sed 's/.*://' | sed 's/ *//')
|
||||
state=$(upower -i $(upower -e | grep 'BAT') | grep -E "state" | sed 's/.*://' | sed 's/ *//')
|
||||
|
||||
if [[ "$state" == "Not charging" ]]; then
|
||||
state="Full"
|
||||
if [[ "$state" == "not charging" ]]; then
|
||||
state="full"
|
||||
fi
|
||||
|
||||
echo "$current% $state"
|
||||
echo "$current% $state"
|
||||
|
||||
Reference in New Issue
Block a user