1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-24 04:22:50 -05:00
dotfiles/cfg/i3blocks/laptop/blocks/bluetooth
2017-07-26 11:05:09 -07:00

20 lines
352 B
Bash
Executable File

#!/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