bthandler/README.md

56 lines
2.6 KiB
Markdown
Raw Normal View History

2020-04-18 21:20:08 +02:00
# bthandler
2020-04-25 15:01:13 +02:00
A simple interactive tool to:
- connect to already paired devices
2020-07-04 21:43:46 +02:00
- disconnect bluetooth devices
2020-04-25 15:01:13 +02:00
- pair new ones
- unpair already paired devices
- turn bluetooth on/off
- blacklist paired devices to not be listed in connection selection
2020-07-04 21:43:46 +02:00
- trust devices
2020-04-25 15:03:18 +02:00
all via dmenu. Should be easily extendable by editing the `actions` string.
2020-06-28 19:07:40 +02:00
<img src="/../assets/cropped.png" alt="cropped preview" width="1800">
2020-06-08 22:19:03 +02:00
2020-04-18 21:48:34 +02:00
# Installation
2020-04-25 15:01:13 +02:00
Edit the Makefile to reflect your preffered installation destination. Then, simply
```bash
make install
```
2020-06-08 21:59:36 +02:00
Afterwards, invoking `bt` will start the menu.
2020-06-08 21:59:36 +02:00
# Clear blacklist/pairlist
2020-06-08 22:19:03 +02:00
Since `bluetoothctl paired-devices` seems to be hugely unreliable in listing paired devices, bthandler has a seperate list for all devices paired through bthandler.
2020-06-08 21:59:36 +02:00
There is also a blacklist available to not display certain devices, which might be useful for autoconnection Bluetooth mice for example.
2020-07-04 21:10:05 +02:00
**Note:** If for some reason `bluetoothctl paired-devices` works for you dont worry, bthandler lists all devices returned from `bluetoothctl` and it's own paired devices list. (Duplicates are not displayed.)
2020-06-08 21:59:36 +02:00
To clear these files, simply run
```bash
make clear
```
and these files will be reset to their inital, empty state.
# Uninstall
To uninstall you might follow that it's a simple
```bash
make uninstall
```
2020-07-04 21:43:46 +02:00
**Watch out:** since I'm using relative paths in the Makefile, it does make a difference whether you run the script with sudo or without. (both will work, you just have to be consistent in the installing und unisntalling process)
If you have troubles with an uninstall, _additionally_ run `which bt | xargs rm`.
2020-06-08 21:59:36 +02:00
2020-07-04 21:46:01 +02:00
# TODO
2020-06-08 21:59:36 +02:00
2020-06-08 22:19:03 +02:00
Here's a growing list of features that are not yet actively worked on but might be nice in the future. Currently I'm more concerned with reliability than fulfilling feature requests, but I'm still open to put some on this list.
2020-06-08 21:59:36 +02:00
2020-07-04 21:10:05 +02:00
- start scanning for new devices immediately at execution to save time when pairing new devices -> **Implemented**
- auto-trust newly paired devices/trust device via dmenu -> **Implemented changeable via the AUTOTRUST variable in the beginning of bt, menu display adjusts accordingly**
- blacklist devices via dmenu -> **Implemented** (action is hidden, but typing `blacklist` as your choice will reveal the menu)
- update bthandler internal paired devices list if something new shows up via `bluetoothctl paired-devices` not already listed in the paired devices file -> **Implemented**
2020-07-04 21:43:46 +02:00
- only show disconnect option if devices are already connected -> **Implemented**
2020-07-04 21:46:01 +02:00
- find a way to get something similar to `grep -vf` without the need of temp files.