You are not logged in.
I am running KDE and it has no built-in functionality to toggle the bluetooth state. I know that I can use rfkill block bluetooth and rfkill unblock bluetooth, but I am looking to have a single keyboard shortcut to toggle bluetooth, rather than one to turn it on, and one to turn it off. So is there any command that would be like rfkill toggle bluetooth (I know this does not exist), that I could use to toggle the bluetooth state?
Last edited by samrob85 (2018-09-10 11:04:37)
Offline
You can read the current status with rfkill and act on it
if rfkill -ro Soft list bluetooth | grep -q "^blocked"
then
some action
else
another action
fi| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
You can read the current status with rfkill and act on it
if rfkill -ro Soft list bluetooth | grep -q "^blocked" then some action else another action fi
That's perfect thank you
Offline