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
#!/bin/sh | |
# <bitbar.title>Apple Mouse and Keyboard Battery Percentage</bitbar.title> | |
# <bitbar.version>1.0</bitbar.version> | |
INFO=$( | |
ioreg -r -l -n AppleHSBluetoothDevice | | |
egrep '"BatteryPercent" = |^ \| "Bluetooth Product Name" = ' | | |
sed 's/ | "Bluetooth Product Name" = "Magic Mouse 2"/🖱 /' | | |
sed 's/ | "Bluetooth Product Name" = "Magic Keyboard"/\⌨️ /'| | |
sed 's/ | "BatteryPercent" = //' | |
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
#!/bin/sh | |
# <bitbar.title>iPhone battery info</bitbar.title> | |
# <bitbar.version>1.0</bitbar.version> | |
# IMPORTANT: | |
# - install libimobiledevice via brew before usage: | |
# $ brew install --HEAD libimobiledevice | |
# - tested with only one iphone connected | |
PATH=$PATH:/usr/local/bin |