aboutsummarylogtreecommitdiffstats
path: root/README.md
blob: c0d6e762ceae06bbfe70c2d83aae3549ea95bbdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Toggle Bluetooth on/off

[Bash script](toggle-bluetooth.sh) to toggle bluetooth mode between `on` and `off`.

The script does first run `bluetoothctl -- show` and searches the output for `Powered: yes` or `Powered: no`.

Subsequently the bluetooth status is changed from `on` to `off` or the other way around by executing
`bluetoothctl -- power off` respectively `bluetoothctl -- power on`.

## XFCE4

In XFCE4 one can add a launcher to the task bar to
execute the script with just one click.

See the `add-xfce4-launcher` target of the [Makefile](Makefile) for an
automated way to do this.

For reference, here is a screenshot of the launcher (top right on taskbar) with a desktop notification
after the launcher has been clicked.

![](screenshot_launcher-with-icon_notification.png)