added patches

This commit is contained in:
λmolinae 2025-03-12 08:38:50 -06:00
parent f68f49273e
commit 8c6890f943
13 changed files with 395 additions and 205 deletions

View file

@ -6,12 +6,17 @@ const unsigned int interval = 1000;
/* text to show if no value can be retrieved */
static const char unknown_str[] = "n/a";
/* maximum output string length */
#define MAXLEN 2048
/* maximum command output length */
#define CMDLEN 128
/*
* function description argument (example)
*
* backlight_perc backlight percentage device name
* (intel_backlight, numbered on FreeBSD)
* NULL on OpenBSD
* battery_icon battery_perc with an icon battery name (BAT0)
* NULL on OpenBSD/FreeBSD
* battery_perc battery percentage battery name (BAT0)
* NULL on OpenBSD/FreeBSD
* battery_remaining battery remaining HH:MM battery name (BAT0)
@ -31,6 +36,7 @@ static const char unknown_str[] = "n/a";
* hostname hostname NULL
* ipv4 IPv4 address interface name (eth0)
* ipv6 IPv6 address interface name (eth0)
* kanji current day of week kanji NULL
* kernel_release `uname -r` NULL
* keyboard_indicators caps/num lock indicators format string (c?n?)
* see keyboard_indicators.c
@ -58,12 +64,17 @@ static const char unknown_str[] = "n/a";
* uid UID of current user NULL
* uptime system uptime NULL
* username username of current user NULL
* vol_icon vol_perc with an icon mixer file (/dev/mixer)
* NULL on OpenBSD/FreeBSD
* vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
* NULL on OpenBSD/FreeBSD
* wifi_essid WiFi ESSID interface name (wlan0)
* wifi_perc WiFi signal in percent interface name (wlan0)
*/
static const struct arg args[] = {
/* function format argument */
{ datetime, "%s", "%F %T" },
/* function format argument turn signal */
{ datetime, "%s", "%F %T", 1, -1 },
};
/* maximum output string length */
#define MAXLEN CMDLEN * LEN(args)