aboutsummaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rwxr-xr-xextras/HOME/.xmonad/xmobar-bluetooth8
1 files changed, 6 insertions, 2 deletions
diff --git a/extras/HOME/.xmonad/xmobar-bluetooth b/extras/HOME/.xmonad/xmobar-bluetooth
index a3a3ac7..828c06a 100755
--- a/extras/HOME/.xmonad/xmobar-bluetooth
+++ b/extras/HOME/.xmonad/xmobar-bluetooth
@@ -2,6 +2,10 @@
cur=""
+function output {
+ exec echo '<action=`bluetooth-select.sh` button=1>'"$1"'</action>'
+}
+
if [ -d /sys/class/bluetooth ] ; then
bluetoothctl -- info | while read line ; do
@@ -13,10 +17,10 @@ if [ -d /sys/class/bluetooth ] ; then
fi
if [ "$key" == "Connected" -a "$value" == "yes" ] ; then
- exec echo "<fc=#4287f5></fc> <fc=#a0a0a0><fn=3>$cur</fn></fc> "
+ output "<fc=#4287f5></fc> <fc=#a0a0a0><fn=3>$cur</fn></fc> "
fi
done
fi
-exec echo "<fc=#404040></fc> "
+output "<fc=#404040></fc> "