updated bat stuff

This commit is contained in:
Solomon Laing 2022-06-08 17:22:25 +09:30
parent 3e69f8937c
commit 708a0db053
3 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
current=$(acpi --battery | sed -e 's/%.*//' | sed 's/.*, //') current=$(acpi --battery | grep -e 'Battery 0' | sed -e 's/%.*//' | sed 's/.*, //')
state=$(acpi --battery | sed -e 's/,.*//' | sed 's/.*: //') state=$(acpi --battery | grep -e 'Battery 0' | sed -e 's/,.*//' | sed 's/.*: //')
if [[ "$state" == "Not charging" ]]; then if [[ "$state" == "Not charging" ]]; then
state="Full" state="Full"

View File

@ -2,9 +2,9 @@
icon="" icon=""
current=$(acpi --battery | sed -e 's/%.*//' | sed 's/.*, //') current=$(acpi --battery | grep -e 'Battery 0' | sed -e 's/%.*//' | sed 's/.*, //')
status="$current%" status="$current%"
state=$(acpi --battery | sed -e 's/,.*//' | sed 's/.*: //') state=$(acpi --battery | grep -e 'Battery 0' | sed -e 's/,.*//' | sed 's/.*: //')
if [[ "$state" == "Discharging" ]]; then if [[ "$state" == "Discharging" ]]; then
case $((current/20)) in case $((current/20)) in

View File

@ -1,4 +1,4 @@
#!/bin/bash !/bin/bash
# a simple wrapper for inserting xmobar stuff # a simple wrapper for inserting xmobar stuff