diff options
author | Christoph Lohmann <20h@r-36.net> | 2022-12-28 19:09:11 +0100 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2022-12-28 19:09:11 +0100 |
commit | f2dea576d5051a860a6708c6bd170d35be18700d (patch) | |
tree | 15109f77e8e28b9a9c94675d2f025c6157a56553 /dwmstatus.c | |
parent | e3109b83569672686c3bd705ff37006f62c1b39c (diff) |
Add Surf status to dwmstatus.
Diffstat (limited to 'dwmstatus.c')
-rw-r--r-- | dwmstatus.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |