Created
August 29, 2022 08:17
-
-
Save ret2src/37045f47d977562503986a740cc4d797 to your computer and use it in GitHub Desktop.
One-liner to toggle bluetooth in bash, using `rfkill` (e.g. for window managers)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$(rfkill list bluetooth | grep -ic yes)" -ge 1 ]; then rfkill unblock bluetooth; else rfkill block bluetooth; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment