]>
git.sur5r.net Git - i3/i3status/log
Ingo Bürk [Fri, 22 Jun 2018 11:55:09 +0000 (13:55 +0200)]
Merge pull request #290 from duskCoder/changes
Fix potential issues & avoid unnecessary instructions
Olivier Gayot [Wed, 20 Jun 2018 11:41:59 +0000 (13:41 +0200)]
Prevent potential crash if glob() fails
Calling globfree(NULL) is undefined behaviour. In Linux (glibc), it
results in a segmentation fault.
It is also undefined behaviour to call globfree(&pglob) if a previous
call to glob(&pglob) returned an error.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Olivier Gayot [Wed, 20 Jun 2018 09:58:10 +0000 (11:58 +0200)]
Fix potential memory leak on Linux
The function slurp_all_batteries(), on Linux, allocates memory
dynamically
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Olivier Gayot [Wed, 20 Jun 2018 09:42:59 +0000 (11:42 +0200)]
Fix invalid handling of glob() errors on Linux
The manual of glob(3) says that the function returns 0 on successful
completion. Any other integer value should be considered an error, not
only negative integers.
In practice, *BSD systems use negative values but Linux uses positive
integers.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Olivier Gayot [Tue, 19 Jun 2018 17:25:15 +0000 (19:25 +0200)]
Fix use of undefined macro __OpenBSD__
Compiling on Linux with -Wundef produces the following warning:
warning: "__OpenBSD__" is not defined, evaluates to 0 [-Wundef]
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Olivier Gayot [Wed, 13 Jun 2018 07:53:50 +0000 (09:53 +0200)]
Avoid assigning a new value to a var before using the old value
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Olivier Gayot [Tue, 12 Jun 2018 07:41:44 +0000 (09:41 +0200)]
Make sure the arguments passed to printf/die(...) match the format
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Olivier Gayot [Mon, 11 Jun 2018 22:52:29 +0000 (00:52 +0200)]
No longer use a temporary buffer in the die() function
Before the following change
f947d0a Breaks configfiles! Major refactoring of i3status, see below
The die(fmt, ...) function was outputting the reason to the status bar
in addition to stderr. For this reason, it was meaningful to create a
temporary string according to the format string and then passing it
around to the different functions.
Nowadays, we only display the error message to stderr so calling
fprintf(stderr, ...) is much simpler.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Ingo Bürk [Wed, 20 Jun 2018 06:39:59 +0000 (08:39 +0200)]
Merge pull request #289 from bebehei/testsuite
Testsuite
Benedikt Heine [Tue, 19 Jun 2018 15:15:28 +0000 (17:15 +0200)]
Show differing results, if testcase fails
Benedikt Heine [Tue, 19 Jun 2018 14:58:15 +0000 (16:58 +0200)]
Run all travis tests and expose the final result as exit code
Benedikt Heine [Tue, 19 Jun 2018 14:56:48 +0000 (16:56 +0200)]
Expose the testsuite in the Makefile
Benedikt Heine [Tue, 19 Jun 2018 14:44:37 +0000 (16:44 +0200)]
Fail the tests, if i3status actually crashes
Ingo Bürk [Sat, 16 Jun 2018 12:49:09 +0000 (14:49 +0200)]
Merge pull request #287 from eplanet/emeric/man_typo
Fix man typo
eplanet [Thu, 14 Jun 2018 20:09:03 +0000 (22:09 +0200)]
Fix man typo
Ingo Bürk [Mon, 11 Jun 2018 20:18:53 +0000 (22:18 +0200)]
Merge pull request #286 from duskCoder/#283
Fix issue #283 (shown IP belonging to wrong network interface)
Olivier Gayot [Mon, 4 Jun 2018 17:59:15 +0000 (19:59 +0200)]
Fix shown IP address belonging to wrong interface
The following commit:
6a75ea9 Show IP address when address has a label
introduced a way to show the IP address of an interface when a label is
associated to the IP.
When a label is associated to an IP, the structure returned by
getifaddrs() has the label concatenated to the interface name in the
.ifa_name field as in the following example:
struct ifaddrs ifaddr = {
.ifa_name = "eth0:mylabel",
};
As a consequence, using a strict comparison between the interface name
and the .ifa_name field yields a falsy result. However, checking if the
.ifa_name starts with the interface name (e.g. eth0) does not work
either because other network interfaces can have a name which starts
with eth0.
This commit solves the issue by stripping out the optional label from
the .ifa_name field before making a strict comparison with the interface
name.
Fix #283
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Olivier Gayot [Mon, 4 Jun 2018 17:59:09 +0000 (19:59 +0200)]
Simplify the algorithm used to determine the IP address
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Ingo Bürk [Tue, 22 May 2018 04:57:45 +0000 (06:57 +0200)]
Merge pull request #282 from Stunkymonkey/mem-support
fix wrong memory-documentation
Felix Buehler [Tue, 22 May 2018 00:07:28 +0000 (02:07 +0200)]
fix wrong memory-documentation
Ingo Bürk [Sat, 19 May 2018 20:08:42 +0000 (22:08 +0200)]
Merge pull request #270 from Stunkymonkey/mem-support
initial support of memory-usage for linux
Orestis [Tue, 15 May 2018 11:46:06 +0000 (14:46 +0300)]
Merge pull request #281 from eplanet/fix_warnings
Fix MacOS build
eplanet [Tue, 15 May 2018 11:34:36 +0000 (13:34 +0200)]
Fix MacOS build
Michael Stapelberg [Fri, 11 May 2018 09:06:00 +0000 (11:06 +0200)]
release v2.12
Benedikt Heine [Mon, 16 Apr 2018 16:18:50 +0000 (18:18 +0200)]
Simplify the memory thresholds
Benedikt Heine [Mon, 16 Apr 2018 13:41:13 +0000 (15:41 +0200)]
Rename ram variables consistently
Felix Buehler [Tue, 20 Mar 2018 14:35:28 +0000 (15:35 +0100)]
Implement support for memory-usage on Linux
Ingo Bürk [Sun, 8 Apr 2018 13:53:19 +0000 (15:53 +0200)]
Merge pull request #275 from winks/patch-2
Fix NULL value on OpenBSD when there is no acpitz0
Florian Anderiasch [Fri, 6 Apr 2018 17:54:12 +0000 (19:54 +0200)]
Fix NULL value on OpenBSD when there is no acpitz0
Using %degrees on OpenBSD resulted in garbage values if sysctl doesn't
know about any cpu temperature sensors.
Ingo Bürk [Thu, 29 Mar 2018 10:50:56 +0000 (12:50 +0200)]
Merge pull request #213 from dlrobertson/addr_description
Show IP address when address has a label
Dan Robertson [Wed, 22 Mar 2017 00:39:49 +0000 (00:39 +0000)]
Show IP address when address has a label
If an address has been added with a label, ensure the correct address is
shown.
Ingo Bürk [Tue, 27 Mar 2018 07:27:43 +0000 (09:27 +0200)]
Merge pull request #264 from foutaise/master
Make iface_type() work on FreeBSD
Ingo Bürk [Tue, 27 Mar 2018 07:26:55 +0000 (09:26 +0200)]
Merge branch 'master' into master
Ingo Bürk [Tue, 27 Mar 2018 07:10:51 +0000 (09:10 +0200)]
Merge pull request #251 from tomaskrizek/man-eth-wireless-format
man: explicitly use format_up/format_down in ethernet, wireless conf
Ingo Bürk [Tue, 27 Mar 2018 07:07:53 +0000 (09:07 +0200)]
Merge pull request #243 from jasperla/fei_error
Remove overly aggressive #error
Ingo Bürk [Mon, 12 Feb 2018 15:32:01 +0000 (16:32 +0100)]
Merge pull request #266 from moreais/master
OpenBSD: fix volume display on some hardware
Carlin Bingham [Mon, 12 Feb 2018 13:12:04 +0000 (02:12 +1300)]
OpenBSD: fix volume display on some hardware
On some hardware the AUDIO_MIXER_READ ioctl requires the current number
of channels to be set, and the mute device found needs to be checked if
it belongs to the master output device.
Gerome Fournier [Wed, 7 Feb 2018 10:26:34 +0000 (11:26 +0100)]
Make iface_type() work on FreeBSD
Ingo Bürk [Tue, 6 Feb 2018 11:56:53 +0000 (12:56 +0100)]
Merge pull request #262 from foutaise/master
Add check for interval value
foutaise [Tue, 6 Feb 2018 11:30:04 +0000 (12:30 +0100)]
Add check for interval value
Ingo Bürk [Sat, 3 Feb 2018 08:36:36 +0000 (09:36 +0100)]
Merge pull request #261 from tylerbrazier/no-sloc
Remove SLOC comment from man page
Tyler Brazier [Fri, 2 Feb 2018 19:05:46 +0000 (13:05 -0600)]
Remove SLOC comment from man page
This changed happened for the readme in
73620dc876d7f76b9a6771048c5ad0ade94e5bd7
johcgt [Sun, 28 Jan 2018 14:37:51 +0000 (14:37 +0000)]
Treat zero battery capacity as "not available" (#259)
`print_battery_info` computes `batt_info.percentage_remaining` by
dividing batt_info.remaining by `full`. If `full` is `0` then the
battery remaining will be reported as "inf".
Before this, it tries to set `full` to either the design capacity or to
the last known good charge. It determines if these values are available
by checking whether their fields in `batt_info` are non-negative. As it
initialized `batt_info` with values of `-1`, a non-negative value
implies that something has provided a value.
`slurp_all_batteries` and `add_battery_info` however initialize these
fields to zero, so if these functions are called then
`batt_info.full_design` will always be used.
This means that on systems that don't provide a value for design
capacity the percentage remaining will be reported as "inf", unless the
user has set `last_full_capacity` to `true` in their `i3status.conf`.
This patch changes `print_battery_info` to expect values for the battery
capacity to be strictly greater than zero. This seems reasonable as a
battery with a capacity of zero isn't useful.
An alternative solution would be to change `slurp_all_batteries` and
`add_battery_info` to initialize `batt_info` with `-1`, as
`print_battery_info` does. This is less appealing as `add_battery_info`
is accumulating the values, so using `-1` would introduce off-by-one
errors without additional code to avoid them.
Ingo Bürk [Tue, 12 Dec 2017 17:07:19 +0000 (18:07 +0100)]
Merge pull request #255 from eplanet/update_readme
Get rid of the SLOC comment
eplanet [Mon, 11 Dec 2017 21:50:16 +0000 (22:50 +0100)]
Get rid of the SLOC comment
Emeric Planet [Mon, 11 Dec 2017 11:16:00 +0000 (12:16 +0100)]
Update comment as in #247 (#254)
Emeric Planet [Mon, 11 Dec 2017 10:38:31 +0000 (11:38 +0100)]
Add IPv6 address when IPv4 isn't available (#247)
Ingo Bürk [Sat, 9 Dec 2017 15:17:42 +0000 (16:17 +0100)]
Merge pull request #253 from eplanet/always_reload_tz
Call tzset at each time print
eplanet [Sat, 9 Dec 2017 14:48:18 +0000 (15:48 +0100)]
Call tzset at each time print
Ingo Bürk [Sat, 9 Dec 2017 12:36:27 +0000 (13:36 +0100)]
Merge pull request #252 from GuyOfThePery/patch-1
Fixed minor typos
GuyOfThePery [Sat, 9 Dec 2017 11:24:11 +0000 (13:24 +0200)]
Fixed minor typos
"you can chose" -> "you can choose"
"You can either disable the default separator altogether setting it to the empty string." -> " You can also disable the default separator altogether by setting it to the empty string."
Tomas Krizek [Sun, 3 Dec 2017 13:46:54 +0000 (14:46 +0100)]
man: explicitly use format_up/format_down in ethernet, wireless conf
Clearly indicate format_up and format_down are used for configuring ethernet
and wireless sections instead of format.
Signed-off-by: Tomas Krizek <tomas.krizek@mailbox.org>
Emeric Planet [Mon, 20 Nov 2017 18:51:48 +0000 (19:51 +0100)]
Add network test cases (#246)
Michael Stapelberg [Fri, 6 Oct 2017 05:53:58 +0000 (22:53 -0700)]
Merge pull request #237 from kousu/215-battery
Be more cautious about handling invalid battery measurements.
Emeric Planet [Tue, 29 Aug 2017 17:01:30 +0000 (19:01 +0200)]
Fix CPU unit tests (#239)
Support any amount of available cores on testing machine.
Michael Stapelberg [Mon, 18 Sep 2017 06:30:48 +0000 (08:30 +0200)]
Makefile: make PKG_CONFIG overridable (patch by Helmut Grohne)
Jasper Lievisse Adriaanse [Mon, 4 Sep 2017 11:24:54 +0000 (13:24 +0200)]
Remove overly aggressive #error
Change-Id: I8c20606d386d713cac51b620d1fcdb479a3622fe
Emeric Planet [Tue, 29 Aug 2017 17:01:30 +0000 (19:01 +0200)]
Fix CPU unit tests (#239)
Support any amount of available cores on testing machine.
kousu [Thu, 24 Aug 2017 21:57:16 +0000 (17:57 -0400)]
Repair test case.
This was introduced in #236. It looks like Travis never ran on that PR?
Anyway it's blocking me submitting this now so I'm fixing it.
kousu [Thu, 24 Aug 2017 08:11:18 +0000 (04:11 -0400)]
Be more cautious about handling invalid battery measurements.
Emeric Planet [Sat, 19 Aug 2017 12:56:30 +0000 (14:56 +0200)]
Use local timezone for battery %emptytime (#236)
Ingo Bürk [Sun, 16 Apr 2017 05:43:30 +0000 (07:43 +0200)]
Merge pull request #219 from flammi/master
Add check for virtual ethernet devices
Emeric Planet [Thu, 13 Apr 2017 19:46:21 +0000 (21:46 +0200)]
Add battery capacity parsing (#216)
The Linux power supply class defines three entries to provide battery status.
One of them wasn't used: POWER_SUPPLY_CAPACITY.
https://www.kernel.org/doc/Documentation/power/power_supply_class.txt
Fabian Franzen [Thu, 13 Apr 2017 10:51:29 +0000 (12:51 +0200)]
Added braces
Added braces to the if-statement as requested.
Fabian Franzen [Wed, 12 Apr 2017 11:11:34 +0000 (13:11 +0200)]
Fix memory leak/Use BEGINS_WITH macro
The orignal proposed code had a memory leak when returning true.
Furthermore I included the handy BEGINS_WITH macro of i3 which makes the
code (IMHO) a lot more readable.
Fabian Franzen [Wed, 12 Apr 2017 01:30:28 +0000 (03:30 +0200)]
Add check for virtual ethernet devices
The _first_ option for ethernet devices now uses the link in sysfs to determine
if it's a real device or just a virtual one (i.e veth** devices created by docker).
eplanet [Sun, 26 Mar 2017 10:54:07 +0000 (12:54 +0200)]
Multiple CPU support for cpu_usage (#209)
This change addresses the issue #199 asking for multiple CPU support. It
takes an arbitrary CPU number and outputs its usage using the same
arithmetics as for CPU aggregation. It currently doesn't support
FreeBSD.
Ingo Bürk [Thu, 16 Mar 2017 13:27:21 +0000 (14:27 +0100)]
Merge pull request #211 from ixjlyons/issue210
disk: don't remove trailing slash if path is a single character
Kenneth Lyons [Fri, 10 Mar 2017 19:24:56 +0000 (11:24 -0800)]
disk: don't remove trailing slash if path is a single character
Ingo Bürk [Wed, 8 Mar 2017 21:26:33 +0000 (22:26 +0100)]
Merge pull request #208 from stapelberg/warning
remove useless checks (we use char, not unsigned char)
Ingo Bürk [Wed, 8 Mar 2017 21:25:51 +0000 (22:25 +0100)]
Merge pull request #207 from stapelberg/disk_info
disk: sanitize trailing slashes
Michael Stapelberg [Wed, 8 Mar 2017 18:24:09 +0000 (19:24 +0100)]
remove useless checks (we use char, not unsigned char)
fixes compilation warnings
Michael Stapelberg [Wed, 8 Mar 2017 18:19:03 +0000 (19:19 +0100)]
disk: sanitize trailing slashes
fixes #200
Ingo Bürk [Tue, 7 Feb 2017 19:47:06 +0000 (20:47 +0100)]
Merge pull request #202 from jasperla/openbsd_fdleak
Plug an fd leak in the OpenBSD-specific code for _first_
Ingo Bürk [Tue, 7 Feb 2017 19:45:36 +0000 (20:45 +0100)]
Merge pull request #201 from jasperla/openbsd_bat_info
Suppress printing :00 seconds of remaining battery lifetime
Jasper Lievisse Adriaanse [Tue, 7 Feb 2017 18:23:53 +0000 (19:23 +0100)]
Plug an fd leak in the OpenBSD-specific code for _first_
Jasper Lievisse Adriaanse [Tue, 7 Feb 2017 18:25:03 +0000 (19:25 +0100)]
Suppress printing :00 seconds of remaining battery lifetime, as apm(4)'s
estimate only has a granularity of minutes.
From tb@openbsd.org
Baptiste Daroussin [Wed, 1 Feb 2017 19:28:01 +0000 (20:28 +0100)]
Fix the deciKelvin to Celsius conversion on FreeBSD (#195)
Change from ceiled value to floored value to be consistent with the
FreeBSD kernel
https://svnweb.freebsd.org/base?view=revision&revision=300421
Jasper Lievisse Adriaanse [Wed, 1 Feb 2017 07:28:38 +0000 (08:28 +0100)]
Make first_eth_interface() work on OpenBSD: (#197)
- use a define for loopback interface device
- use an approach similar to ifconfig(8) for determining device type
Jasper Lievisse Adriaanse [Wed, 1 Feb 2017 07:26:13 +0000 (08:26 +0100)]
Include sys/select.h on OpenBSD (#198)
Fixes a compilation error:
/usr/include/net80211/ieee80211_ioctl.h:339: warning: implicit declaration of function 'howmany'
/usr/include/net80211/ieee80211_ioctl.h:339: error: 'NBBY' undeclared here (not in a function)
/usr/include/net80211/ieee80211_ioctl.h:339: error: variably modified 'nr_rxmcs' at file scope
Michael Stapelberg [Sat, 21 Jan 2017 14:22:05 +0000 (15:22 +0100)]
release v2.11
Michael Stapelberg [Sat, 21 Jan 2017 14:53:09 +0000 (15:53 +0100)]
correctly write I3STATUS_VERSION on release
Michael Stapelberg [Sat, 21 Jan 2017 14:33:39 +0000 (15:33 +0100)]
Makefile: sort objects for deterministic linking order
Patch by Reiner Herrmann
Michael Stapelberg [Sat, 21 Jan 2017 14:31:51 +0000 (15:31 +0100)]
man: fix spelling errors
Michael Stapelberg [Sat, 21 Jan 2017 14:15:01 +0000 (15:15 +0100)]
man: switch link to directly go to github
Moritz Warning [Mon, 2 Jan 2017 15:06:06 +0000 (16:06 +0100)]
Consolidate measure speed script (#188)
* remove old net speed scripts
* add reworked net-speed script
* add space between rate and speed suffix
it is easier to parse visually
* only use intervals greater zero
* add ifaces examples
* catch negativ byte count
happens when the counter resets
Zhong Jianxin [Sun, 25 Dec 2016 22:00:15 +0000 (06:00 +0800)]
Re-license contrib/netspeed to the same as i3status (#189)
Signed-off-by: Zhong Jianxin <azuwis@gmail.com>
Samuel Holland [Tue, 13 Dec 2016 18:32:57 +0000 (12:32 -0600)]
Fix i3status to compile with -fno-common (#185)
This avoids multiple declarations of the same global variable in
different source files.
eplanet [Sat, 19 Nov 2016 14:02:10 +0000 (15:02 +0100)]
Adding documentation for PR #179 (#182)
Michael Stapelberg [Wed, 16 Nov 2016 21:45:59 +0000 (13:45 -0800)]
Merge pull request #179 from mihaicmn/feature-threshold-format
Provide format_above_threshold/format_below_threshold options
Michael Stapelberg [Tue, 15 Nov 2016 17:27:44 +0000 (09:27 -0800)]
Merge pull request #178 from eplanet/ut_cpu_temp
Unit testing some new cases
Mihai Coman [Tue, 15 Nov 2016 11:34:06 +0000 (13:34 +0200)]
Add unit tests for threshold format
Mihai Coman [Mon, 14 Nov 2016 20:10:19 +0000 (22:10 +0200)]
Add 'format_below_threshold' option for 'disk' module
Add 'format_above_threshold' option for 'cpu_temperature' module
Add 'format_above_threshold' option for 'cpu_usage' module
Add 'format_above_threshold' option for 'load' module
eplanet [Mon, 14 Nov 2016 21:33:09 +0000 (21:33 +0000)]
Added test case for run_watch
The valid test case assumes pid 1 exists, which should always
be true on Unix environment.
eplanet [Mon, 14 Nov 2016 21:24:16 +0000 (21:24 +0000)]
Added unit test case for path_exists
eplanet [Mon, 14 Nov 2016 20:58:58 +0000 (20:58 +0000)]
Added unit test case for CPU temperature
eplanet [Mon, 14 Nov 2016 08:13:44 +0000 (09:13 +0100)]
Unit testing in Travis (#170)
Jon Bernard [Sat, 12 Nov 2016 14:39:41 +0000 (09:39 -0500)]
Use blank padding for wireless quality (#166) (#167)
Björn Lindström [Mon, 24 Oct 2016 06:43:04 +0000 (13:43 +0700)]
Setting of custom locale in tztime configuration. (#168)
To be able to show my birth country's time zone in that country's locale, and my local time in my current locale.
Stu Zhao [Sun, 23 Oct 2016 19:20:31 +0000 (15:20 -0400)]
Detect batteries using glob (#163)