aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fix wifi buffer overflows on Linuxdrkhsh2026-06-241-3/+7
| | | | | | 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.
* fix use of uninitialized volume in OSS mixerdrkhsh2026-06-241-1/+4
| | | | | if no "vol" device exists in the mixer, v was used uninitialized. return early on match and return NULL with a warning otherwise.
* openbsd swap: advance iterator, fix leaksdrkhsh2026-06-241-4/+6
| | | | | | 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.
* license: bump copyright yeardrkhsh2026-02-121-1/+1
|
* fix buffer overflow in battery state parsingdrkhsh2026-02-121-2/+2
| | | | | | "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.
* wifi: always retry ioctl for ifindexdrkhsh2026-02-121-4/+4
| | | | | | | | | | | 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
* volume: avoid NULL dereference in onval() on sndio device switchChris Billington2026-02-121-0/+2
|
* more concise memory calculation on Linuxdrkhsh2025-07-243-23/+57
| | | | | | | | | | | | | | | 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
* fix name confusion in LICENSEdrkhsh2025-07-161-1/+1
| | | | thanks for reporting, dsp
* bump version to 1.1drkhsh2025-04-301-1/+1
|
* refactor wifi on linuxdrkhsh2025-04-301-23/+21
|
* update LICENSE and READMEdrkhsh2025-04-302-2/+5
|
* fix compiler warning with newer gccdrkhsh2025-04-301-0/+1
|
* add 'up' for whether a interface is up or downsewn2025-04-303-0/+28
|
* Add underscore to separators in strtok() call in keymap.cAl2025-04-301-2/+2
|
* wifi: switch to nl80211 interfaceJoakim Sindholt2025-04-301-58/+206
|
* Release stable 1.0 versiondrkhsh2023-07-042-7/+1
|
* Add back version flag to prepare for releasedrkhsh2023-05-153-2/+6
|
* Fix release tarball to prepare for releasedrkhsh2023-05-151-2/+3
| | | | Correctly copies components to sub-directory, adds all required files
* README: Sync description from manpagedrkhsh2023-04-231-2/+4
|
* manpage: Quality improvementsdrkhsh2023-04-231-4/+21
| | | | | Adds signals section to the manpage and generally improves contents and wording
* More LICENSE updatesdrkhsh2022-12-191-4/+4
| | | | Regarding 305aa5138add5971456c880219fe859cd4189624
* Revert "config.mk: Fix PREFIX assignment"drkhsh2022-12-191-1/+1
| | | | | "?=" is not POSIX, packagers should use "make PREFIX=". This reverts commit c225c4315161a992b9e44dd990d083ee57f7f713.
* Update LICENSEdrkhsh2022-12-191-1/+1
| | | | Real names should be used if possible, as the license is legally binding
* Update LICENSEdrkhsh2022-12-191-0/+2
|
* entropy: Use Unicode escape sequence in stringplanet362022-12-191-1/+2
| | | | Signed-off-by: drkhsh <me@drkhsh.at>
* config.mk: Fix PREFIX assignmentplanet362022-12-191-1/+1
| | | | Signed-off-by: drkhsh <me@drkhsh.at>
* num_files: opendir() returns a directory streamplanet362022-12-191-4/+4
| | | | | | | opendir() returns a directory stream, not a file descriptor Co-authored-by: drkhsh <me@drkhsh.at> Signed-off-by: drkhsh <me@drkhsh.at>
* Make LEN macro consistent with other suckless reposplanet362022-12-191-1/+1
| | | | Signed-off-by: drkhsh <me@drkhsh.at>
* battery: Consistent naming for capacity percentageplanet362022-12-191-7/+10
| | | | | | | 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>
* Sort functions by nameplanet362022-12-192-7/+7
| | | | | Co-authored-by: drkhsh <me@drkhsh.at> Signed-off-by: drkhsh <me@drkhsh.at>
* uptime: Use sizeof instead of repeating the sizeplanet362022-12-191-1/+1
| | | | Signed-off-by: drkhsh <me@drkhsh.at>
* keymap: Variable "layout" should be constplanet362022-12-191-2/+3
| | | | Signed-off-by: drkhsh <me@drkhsh.at>
* disk: Cast fsblkcnt_t to double instead of floatplanet362022-12-191-1/+1
| | | | Signed-off-by: drkhsh <me@drkhsh.at>
* verr: Remove special "usage" caseplanet362022-12-191-3/+0
| | | | | | | | In function verr, remove special case for "usage" string Co-authored-by: drkhsh <me@drkhsh.at> Signed-off-by: drkhsh <me@drkhsh.at>
* config.def.h: Remove stray double quote in commentplanet362022-12-191-1/+1
| | | | Signed-off-by: drkhsh <me@drkhsh.at>
* Update READMEdrkhsh2022-12-191-3/+2
|
* battery: Fix remaining on LinuxPatrick Iacob2022-12-011-2/+2
| | | | | | | | 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.
* New component: catdrkhsh2022-11-245-0/+38
| | | | | | | Generically reads an arbitrary file natively. Saves a few layers of execution in comparison to using `run_command` with an argument like `cat ./file`.
* README: Add note about FreeBSD sndio depdrkhsh2022-10-281-2/+3
|
* radical re-formatting 3/3: Error checksdrkhsh2022-10-284-17/+15
| | | | | | | | Check for `< 0` instead of `== -1`. Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
* radical re-formatting 2/3: Fix blocksdrkhsh2022-10-2814-152/+93
| | | | | | Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
* radical re-formatting 1/3: Fix spacingdrkhsh2022-10-285-24/+24
| | | | | | Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
* radical re-formatting 0/3: Alphabetic headersdrkhsh2022-10-2820-29/+29
| | | | | | | | Except stated otherwise in comment. Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
* ram: Refactor on OpenBSDdrkhsh2022-10-281-23/+17
| | | | Fixes up overly complicated lines, by splitting up logic
* ram: Refactor Linux perc/useddrkhsh2022-10-281-7/+7
| | | | Fixes up overly complicated line, by splitting up logic
* battery: Refactor remaining on OpenBSDdrkhsh2022-10-281-3/+4
| | | | Fixes up overly complicated line, by splitting up logic
* temp: Put sysctl into define to avoid line wrapsdrkhsh2022-10-281-2/+4
| | | | | Long, wrapped, multi-line if statements suck to read. This fixes readability.
* various: Put paths into defines to avoid line wrapsdrkhsh2022-10-285-41/+36
| | | | | | Long, wrapped, multi-line if statements suck to read. This fixes readability in the worst places by packing format strings for paths into defines.
* separator: kill that useless thingdrkhsh2022-10-284-16/+0
| | | | Just use the format strings dude. :)