add i3 and polybar conf, add new rofi logout screen
This commit is contained in:
23
polybar/scripts/bluetooth.sh
Executable file
23
polybar/scripts/bluetooth.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
STATE=$(bluetoothctl show | grep Powered)
|
||||
DEVICE_NAME=$(bluetoothctl info | grep Name: | awk '{ first = $1; $1 = ""; print $0 }')
|
||||
POWERED=""
|
||||
COLOR=""
|
||||
STRING=""
|
||||
|
||||
if [[ $STATE == *'yes'* ]]
|
||||
then
|
||||
POWERED=" ON"
|
||||
COLOR=""
|
||||
else
|
||||
POWERED=" OFF"
|
||||
COLOR=""
|
||||
fi
|
||||
|
||||
if [[ $DEVICE_NAME ]]
|
||||
then
|
||||
POWERED=" "
|
||||
fi
|
||||
|
||||
echo $POWERED$CONNECTED$DEVICE_NAME
|
||||
Reference in New Issue
Block a user