<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slstatus/util.h, branch master</title>
<subtitle>Status monitor for window managers that use WM_NAME or stdin to fill the status bar</subtitle>
<id>https://git.ikboikov.net/slstatus/atom?h=master</id>
<link rel='self' href='https://git.ikboikov.net/slstatus/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/'/>
<updated>2022-12-19T01:44:21Z</updated>
<entry>
<title>Make LEN macro consistent with other suckless repos</title>
<updated>2022-12-19T01:44:21Z</updated>
<author>
<name>planet36</name>
<email>planet36@users.noreply.github.com</email>
</author>
<published>2021-04-13T16:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=c432c981df97f786c683435a4a06bd58fc9a7b18'/>
<id>urn:sha1:c432c981df97f786c683435a4a06bd58fc9a7b18</id>
<content type='text'>
Signed-off-by: drkhsh &lt;me@drkhsh.at&gt;
</content>
</entry>
<entry>
<title>Change uint64_t to uintmax_t</title>
<updated>2018-07-07T08:50:25Z</updated>
<author>
<name>Aaron Marcher</name>
<email>me@drkhsh.at</email>
</author>
<published>2018-07-07T08:50:25Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=43a12832a343747b7317987b552a87eb8ed5b42d'/>
<id>urn:sha1:43a12832a343747b7317987b552a87eb8ed5b42d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fmt_human: Improve types</title>
<updated>2018-07-06T05:56:46Z</updated>
<author>
<name>Aaron Marcher</name>
<email>me@drkhsh.at</email>
</author>
<published>2018-07-06T05:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=381c2fa12a82948318ddcc7bc8c26b60c3b20081'/>
<id>urn:sha1:381c2fa12a82948318ddcc7bc8c26b60c3b20081</id>
<content type='text'>
size_t may not be enough, use 64 bit integers
</content>
</entry>
<entry>
<title>Revert "Add basic backlight percentage support"</title>
<updated>2018-05-27T14:46:03Z</updated>
<author>
<name>Aaron Marcher</name>
<email>me@drkhsh.at</email>
</author>
<published>2018-05-27T14:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=c28643ce5bc8c7fd825e4eabbd915bad2b91dbd0'/>
<id>urn:sha1:c28643ce5bc8c7fd825e4eabbd915bad2b91dbd0</id>
<content type='text'>
On OpenBSD the backlight percentage cannot be retrieved in a simple way.
The only two solutions we are aware of for now are:

 - reading from /dev/ttyC0: which isn't possible without changing
 permissions or running slstatus as root
 - linking against xcb-xrandr: which is bloat and does not work in every
 case appearently

This reverts commit 37724ac2c3f496f4736223d0d8e5d8fecb933590 for now.
</content>
</entry>
<entry>
<title>Add basic backlight percentage support</title>
<updated>2018-05-22T10:40:31Z</updated>
<author>
<name>David Demelier</name>
<email>markand@malikania.fr</email>
</author>
<published>2018-05-22T07:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=37724ac2c3f496f4736223d0d8e5d8fecb933590'/>
<id>urn:sha1:37724ac2c3f496f4736223d0d8e5d8fecb933590</id>
<content type='text'>
At the moment linux only, but will add support for OpenBSD as well.
</content>
</entry>
<entry>
<title>Refactor fmt_human() and fix a bug</title>
<updated>2018-05-21T18:28:57Z</updated>
<author>
<name>Laslo Hunhold</name>
<email>dev@frign.de</email>
</author>
<published>2018-05-21T18:08:56Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=ceb13206a4d9f410ab49c3824c487658c341d8c8'/>
<id>urn:sha1:ceb13206a4d9f410ab49c3824c487658c341d8c8</id>
<content type='text'>
It is not necessary to copy memory or anything. Just keep a pointer to
the active prefix-array and assign the length of the arrays to a
variable.

Make the code more readable by using a switch, be more strict when an
invalid base is passed to it and fix a small oversight in the bottom of
the code where the base 1024 was forgotten to generalized.
</content>
</entry>
<entry>
<title>Merge fmt_human_2 and fmt_human_10 to one function</title>
<updated>2018-05-21T12:44:21Z</updated>
<author>
<name>Aaron Marcher</name>
<email>me@drkhsh.at</email>
</author>
<published>2018-05-21T12:44:21Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=10dbc9543edd5b5a7929dd8fa87ed33dd545375c'/>
<id>urn:sha1:10dbc9543edd5b5a7929dd8fa87ed33dd545375c</id>
<content type='text'>
Now only one function, fmt_human, takes an additional argument "base".
</content>
</entry>
<entry>
<title>Remove units from numbers</title>
<updated>2018-05-20T22:16:54Z</updated>
<author>
<name>Aaron Marcher</name>
<email>me@drkhsh.at</email>
</author>
<published>2018-05-20T22:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=ec5c35ec9f23254f09e734d0c1880559774dfa52'/>
<id>urn:sha1:ec5c35ec9f23254f09e734d0c1880559774dfa52</id>
<content type='text'>
This is a first step to decouple formatting from information because of
two reasons:

 1. The components should only gather and return the values by design
 2. Fine grained user control should be a focus

Scaling will be implemented in a different way in a later commit.
</content>
</entry>
<entry>
<title>Implement fmt_human_2() and fmt_human_10()</title>
<updated>2018-05-19T20:58:21Z</updated>
<author>
<name>Laslo Hunhold</name>
<email>dev@frign.de</email>
</author>
<published>2018-05-19T20:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=46c4540dd2f6181e77b0800a4e007d78d0162487'/>
<id>urn:sha1:46c4540dd2f6181e77b0800a4e007d78d0162487</id>
<content type='text'>
These functions take the raw number and a unit and automatically
print it out "scaled down" to a proper SI-prefix, for powers of 2
and 10 respectively.

Apply them to the 2-power cases and keep the 10-power for a later
commit.
</content>
</entry>
<entry>
<title>Implement esnprintf() and make formatted calls more efficient</title>
<updated>2018-05-19T17:44:02Z</updated>
<author>
<name>Laslo Hunhold</name>
<email>dev@frign.de</email>
</author>
<published>2018-05-19T17:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/slstatus/commit/?id=422cadfd5ffd78ae1b8fdf15734e03bd0333b26e'/>
<id>urn:sha1:422cadfd5ffd78ae1b8fdf15734e03bd0333b26e</id>
<content type='text'>
Within the components, snprintf() was unchecked and had inefficient
calls in some places.
We implement esnprintf() that does all the dirty laundry for us
and use it exclusively now.
</content>
</entry>
</feed>
