Project import generated by Copybara.
GitOrigin-RevId: 975161aa2f1036264c56d7a81b79ac74ba68b276
diff --git a/bin/executable_switch-keyboard.tmpl b/bin/executable_switch-keyboard.tmpl
new file mode 100644
index 0000000..71f6089
--- /dev/null
+++ b/bin/executable_switch-keyboard.tmpl
@@ -0,0 +1,10 @@
+#!/bin/bash
+export KEYBOARD_MAC={{ .switchKeyboard.mac | quote }}
+export CONNECTED=$(bluetoothctl devices Connected | grep "$KEYBOARD_MAC")
+if [[ "$CONNECTED" == '' ]]; then
+ bluetoothctl unblock "$KEYBOARD_MAC"
+ bluetoothctl connect "$KEYBOARD_MAC"
+else
+ bluetoothctl disconnect "$KEYBOARD_MAC"
+ bluetoothctl block "$KEYBOARD_MAC"
+fi