spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit 27087e9c6c2e404ad71a440f2ddf7c76b36831e5
parent ec1d812d83bef0d5206975281eea382bcf1f4224
Author: sin <sin@2f30.org>
Date:   Sat, 16 Sep 2017 19:29:42 +0100

Use D/U to indicate download/upload rate

Diffstat:
MMakefile | 2+-
Mnetspeed.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -15,7 +15,7 @@ CPPFLAGS_Linux =\ -I/usr/local/include\ -DPATH_BAT_CAP=\"/sys/class/power_supply/BAT0/capacity\"\ -DPATH_AC_ONLINE=\"/sys/class/power_supply/AC/online\"\ - -DPATH_TEMP=\"/sys/class/hwmon/hwmon0/temp1_input\"\ + -DPATH_TEMP=\"/sys/class/hwmon/hwmon1/temp1_input\"\ -DPATH_CPU_FREQ=\"/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq\" CPPFLAGS = $(CPPFLAGS_$(UNAME)) LDFLAGS = $(LDFLAGS_$(UNAME)) diff --git a/netspeed.c b/netspeed.c @@ -32,7 +32,7 @@ updatenetspeed(char *buf, size_t len, uint64_t rxbytes, uint64_t txbytes) tx = (txbytes - oldtxbytes) / delay; irx = humansz(rx); itx = humansz(tx); - snprintf(buf, len, "v%6.1f%s/s ^%6.1f%s/s", rx + snprintf(buf, len, "D:%6.1f%s/s U:%6.1f%s/s", rx / (double)(1 << (10 * irx)), humansztbl[irx], tx / (double)(1 << (10 * itx)), humansztbl[itx]); oldrxbytes = rxbytes;