Commit Graph

22 Commits

Author SHA1 Message Date
Michael Stapelberg 73c6eb2d4c use param structs everywhere for consistency 2021-11-02 21:45:31 +01:00
Michael Stapelberg 48d817a653 ipv6: fix colors (+ param struct) 2021-11-02 20:23:42 +01:00
Felix Buehler ebaeb8fb23 use format_placeholder for ipv6_addr 2020-03-31 15:03:18 +02:00
Michael Stapelberg a57cdc84e2
Switch to autotools (#316) 2019-01-23 08:56:40 +01:00
Felix Buehler 52e9f6f63b able to print percentage
its now possible to have percentage before and after a variable. except
for the date. But percentage with dates does not make much sense to me, so
i skipped it.
2018-07-13 15:03:31 +02:00
Michael Stapelberg d74e904bf4 clang-format-3.5 -i **/*.[ch], update modeline
From here on, we’ll use clang-format to automatically format the source.

This has worked well in i3, so we are introducing it for i3status.
2015-03-16 10:01:07 +01:00
Mats 4f7da73885 Unify use of string comparisons
* strncmp(s1, s2, strlen(s2)) → BEGINS_WITH(s1, s2)
* strncmp(s1, s2, strlen(s1)) → strcmp(s1, s2)
* Prefer case-insensitive comparison for options
2014-03-12 08:28:16 +01:00
Michael Stapelberg d52b9f82ca ipv6: properly handle colors for output_format == xmobar 2013-02-23 18:04:52 +01:00
Michael Stapelberg 5c615f7074 Save the DNS lookup for K.root-servers.net (Thanks barfoos)
This avoids running into a timeout when there is no connectivity on
i3status startup.
2012-09-29 00:08:56 +02:00
Lars Kumbier f5c96008b0 colorful ipv6 status message 2012-07-10 20:37:54 +02:00
Michael Stapelberg 296eb5e706 Error handling: Never output null as full_text (JSON), prefix messages with i3status (Thanks Artemis)
The former made i3bar crash, the latter is helpful for debugging.
2012-05-09 18:56:57 +02:00
Michael Stapelberg 4ddd115af8 Use (void) instead of () for functions without args (Thanks fernandotcl)
See also:
http://article.gmane.org/gmane.linux.kernel/1268792

The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors.
2012-05-07 08:28:04 +02:00
Jasper Lievisse Adriaanse 6eac8bee58 Fix include order; fixes build on OpenBSD. 2012-04-28 10:08:37 +02:00
Michael Stapelberg 1b3aa40485 add yajl compat code 2012-04-08 14:05:47 +02:00
Michael Stapelberg 12b1bfa9b8 Properly output JSON with libyajl 2012-03-25 22:05:00 +02:00
Michael Stapelberg d5b4c8e368 Implement the i3bar JSON protocol
This hardcodes all the JSON parts. Strings are not properly escaped currently.
The best/easiest way to fix this is by actually using libyajl.
2012-02-16 23:30:54 +00:00
Michael Stapelberg 39feebea4d Cache the result of the DNS query also if there is no IPv6 connectivity (Thanks dothebart) 2011-01-03 15:00:42 +01:00
Michael Stapelberg c645340b1d Little style fixes for the last commit 2010-04-06 14:55:22 +02:00
Christian Dietrich 8edce05764 ipv6: provide format strings for ipv6 up and ipv6 down 2010-04-06 14:54:25 +02:00
Michael Stapelberg ced822f461 ipv6: cache the result of the DNS query only, the socket needs to be re-created every time 2010-01-04 11:16:59 +01:00
Michael Stapelberg 37882cee88 ipv6: reuse the existing socket for further lookups
This reduces network overhead if you do not run a local caching
nameserver.
2010-01-01 22:01:57 +01:00
Michael Stapelberg f947d0a446 Breaks configfiles! Major refactoring of i3status, see below
We finally switched to libconfuse for a configuration file format
which does not require much work for the programmer nor for the user.
Plus, it avoids the Not-Invented-Here syndrome of yet another config
file format.

Furthermore, as a consequence of providing format strings for every
"module" (ipv6, wireless, …), we directly print the output and thus
we needed to drop support for wmii. This allowed us to get rid of
quite some complexity.

Documentation about the new configuration file and options will
follow. This commit is the beginning of what will be i3status v2.0.
2009-10-11 22:14:29 +02:00