Skip to content

Commit

Permalink
Fix command syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWeirdDev committed Feb 26, 2022
1 parent fa98b03 commit 4f49f75
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Table of Contents

### Option 1: Install from PyPI
Please ensure you have the BlueZ and python libraries and header files if you are using Ubuntu/Debian based distros:
```bash
```console
sudo apt install libbluetooth-dev python3-dev
```

If you are using *OpenSUSE*, you will need to install `bluez`, `bluez-devel`, `python3-devel`, `python3-pybluez`

Then, install with pip:
```bash
```console
pip3 install bluetooth_battery

bluetooth_battery BT_MAC_ADDRESS_1 ...
Expand All @@ -49,7 +49,7 @@ _the dependency `pybluez` should be installed automatically, but if not, you may

### Option 2: Download this repository

```bash
```console
cd Bluetooth_Headset_Battery_Level
chmod +x bluetooth_battery.py

Expand All @@ -65,14 +65,14 @@ _make sure you have `python-pybluez` or `python3-pybluez` or `python3-bluez` ins
You must have docker installed on your system.
Clone the repository using `git clone` command. Then run:

```bash
```console
cd Bluetooth_Headset_Battery_Level
docker build -t bluetooth_battery_level .
```

Once the build is complete you can use the below command to run the program:

```bash
```console
docker run --rm -ti --privileged --net=host bluetooth_battery_level "BT_MAC_ADDRESS"
```

Expand All @@ -83,7 +83,7 @@ docker run --rm -ti --privileged --net=host bluetooth_battery_level "BT_MAC_ADDR
You must have AUR access enabled on your Arch or Manjaro machine.
You can install this library using

```bash
```console
yay -S python-bluetooth-battery
```

Expand Down Expand Up @@ -146,14 +146,14 @@ Device E8:AB:FA:XX:XX:XX iTeknic IK-BH002
The 1st and 3rd would be relevant here, as those are headsets.

This shows devices that are actually connected.
```
```console
$ bluetoothctl info
Device E8:AB:FA:XX:XX:XX (public)
Name: iTeknic IK-BH002
...
```
So you can use
```
```console
bluetooth_battery.py $(bluetoothctl info | awk '/^Device/ {print $2}')
```
to query the battery of all connected devices.
Expand Down

0 comments on commit 4f49f75

Please sign in to comment.