* Jon Bernard <jbern...@jbernard.io> wrote: > * joshua stein <j...@openbsd.org> wrote: > > On Tue, 17 Jul 2018 at 21:42:46 -0400, Jon Bernard wrote: > > > Hi ports, > > > > > > Here's a small patch to i3status to report wireless signal quality. If > > > you're using the default configuration, you should see the '?' change to > > > the current signal quality percentage. > > > > > > If this looks good I'll submit it upstream. > > > > > > OK? > > > > I'm already getting wireless signal quality with i3status, is this > > not the same thing? My i3status.conf has: > > > > wireless iwm0 { > > format_up = "up|%signal|%essid" > > format_down = "down" > > } > > > > which reports: > > > > [{"name":"wireless","instance":"iwm0","markup":"none","full_text":"up| > > 76%|xxx"},... > > I think you're right. I thought signal was the raw value but it appears > that i3status computes the percentage for %signal based on the max. The > manpage doesn't even mention the signal field so that's fun. Thanks for > looking at this, sorry for the noise.
This patch might make more sense then, it updates the openbsd default configuration to use signal (which we support) instead of quality which will always yield a '?'. -- Jon
Index: x11/i3status/patches/patch-i3status_conf =================================================================== RCS file: /cvs/ports/x11/i3status/patches/patch-i3status_conf,v retrieving revision 1.16 diff -u -p -r1.16 patch-i3status_conf --- x11/i3status/patches/patch-i3status_conf 31 Jan 2017 18:47:56 -0000 1.16 +++ x11/i3status/patches/patch-i3status_conf 18 Jul 2018 03:35:59 -0000 @@ -2,8 +2,9 @@ $OpenBSD: patch-i3status_conf,v 1.16 201 Adjust config file to be reasonably useful on OpenBSD out of the box. ---- i3status.conf.orig Tue Jan 31 19:44:46 2017 -+++ i3status.conf Tue Jan 31 19:46:10 2017 +Index: i3status.conf +--- i3status.conf.orig ++++ i3status.conf @@ -7,6 +7,7 @@ # If the above line is not correctly displayed, fix your editor first! @@ -30,7 +31,8 @@ Adjust config file to be reasonably usef +} + wireless _first_ { - format_up = "W: (%quality at %essid) %ip" +- format_up = "W: (%quality at %essid) %ip" ++ format_up = "W: (%signal at %essid) %ip" format_down = "W: down" }