| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
pass sizeof(struct sockaddr_in) for AF_INET instead of always using
sizeof(struct sockaddr_in6). also skip getnameinfo entirely for
non-matching interfaces rather than calling it for every entry.
|
| |
|
|
|
|
| |
replace strcpy of interface name into ifr_name (IFNAMSIZ=16) with
bounds-checked snprintf. add one byte to resp buffer so NUL-terminating
the SSID at resp boundary does not write out of bounds.
|
| |
|
|
|
| |
if no "vol" device exists in the mixer, v was used uninitialized.
return early on match and return NULL with a warning otherwise.
|
| |
|
|
|
|
| |
the swap entry loop read the first entry repeatedly instead of
iterating with sep[i]. also free the allocation on error paths
and fix "SWAP_STATA" typo in the warning message.
|
| | |
|
| |
|
|
|
|
| |
"Not charging" is 12 characters; %12[a-zA-Z ] reads up to 12 chars
plus a NUL terminator (13 bytes) into a 12-byte buffer. Increase
state buffer to 13 in both battery_state and battery_remaining.
|
| |
|
|
|
|
|
|
|
|
|
| |
ifindex() caches the result of ioctl(SIOCGIFINDEX) and never
retries it, since the interface name strcmp succeeds after the
first call. if the interface does not exist when slstatus starts
(e.g. iwd with default config destroys/recreates interfaces
depending on service state), the ioctl fails and the stale
result is returned on all subsequent calls.
based on a patch by ryhpez, with input from Taha Medhous
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
more flexible parsing for /proc/meminfo to take shared and reclaimable
memory into account. this matches the output with free(1).
additionally this could fix some corner cases, as the order of fields in
/proc/meminfo is not strictly defined.
slstatus:
percent 81% free 2.5 Gi total 23.4 Gi used 19.0 Gi
free(1):
total used free shared buff/cache available
Mem: 23Gi 19Gi 2.5Gi 1.3Gi 3.2Gi 3.6Gi
|
| |
|
|
| |
thanks for reporting, dsp
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Correctly copies components to sub-directory, adds all required files
|
| | |
|
| |
|
|
|
| |
Adds signals section to the manpage and generally improves contents and
wording
|
| |
|
|
| |
Regarding 305aa5138add5971456c880219fe859cd4189624
|
| |
|
|
|
| |
"?=" is not POSIX, packagers should use "make PREFIX=".
This reverts commit c225c4315161a992b9e44dd990d083ee57f7f713.
|
| |
|
|
| |
Real names should be used if possible, as the license is legally binding
|
| | |
|
| |
|
|
| |
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
| |
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
|
|
|
| |
opendir() returns a directory stream, not a file descriptor
Co-authored-by: drkhsh <me@drkhsh.at>
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
| |
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
|
|
|
| |
https://www.kernel.org/doc/html/latest/power/power_supply_class.html
Co-authored-by: drkhsh <me@drkhsh.at>
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
|
| |
Co-authored-by: drkhsh <me@drkhsh.at>
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
| |
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
| |
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
| |
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
|
|
|
|
| |
In function verr, remove special case for "usage"
string
Co-authored-by: drkhsh <me@drkhsh.at>
Signed-off-by: drkhsh <me@drkhsh.at>
|
| |
|
|
| |
Signed-off-by: drkhsh <me@drkhsh.at>
|
| | |
|
| |
|
|
|
|
|
|
| |
The current version displays the remaining time as 'n/a'.
Fixes this regression introduced in 69b2487650782f135db76078c4a7fb841cb936ac
where current_now and power_now were incorrectly replaced with current and
power when they were moved to a macro.
|
| |
|
|
|
|
|
| |
Generically reads an arbitrary file natively.
Saves a few layers of execution in comparison to using `run_command`
with an argument like `cat ./file`.
|
| | |
|
| |
|
|
|
|
|
|
| |
Check for `< 0` instead of `== -1`.
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
|
| |
|
|
|
|
| |
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
|
| |
|
|
|
|
| |
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
|
| |
|
|
|
|
|
|
| |
Except stated otherwise in comment.
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
|
| |
|
|
| |
Fixes up overly complicated lines, by splitting up logic
|
| |
|
|
| |
Fixes up overly complicated line, by splitting up logic
|
| |
|
|
| |
Fixes up overly complicated line, by splitting up logic
|
| |
|
|
|
| |
Long, wrapped, multi-line if statements suck to read.
This fixes readability.
|
| |
|
|
|
|
| |
Long, wrapped, multi-line if statements suck to read.
This fixes readability in the worst places by packing format strings for
paths into defines.
|