mirror of
https://github.com/Foltik/dotfiles
synced 2024-12-10 21:48:09 -05:00
20 lines
352 B
Plaintext
20 lines
352 B
Plaintext
|
#!/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
|