From f2dea576d5051a860a6708c6bd170d35be18700d Mon Sep 17 00:00:00 2001 From: Christoph Lohmann <20h@r-36.net> Date: Wed, 28 Dec 2022 19:09:11 +0100 Subject: Add Surf status to dwmstatus. --- dwmstatus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dwmstatus.c') diff --git a/dwmstatus.c b/dwmstatus.c index ce7914a..a8cd4ac 100644 --- a/dwmstatus.c +++ b/dwmstatus.c @@ -208,6 +208,7 @@ main(void) char *t0; char *t1; char *kbmap; + char *surfs; if (!(dpy = XOpenDisplay(NULL))) { fprintf(stderr, "dwmstatus: cannot open display.\n"); @@ -221,14 +222,16 @@ main(void) tmutc = mktimes("%H:%M", tzutc); tmbln = mktimes("KW %W %a %d %b %H:%M %Z %Y", tzberlin); kbmap = execscript("setxkbmap -query | grep layout | cut -d':' -f 2- | tr -d ' '"); + surfs = execscript("surf-status"); t0 = gettemperature("/sys/devices/virtual/thermal/thermal_zone0", "temp"); t1 = gettemperature("/sys/devices/virtual/thermal/thermal_zone1", "temp"); - status = smprintf("K:%s T:%s|%s L:%s B:%s A:%s U:%s %s", - kbmap, t0, t1, avgs, bat, tmar, tmutc, + status = smprintf("S:%s K:%s T:%s|%s L:%s B:%s A:%s U:%s %s", + surfs, kbmap, t0, t1, avgs, bat, tmar, tmutc, tmbln); setstatus(status); + free(surfs); free(kbmap); free(t0); free(t1); -- cgit v1.2.3