X-Git-Url: https://git.xandkar.net/?p=khatus.git;a=blobdiff_plain;f=x2%2Fsrc%2Fawk%2Fexe%2Fbar.awk;h=8d611b1a75d649639654dbd6b48dca2894184f4d;hp=294dc4537f4da33a2d80cc3e07ccd26d5e8bc337;hb=b9592ab6c6553ff1568a5100169c756472aebbab;hpb=50401a4d45c16bd92210552252a10b7ea9b5c527 diff --git a/x2/src/awk/exe/bar.awk b/x2/src/awk/exe/bar.awk index 294dc45..8d611b1 100644 --- a/x2/src/awk/exe/bar.awk +++ b/x2/src/awk/exe/bar.awk @@ -194,6 +194,14 @@ function bar_make_status_net_wifi_link(interface, link) { # Bluetooth # ----------------------------------------------------------------------------- +function bar_make_status_bluetooth( src, controllers, devices) { + src = "khatus_sensor_bluetooth" + controllers = cache_get_fmt_def(src, "count_powered_controllers", 10, "%d") + devices = cache_get_fmt_def(src, "count_connected_devices" , 10, "%d") + # Using %s format bellow because default value is a string + return sprintf("%s:%s", controllers, devices) +} + function bar_make_status_bluetooth_power( src) { src = "khatus_sensor_bluetooth_power" return cache_get_fmt_def(src, "power_status", 10, "%s")