<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slstatus/components/battery.c, 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>battery: Consistent naming for capacity percentage</title>
<updated>2022-12-19T01:44:21+00:00</updated>
<author>
<name>planet36</name>
<email>planet36@users.noreply.github.com</email>
</author>
<published>2021-04-06T16:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=87c3dd2c36e6d1df577e87fd4d73970fe58a3007'/>
<id>87c3dd2c36e6d1df577e87fd4d73970fe58a3007</id>
<content type='text'>
https://www.kernel.org/doc/html/latest/power/power_supply_class.html

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>
https://www.kernel.org/doc/html/latest/power/power_supply_class.html

Co-authored-by: drkhsh &lt;me@drkhsh.at&gt;
Signed-off-by: drkhsh &lt;me@drkhsh.at&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>battery: Fix remaining on Linux</title>
<updated>2022-12-01T08:04:32+00:00</updated>
<author>
<name>Patrick Iacob</name>
<email>iacobp@oregonstate.edu</email>
</author>
<published>2022-11-27T04:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=982eb223a055db01bf03f44bf0203705ca7153e8'/>
<id>982eb223a055db01bf03f44bf0203705ca7153e8</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>radical re-formatting 2/3: Fix blocks</title>
<updated>2022-10-27T23:03:38+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2022-10-27T22:51:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=3251e911878b78b0aad8fc09c782f8d81c878f75'/>
<id>3251e911878b78b0aad8fc09c782f8d81c878f75</id>
<content type='text'>
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
</pre>
</div>
</content>
</entry>
<entry>
<title>radical re-formatting 1/3: Fix spacing</title>
<updated>2022-10-27T23:03:31+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2022-10-27T22:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=2104dc362ca7336d98499a5945ea2a3d371f7568'/>
<id>2104dc362ca7336d98499a5945ea2a3d371f7568</id>
<content type='text'>
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
</pre>
</div>
</content>
</entry>
<entry>
<title>radical re-formatting 0/3: Alphabetic headers</title>
<updated>2022-10-27T23:03:20+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2022-10-27T21:18:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=0696635bcbad06770cce7d5a4c9e8e4d76868307'/>
<id>0696635bcbad06770cce7d5a4c9e8e4d76868307</id>
<content type='text'>
Except stated otherwise in comment.

Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Except stated otherwise in comment.

Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
</pre>
</div>
</content>
</entry>
<entry>
<title>battery: Refactor remaining on OpenBSD</title>
<updated>2022-10-27T23:03:20+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2022-10-27T21:47:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=3b86e4b5efd0f6759b2634b607e74b938af30a60'/>
<id>3b86e4b5efd0f6759b2634b607e74b938af30a60</id>
<content type='text'>
Fixes up overly complicated line, by splitting up logic
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes up overly complicated line, by splitting up logic
</pre>
</div>
</content>
</entry>
<entry>
<title>various: Put paths into defines to avoid line wraps</title>
<updated>2022-10-27T23:01:10+00:00</updated>
<author>
<name>drkhsh</name>
<email>me@drkhsh.at</email>
</author>
<published>2022-10-27T21:44:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=69b2487650782f135db76078c4a7fb841cb936ac'/>
<id>69b2487650782f135db76078c4a7fb841cb936ac</id>
<content type='text'>
Long, wrapped, multi-line if statements suck to read.
This fixes readability in the worst places by packing format strings for
paths into defines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Long, wrapped, multi-line if statements suck to read.
This fixes readability in the worst places by packing format strings for
paths into defines.
</pre>
</div>
</content>
</entry>
<entry>
<title>components/*.c: include slstatus.h</title>
<updated>2022-10-26T21:32:07+00:00</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-10-26T20:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=28ef0b242c32e8ae8b4df2b4b380e30bf581130f'/>
<id>28ef0b242c32e8ae8b4df2b4b380e30bf581130f</id>
<content type='text'>
this gives the compiler a chance to check weather the prototype and
definiton matches or not, which would catch issues like 3c47701.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this gives the compiler a chance to check weather the prototype and
definiton matches or not, which would catch issues like 3c47701.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 'Not charging' status support</title>
<updated>2022-10-26T19:34:58+00:00</updated>
<author>
<name>Spenser Truex</name>
<email>truex@equwal.com</email>
</author>
<published>2022-10-26T19:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sobczak.family/slstatus/commit/?id=f29aa9ab0656c938ad0c0d4a6136ff25bd82ebf9'/>
<id>f29aa9ab0656c938ad0c0d4a6136ff25bd82ebf9</id>
<content type='text'>
Exists on various ThinkPads. Seems to be both a synonym for "full".

Tested on:
- ThinkPad T500 (Spenser Truex &lt;truex@equwal.com)
- ThinkPad T420 (drkhsh &lt;me@drkhsh.at)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Exists on various ThinkPads. Seems to be both a synonym for "full".

Tested on:
- ThinkPad T500 (Spenser Truex &lt;truex@equwal.com)
- ThinkPad T420 (drkhsh &lt;me@drkhsh.at)
</pre>
</div>
</content>
</entry>
</feed>
