From 67bd3003d82e7b93f3d48a2605c8c8172e5f2cde Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 27 Jul 2026 19:27:22 +0200 Subject: waybar: Various config updates and new modules --- dot.local-bin-bt--toggle.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 dot.local-bin-bt--toggle.sh (limited to 'dot.local-bin-bt--toggle.sh') diff --git a/dot.local-bin-bt--toggle.sh b/dot.local-bin-bt--toggle.sh new file mode 100755 index 0000000..198fcfe --- /dev/null +++ b/dot.local-bin-bt--toggle.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -euo pipefail + +state=$(gdbus call --system --dest org.bluez --object-path /org/bluez/hci0 --method org.freedesktop.DBus.Properties.Get "org.bluez.Adapter1" "Powered") +case ${state} in + "(,)") + new="" + ;; + "(,)") + new="" + ;; + *) + exit 1 +esac +gdbus call --system --dest org.bluez --object-path /org/bluez/hci0 --method org.freedesktop.DBus.Properties.Set "org.bluez.Adapter1" "Powered" $new >/dev/null -- cgit v1.2.3