Update status

add emoji
 short date
 remove redundant temperature
This commit is contained in:
Przemek Grondek 2022-07-25 22:02:04 +02:00
parent 211f12c0c1
commit 07b5fa2967

View File

@ -19,7 +19,7 @@
char *tzargentina = "America/Buenos_Aires";
char *tzutc = "UTC";
char *tzberlin = "Europe/Berlin";
char *tzwarsaw = "Europe/Warsaw";
static Display *dpy;
@ -181,8 +181,8 @@ main(void)
char *status;
char *avgs;
char *tmbln;
char *t0, *t1, *t2;
char *bat;
char *t0;
char *bat;
if (!(dpy = XOpenDisplay(NULL))) {
fprintf(stderr, "dwmstatus: cannot open display.\n");
@ -191,18 +191,15 @@ main(void)
for (;;sleep(60)) {
avgs = loadavg();
tmbln = mktimes("%a %d %b %H:%M %Z %Y", tzberlin);
tmbln = mktimes("%d.%m.%Y %H:%M", tzwarsaw);
t0 = gettemperature("/sys/class//hwmon/hwmon1", "temp1_input");
t1 = gettemperature("/sys/class//hwmon/hwmon3", "temp1_input");
t2 = gettemperature("/sys/class//hwmon/hwmon6", "temp1_input");
bat = getbattery("/sys/class/power_supply/BAT0");
bat = getbattery("/sys/class/power_supply/BAT0");
status = smprintf("Bat: %s | Temp: %s, %s, %s | Load: %s | %s",
bat, t0, t1, t2, avgs, tmbln);
status = smprintf("🔋 %s 🌡 %s | Load: %s | %s",
bat, t0, avgs, tmbln);
setstatus(status);
free(t0);
free(t1);
free(bat);
free(avgs);
free(tmbln);