You are not logged in.
Hi,
I'm setting up i3 on my laptop. Now I want to toggle my Bluetooth controller with the XF86Bluetooth key, so I wrote a little script that works well in console:
#!/usr/bin/env bash
if bluetoothctl show | grep 'Powered: no' -q; then
bluetoothctl power on
else
bluetoothctl power off
fiIn i3 I let that script run when I press the Bluetooth key:
bindsym XF86Bluetooth exec --no-startup-id bluetooth-onoffBut now I'm just able to turn my Bluetooth off. When I try to turn it on, bluetoothctl show just says "No default controller available".
Has anyone an Idea why this is happening?
Last edited by Jackal87 (2021-12-04 17:14:51)
Offline
Ok, it seems I was a bit dumb.
The Bluetooth key on my Laptop toggles the Bluetooth controller without any script needed.
I thought of it just as a programable Hot-Key, but it is actually a Killswitch. So running the script on the same key obviously causes problems.
My real problem was a wrong configuration of blueman-applet. For some reason I deactivated the KillSwitch extension so I couldnt see the real status of the controller.
Offline