add configs

This commit is contained in:
lucy 2026-02-26 11:58:38 +01:00
commit 774894486f
29 changed files with 106 additions and 2 deletions

BIN
components/battery.o Normal file

Binary file not shown.

BIN
components/cat.o Normal file

Binary file not shown.

BIN
components/cpu.o Normal file

Binary file not shown.

BIN
components/datetime.o Normal file

Binary file not shown.

BIN
components/disk.o Normal file

Binary file not shown.

BIN
components/entropy.o Normal file

Binary file not shown.

BIN
components/hostname.o Normal file

Binary file not shown.

BIN
components/ip.o Normal file

Binary file not shown.

BIN
components/kernel_release.o Normal file

Binary file not shown.

Binary file not shown.

BIN
components/keymap.o Normal file

Binary file not shown.

BIN
components/load_avg.o Normal file

Binary file not shown.

BIN
components/netspeeds.o Normal file

Binary file not shown.

BIN
components/num_files.o Normal file

Binary file not shown.

BIN
components/ram.o Normal file

Binary file not shown.

BIN
components/run_command.o Normal file

Binary file not shown.

BIN
components/swap.o Normal file

Binary file not shown.

BIN
components/temperature.o Normal file

Binary file not shown.

BIN
components/uptime.o Normal file

Binary file not shown.

BIN
components/user.o Normal file

Binary file not shown.

View file

@ -219,3 +219,33 @@
return bprintf("%d", v & 0xff);
}
#endif
const char *
vol_perc_pw(const char *sink)
{
FILE *fp;
char buf[64], cmd[64];
double v;
if (esnprintf(cmd, sizeof(cmd), "wpctl get-volume %s", sink) < 0)
return NULL;
if (!(fp = popen(cmd, "r"))) {
warn("popen '%s':", cmd);
return NULL;
}
if (!fgets(buf, sizeof(buf), fp)) {
pclose(fp);
return NULL;
}
pclose(fp);
if (strstr(buf, "[MUTED]"))
return "mute";
if (sscanf(buf, "Volume: %lf", &v) != 1)
return NULL;
return bprintf("%d%%", (int)(v * 100 + 0.5));
}

BIN
components/volume.o Normal file

Binary file not shown.

BIN
components/wifi.o Normal file

Binary file not shown.