From b31f48d09f786af5c1a3eb8bfb52cfb0490bda28 Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Thu, 3 Dec 2020 01:02:31 +0100 Subject: init comit --- bluetooth | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 bluetooth (limited to 'bluetooth') diff --git a/bluetooth b/bluetooth new file mode 100755 index 0000000..7354fc3 --- /dev/null +++ b/bluetooth @@ -0,0 +1,5 @@ +#!/bin/sh +STATUS=$(systemctl is-active bluetooth) +[ "$STATUS" != "active" ] && exit +HEADPHONES=$(bluetoothctl info 38:18:4C:59:C1:B0 | grep "Connected: yes") +if [ "$HEADPHONES" ]; then echo "\003\001"; else echo "\003\001"; fi; -- cgit v1.2.3