summaryrefslogtreecommitdiff
path: root/src/print_wireless_info.c
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@users.noreply.github.com>2015-10-04 21:01:49 +0200
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2015-10-04 21:01:49 +0200
commit974f95702efbf1ae15882777d191c7fde99bfb9b (patch)
treeb17acf7436a8b9de6c6d27aa4d82f01f6b8821aa /src/print_wireless_info.c
parentf3125fdfded91144cb9f5b9ea3bf406598f17321 (diff)
parenta13b2e7288e943359ccb37be86efb716efbe98c8 (diff)
Merge pull request #68 from bsvh/master
Added support for lemonbar
Diffstat (limited to 'src/print_wireless_info.c')
-rw-r--r--src/print_wireless_info.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index 48d81d4..4639625 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -480,7 +480,7 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface,
if (BEGINS_WITH(walk + 1, "quality")) {
if (info.flags & WIRELESS_INFO_FLAG_HAS_QUALITY) {
if (info.quality_max)
- outwalk += sprintf(outwalk, "%03d%%", PERCENT_VALUE(info.quality, info.quality_max));
+ outwalk += sprintf(outwalk, "%03d%s", PERCENT_VALUE(info.quality, info.quality_max), pct_mark);
else
outwalk += sprintf(outwalk, "%d", info.quality);
} else {
@@ -492,7 +492,7 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface,
if (BEGINS_WITH(walk + 1, "signal")) {
if (info.flags & WIRELESS_INFO_FLAG_HAS_SIGNAL) {
if (info.signal_level_max)
- outwalk += sprintf(outwalk, "%03d%%", PERCENT_VALUE(info.signal_level, info.signal_level_max));
+ outwalk += sprintf(outwalk, "%03d%s", PERCENT_VALUE(info.signal_level, info.signal_level_max), pct_mark);
else
outwalk += sprintf(outwalk, "%d dBm", info.signal_level);
} else {
@@ -504,7 +504,7 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface,
if (BEGINS_WITH(walk + 1, "noise")) {
if (info.flags & WIRELESS_INFO_FLAG_HAS_NOISE) {
if (info.noise_level_max)
- outwalk += sprintf(outwalk, "%03d%%", PERCENT_VALUE(info.noise_level, info.noise_level_max));
+ outwalk += sprintf(outwalk, "%03d%s", PERCENT_VALUE(info.noise_level, info.noise_level_max), pct_mark);
else
outwalk += sprintf(outwalk, "%d dBm", info.noise_level);
} else {