1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-28 13:36:59 -05:00
dotfiles/cfg/i3blocks/laptop/blocks/bluetooth

20 lines
352 B
Plaintext
Raw Normal View History

2017-07-26 14:00:04 -04:00
#!/bin/bash
# Left click
if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then
sudo bluetooth on
# Middle click
elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then
sudo bluetooth toggle
# Right click
elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then
sudo bluetooth off
fi
STATUS=$(bluetooth | grep -wo 'on')
if [[ "${STATUS}" = "on" ]]; then
echo "on"
echo "on"
echo ""
fi