actually updated slstatus and removed binaries
This commit is contained in:
parent
073fdfd5e8
commit
b9ae019df3
12 changed files with 14 additions and 13 deletions
BIN
dmenu/dmenu
BIN
dmenu/dmenu
Binary file not shown.
BIN
dwm/dwm
BIN
dwm/dwm
Binary file not shown.
|
|
@ -43,10 +43,10 @@
|
|||
|
||||
if (esnprintf(path, sizeof(path), POWER_SUPPLY_CAPACITY, bat) < 0)
|
||||
return NULL;
|
||||
if (pscanf(path, "%d", &cap_perc) != 1)
|
||||
if (pscanf(path, "%02d", &cap_perc) != 1)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", cap_perc);
|
||||
return bprintf("%02d", cap_perc);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
struct apm_power_info apm_info;
|
||||
|
||||
if (load_apm_power_info(&apm_info))
|
||||
return bprintf("%d", apm_info.battery_life);
|
||||
return bprintf("%02d", apm_info.battery_life);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
if (sysctlbyname(BATTERY_LIFE, &cap_perc, &len, NULL, 0) < 0 || !len)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", cap_perc);
|
||||
return bprintf("%02d", cap_perc);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -43,7 +43,7 @@
|
|||
if (sum == 0)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", (int)(100 *
|
||||
return bprintf("%02d", (int)(100 *
|
||||
((b[0] + b[1] + b[2] + b[5] + b[6]) -
|
||||
(a[0] + a[1] + a[2] + a[5] + a[6])) / sum));
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
if (sum == 0)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", 100 *
|
||||
return bprintf("%02d", 100 *
|
||||
((a[CP_USER] + a[CP_NICE] + a[CP_SYS] +
|
||||
a[CP_INTR]) -
|
||||
(b[CP_USER] + b[CP_NICE] + b[CP_SYS] +
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
if (sum == 0)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", 100 *
|
||||
return bprintf("%02d", 100 *
|
||||
((a[CP_USER] + a[CP_NICE] + a[CP_SYS] +
|
||||
a[CP_INTR]) -
|
||||
(b[CP_USER] + b[CP_NICE] + b[CP_SYS] +
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -41,7 +41,7 @@
|
|||
return NULL;
|
||||
|
||||
percent = 100 * ((total - free) - (buffers + cached)) / total;
|
||||
return bprintf("%d", percent);
|
||||
return bprintf("%02d", percent);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
return NULL;
|
||||
|
||||
percent = uvmexp.active * 100 / uvmexp.npages;
|
||||
return bprintf("%d", percent);
|
||||
return bprintf("%2d", percent);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
@ -194,7 +194,7 @@
|
|||
&active, &len, NULL, 0) < 0 || !len)
|
||||
return NULL;
|
||||
|
||||
return bprintf("%d", active * 100 / npages);
|
||||
return bprintf("%2d", active * 100 / npages);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -66,7 +66,8 @@ static const char unknown_str[] = "n/a";
|
|||
*/
|
||||
static const struct arg args[] = {
|
||||
/* function format argument */
|
||||
{ cpu_perc, " 🖳 %s%% ", NULL },
|
||||
{ ram_perc, "| 💾 %s%% ", NULL },
|
||||
{ datetime, "%s", "| 📆%e | 🕒 %H:%M" },
|
||||
// { battery_perc, "[ %s%% ]", "BAT1"},
|
||||
{ cpu_perc, "[ %s%% ]", NULL },
|
||||
{ ram_perc, "[ %s%% ]", NULL },
|
||||
{ datetime, "%s", "[ %02e | %H:%M ]"},
|
||||
};
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
BIN
st/st
BIN
st/st
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue