Commit Graph

856 Commits

Author SHA1 Message Date
Michael Stapelberg
c983ff96f2 release v2.12 2018-05-11 11:07:22 +02:00
Benedikt Heine
cba8f55938 Simplify the memory thresholds 2018-05-04 18:46:59 +02:00
Benedikt Heine
7839e93c9b Rename ram variables consistently 2018-05-04 18:46:38 +02:00
Felix Buehler
c55754542e Implement support for memory-usage on Linux 2018-04-11 22:36:41 +02:00
Ingo Bürk
82d25dc362
Merge pull request #275 from winks/patch-2
Fix NULL value on OpenBSD when there is no acpitz0
2018-04-08 15:53:19 +02:00
Florian Anderiasch
46b5c264d1 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.
2018-04-06 19:56:55 +02:00
Ingo Bürk
199a6a2713
Merge pull request #213 from dlrobertson/addr_description
Show IP address when address has a label
2018-03-29 12:50:56 +02:00
Dan Robertson
6a75ea9aea
Show IP address when address has a label
If an address has been added with a label, ensure the correct address is
shown.
2018-03-29 10:46:36 +00:00
Øyvin Halfdan Thuv
3e1213123f Read multiple batteries on DragonFly BSD.
Using ACPI to read individual battery information instead of just
accumulations from sysctl.
2018-03-27 11:52:08 +02:00
Ingo Bürk
5abed82419
Merge pull request #264 from foutaise/master
Make iface_type() work on FreeBSD
2018-03-27 09:27:43 +02:00
Ingo Bürk
4345fa9d97
Merge branch 'master' into master 2018-03-27 09:26:55 +02:00
Ingo Bürk
279e2fccf4
Merge pull request #251 from tomaskrizek/man-eth-wireless-format
man: explicitly use format_up/format_down in ethernet, wireless conf
2018-03-27 09:10:51 +02:00
Ingo Bürk
3aec438a51
Merge pull request #243 from jasperla/fei_error
Remove overly aggressive #error
2018-03-27 09:07:53 +02:00
Ingo Bürk
2cb0ffa01a
Merge pull request #266 from moreais/master
OpenBSD: fix volume display on some hardware
2018-02-12 16:32:01 +01:00
Carlin Bingham
5b416d4ac0 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.
2018-02-13 02:12:04 +13:00
Gerome Fournier
9212ee658b Make iface_type() work on FreeBSD 2018-02-07 11:26:34 +01:00
Ingo Bürk
0880b0ec03
Merge pull request #262 from foutaise/master
Add check for interval value
2018-02-06 12:56:53 +01:00
foutaise
e23eea9438 Add check for interval value 2018-02-06 12:30:04 +01:00
Ingo Bürk
1522f58ef0
Merge pull request #261 from tylerbrazier/no-sloc
Remove SLOC comment from man page
2018-02-03 09:36:36 +01:00
Tyler Brazier
d35e0ab9b6 Remove SLOC comment from man page
This changed happened for the readme in
73620dc876
2018-02-02 13:05:46 -06:00
johcgt
d5c69a9d60 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.
2018-01-28 15:37:51 +01:00
Ingo Bürk
ef8f9ddcd7
Merge pull request #255 from eplanet/update_readme
Get rid of the SLOC comment
2017-12-12 18:07:19 +01:00
eplanet
73620dc876 Get rid of the SLOC comment 2017-12-11 22:50:16 +01:00
Emeric Planet
657c0498db Update comment as in #247 (#254) 2017-12-11 12:16:00 +01:00
Emeric Planet
53fb9b4f18 Add IPv6 address when IPv4 isn't available (#247) 2017-12-11 11:38:31 +01:00
Ingo Bürk
c3424e10be
Merge pull request #253 from eplanet/always_reload_tz
Call tzset at each time print
2017-12-09 16:17:42 +01:00
eplanet
20a701bdf0 Call tzset at each time print 2017-12-09 15:48:18 +01:00
Ingo Bürk
35bb9a06fb
Merge pull request #252 from GuyOfThePery/patch-1
Fixed minor typos
2017-12-09 13:36:27 +01:00
GuyOfThePery
223de595f0
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."
2017-12-09 13:24:11 +02:00
Tomas Krizek
b9b676af20
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>
2017-12-03 14:49:40 +01:00
Emeric Planet
6464ae2df9 Add network test cases (#246) 2017-11-20 19:51:48 +01:00
Michael Stapelberg
7ea12e3dff Merge pull request #237 from kousu/215-battery
Be more cautious about handling invalid battery measurements.
2017-10-05 22:53:58 -07:00
Emeric Planet
cb9b55217d Fix CPU unit tests (#239)
Support any amount of available cores on testing machine.
2017-10-05 13:18:23 -04:00
Michael Stapelberg
9f5ac89aa4 Makefile: make PKG_CONFIG overridable (patch by Helmut Grohne) 2017-09-18 08:30:48 +02:00
Jasper Lievisse Adriaanse
83d0b621c0 Remove overly aggressive #error
Change-Id: I8c20606d386d713cac51b620d1fcdb479a3622fe
2017-09-04 13:30:21 +02:00
Emeric Planet
884e4da673 Fix CPU unit tests (#239)
Support any amount of available cores on testing machine.
2017-08-29 19:01:30 +02:00
kousu
aefa784882 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.
2017-08-24 19:00:22 -04:00
kousu
62d0905c7f Be more cautious about handling invalid battery measurements. 2017-08-24 19:00:08 -04:00
Emeric Planet
ca9bee8b88 Use local timezone for battery %emptytime (#236) 2017-08-19 14:56:30 +02:00
Ingo Bürk
0e406a1f3b Merge pull request #219 from flammi/master
Add check for virtual ethernet devices
2017-04-16 07:43:30 +02:00
Emeric Planet
c7dea74751 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
2017-04-13 21:46:21 +02:00
Fabian Franzen
6a19709e65 Added braces
Added braces to the if-statement as requested.
2017-04-13 12:51:29 +02:00
Fabian Franzen
ad3fac03c3 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.
2017-04-12 13:11:34 +02:00
Fabian Franzen
f45581f8d8 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).
2017-04-12 03:46:04 +02:00
eplanet
94651257ce 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.
2017-03-26 06:54:07 -04:00
Ingo Bürk
3ae0decbb3 Merge pull request #211 from ixjlyons/issue210
disk: don't remove trailing slash if path is a single character
2017-03-16 14:27:21 +01:00
Kenneth Lyons
8e12ad8308 disk: don't remove trailing slash if path is a single character 2017-03-10 11:24:56 -08:00
Ingo Bürk
09c758eed5 Merge pull request #208 from stapelberg/warning
remove useless checks (we use char, not unsigned char)
2017-03-08 22:26:33 +01:00
Ingo Bürk
554db9fcc1 Merge pull request #207 from stapelberg/disk_info
disk: sanitize trailing slashes
2017-03-08 22:25:51 +01:00
Michael Stapelberg
eee4ace092 remove useless checks (we use char, not unsigned char)
fixes compilation warnings
2017-03-08 19:24:09 +01:00