<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slstatus/components, branch native-functions</title>
<subtitle>A custom configuration of the suckless status utility</subtitle>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/'/>
<entry>
<title>fix buffer overflow in battery state parsing</title>
<updated>2026-02-12T21:52:21+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2026-02-12T21:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=98769dfed7266b5a9959162e03bee1ddfaf5ecb4'/>
<id>98769dfed7266b5a9959162e03bee1ddfaf5ecb4</id>
<content type='text'>
"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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"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.
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: always retry ioctl for ifindex</title>
<updated>2026-02-12T21:46:02+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2026-02-12T21:46:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=4f61bbbd8e9278c75f29e7853ae8922717261d2d'/>
<id>4f61bbbd8e9278c75f29e7853ae8922717261d2d</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>volume: avoid NULL dereference in onval() on sndio device switch</title>
<updated>2026-02-12T21:45:28+00:00</updated>
<author>
<name>Chris Billington</name>
<email>emulti@disroot.org</email>
</author>
<published>2025-11-21T04:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=6fa36bad9f74154d4bf3be834ada93e04bf737e1'/>
<id>6fa36bad9f74154d4bf3be834ada93e04bf737e1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>more concise memory calculation on Linux</title>
<updated>2025-07-24T20:41:25+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2025-07-24T20:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=8723e8b8c69c08bae8abe02ea1f4a49758b8bdfc'/>
<id>8723e8b8c69c08bae8abe02ea1f4a49758b8bdfc</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor wifi on linux</title>
<updated>2025-04-30T02:00:53+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2025-04-30T01:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=3db023f13b85de9cd63096d17b025a6cce39ef88'/>
<id>3db023f13b85de9cd63096d17b025a6cce39ef88</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add 'up' for whether a interface is up or down</title>
<updated>2025-04-30T01:09:55+00:00</updated>
<author>
<name>sewn</name>
<email>sewn@disroot.org</email>
</author>
<published>2024-03-15T21:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=af508f0b4cf88b1921c59fdf5dd1a98c08223fa5'/>
<id>af508f0b4cf88b1921c59fdf5dd1a98c08223fa5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add underscore to separators in strtok() call in keymap.c</title>
<updated>2025-04-30T01:08:02+00:00</updated>
<author>
<name>Al</name>
<email>eirann@disroot.org</email>
</author>
<published>2024-07-07T06:54:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=b6267f7d0bedf5789206adf21f33cfe1a872289c'/>
<id>b6267f7d0bedf5789206adf21f33cfe1a872289c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: switch to nl80211 interface</title>
<updated>2025-04-30T00:59:42+00:00</updated>
<author>
<name>Joakim Sindholt</name>
<email>opensource@zhasha.com</email>
</author>
<published>2024-07-30T20:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=0b00c0319c7b4a941b40aa8709bb4c478f9a9b1f'/>
<id>0b00c0319c7b4a941b40aa8709bb4c478f9a9b1f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>entropy: Use Unicode escape sequence in string</title>
<updated>2022-12-19T01:44:21+00:00</updated>
<author>
<name>planet36</name>
<email>planet36@users.noreply.github.com</email>
</author>
<published>2022-10-28T15:49:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=581d937e51d10e6e74868d2397081b12952eae07'/>
<id>581d937e51d10e6e74868d2397081b12952eae07</id>
<content type='text'>
Signed-off-by: drkhsh &lt;me@drkhsh.at&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: drkhsh &lt;me@drkhsh.at&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>num_files: opendir() returns a directory stream</title>
<updated>2022-12-19T01:44:21+00:00</updated>
<author>
<name>planet36</name>
<email>planet36@users.noreply.github.com</email>
</author>
<published>2021-05-12T02:45:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=984f45719e8ac9f4451c2d009fb34e28afdfbdb6'/>
<id>984f45719e8ac9f4451c2d009fb34e28afdfbdb6</id>
<content type='text'>
opendir() returns a directory stream, not a file descriptor

Co-authored-by: drkhsh &lt;me@drkhsh.at&gt;
Signed-off-by: drkhsh &lt;me@drkhsh.at&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
opendir() returns a directory stream, not a file descriptor

Co-authored-by: drkhsh &lt;me@drkhsh.at&gt;
Signed-off-by: drkhsh &lt;me@drkhsh.at&gt;
</pre>
</div>
</content>
</entry>
</feed>
