Compare commits
2 Commits
59455c5959
...
d864b91341
Author | SHA1 | Date |
---|---|---|
simon | d864b91341 | |
simon | 6d337abc8e |
|
@ -9,7 +9,7 @@ LOG_FILE_PATH = "/tmp/battery_status.log"
|
|||
def get_acpi():
|
||||
""" get acpi data as a sting """
|
||||
acpi_raw = subprocess.run(["acpi"], capture_output=True, check=False)
|
||||
acpi_string = acpi_raw.stdout.decode().strip()
|
||||
acpi_string = acpi_raw.stdout.decode().strip().split('\n')[0]
|
||||
return acpi_string
|
||||
|
||||
|
||||
|
|
|
@ -11,9 +11,8 @@ fi
|
|||
# when connected
|
||||
if [[ $(ip a | grep "state" | grep -Ev 'tun|lo' | grep "UP ") ]]; then
|
||||
printmain=$(ip -br addr show | grep -v 'lo' \
|
||||
| awk '{print $3}' | awk -F '/' {'print $1}' | tr '\n' ' ')
|
||||
printsmall=$(ip -br addr show | grep -v 'lo' \
|
||||
| awk '{print $3}' | awk -F '/' {'print $1}' | head -n 1)
|
||||
printsmall=""
|
||||
printcolor="#00FF00"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue