home
/
code
/
khatus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix wifi link status
[khatus.git]
/
x2
/
src
/
awk
/
exe
/
bar.awk
diff --git
a/x2/src/awk/exe/bar.awk
b/x2/src/awk/exe/bar.awk
index
9b7328c
..
294dc45
100644
(file)
--- a/
x2/src/awk/exe/bar.awk
+++ b/
x2/src/awk/exe/bar.awk
@@
-155,7
+155,7
@@
function bar_make_status_disk_io_r( src) {
function bar_make_status_net_iface_status(interface, is_plugged_in) {
# TODO: Integrate connection/address status into the symbol somehow.
cache_get(is_plugged_in, "khatus_sensor_net_carrier", interface, 5)
function bar_make_status_net_iface_status(interface, is_plugged_in) {
# TODO: Integrate connection/address status into the symbol somehow.
cache_get(is_plugged_in, "khatus_sensor_net_carrier", interface, 5)
- if (!is_plugged_in["is_expired"] && is_plugged_in["value"])
+ if (!is_plugged_in["is_expired"] && is_plugged_in["value"]
== 1
)
return "<>"
else
return "--"
return "<>"
else
return "--"
@@
-182,6
+182,14
@@
function bar_make_status_net_wifi(interface, src) {
return cache_get_fmt_def(src, "status" Kfs interface, 10, "%s")
}
return cache_get_fmt_def(src, "status" Kfs interface, 10, "%s")
}
+function bar_make_status_net_wifi_link(interface, link) {
+ cache_get(link, "khatus_sensor_net_wifi_status", "link" Kfs interface, 10)
+ if (!link["is_expired"] && link["value"] > 0)
+ return sprintf("%d%%", link["value"])
+ else
+ return "--"
+}
+
# -----------------------------------------------------------------------------
# Bluetooth
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# Bluetooth
# -----------------------------------------------------------------------------
This page took
0.023895 seconds
and
4
git commands to generate.