mirror of
https://github.com/mr0xb/dotfiles.git
synced 2026-08-27 19:34:57 -04:00
updates
This commit is contained in:
parent
bc4d4c403a
commit
715eb53860
57 changed files with 7755 additions and 3 deletions
16
.config/sketchybar/plugins/bluetooth.sh
Executable file
16
.config/sketchybar/plugins/bluetooth.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check Bluetooth status
|
||||
BT_STATUS=$(system_profiler SPBluetoothDataType 2>/dev/null | grep "Bluetooth Power" | awk '{print $3}')
|
||||
|
||||
if [ "$BT_STATUS" = "On" ]; then
|
||||
# Check if any devices are connected
|
||||
CONNECTED=$(system_profiler SPBluetoothDataType 2>/dev/null | grep "Connected: Yes" | wc -l)
|
||||
if [ $CONNECTED -gt 0 ]; then
|
||||
sketchybar --set "$NAME" icon="" icon.color=0xfffacc15
|
||||
else
|
||||
sketchybar --set "$NAME" icon="" icon.color=0xffffffff
|
||||
fi
|
||||
else
|
||||
sketchybar --set "$NAME" icon="" icon.color=0xff6272a4
|
||||
fi
|
||||
Loading…
Reference in a new issue