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 *tzargentina = "America/Buenos_Aires";
char *tzutc = "UTC"; char *tzutc = "UTC";
char *tzberlin = "Europe/Berlin"; char *tzwarsaw = "Europe/Warsaw";
static Display *dpy; static Display *dpy;
@ -181,7 +181,7 @@ main(void)
char *status; char *status;
char *avgs; char *avgs;
char *tmbln; char *tmbln;
char *t0, *t1, *t2; char *t0;
char *bat; char *bat;
if (!(dpy = XOpenDisplay(NULL))) { if (!(dpy = XOpenDisplay(NULL))) {
@ -191,18 +191,15 @@ main(void)
for (;;sleep(60)) { for (;;sleep(60)) {
avgs = loadavg(); 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"); 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", status = smprintf("🔋 %s 🌡 %s | Load: %s | %s",
bat, t0, t1, t2, avgs, tmbln); bat, t0, avgs, tmbln);
setstatus(status); setstatus(status);
free(t0); free(t0);
free(t1);
free(bat); free(bat);
free(avgs); free(avgs);
free(tmbln); free(tmbln);