]> git.sur5r.net Git - i3/i3status/log
i3/i3status
6 years agoFix shown IP address belonging to wrong interface 286/head
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>
6 years agoSimplify the algorithm used to determine the IP address
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>
6 years agoMerge pull request #282 from Stunkymonkey/mem-support
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

6 years agofix wrong memory-documentation 282/head
Felix Buehler [Tue, 22 May 2018 00:07:28 +0000 (02:07 +0200)]
fix wrong memory-documentation

6 years agoMerge pull request #270 from Stunkymonkey/mem-support
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

6 years agoMerge pull request #281 from eplanet/fix_warnings
Orestis [Tue, 15 May 2018 11:46:06 +0000 (14:46 +0300)]
Merge pull request #281 from eplanet/fix_warnings

Fix MacOS build

6 years agoFix MacOS build 281/head
eplanet [Tue, 15 May 2018 11:34:36 +0000 (13:34 +0200)]
Fix MacOS build

6 years agorelease v2.12 2.12
Michael Stapelberg [Fri, 11 May 2018 09:06:00 +0000 (11:06 +0200)]
release v2.12

6 years agoSimplify the memory thresholds 270/head
Benedikt Heine [Mon, 16 Apr 2018 16:18:50 +0000 (18:18 +0200)]
Simplify the memory thresholds

6 years agoRename ram variables consistently
Benedikt Heine [Mon, 16 Apr 2018 13:41:13 +0000 (15:41 +0200)]
Rename ram variables consistently

6 years agoImplement support for memory-usage on Linux
Felix Buehler [Tue, 20 Mar 2018 14:35:28 +0000 (15:35 +0100)]
Implement support for memory-usage on Linux

6 years agoMerge pull request #275 from winks/patch-2
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

6 years agoFix NULL value on OpenBSD when there is no acpitz0 275/head
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.

6 years agoMerge pull request #213 from dlrobertson/addr_description
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

6 years agoShow IP address when address has a label 213/head
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.

6 years agoMerge pull request #264 from foutaise/master
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

6 years agoMerge branch 'master' into master 264/head
Ingo Bürk [Tue, 27 Mar 2018 07:26:55 +0000 (09:26 +0200)]
Merge branch 'master' into master

6 years agoMerge pull request #251 from tomaskrizek/man-eth-wireless-format
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

6 years agoMerge pull request #243 from jasperla/fei_error
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

6 years agoMerge pull request #266 from moreais/master
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

6 years agoOpenBSD: fix volume display on some hardware 266/head
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.

6 years agoMake iface_type() work on FreeBSD
Gerome Fournier [Wed, 7 Feb 2018 10:26:34 +0000 (11:26 +0100)]
Make iface_type() work on FreeBSD

6 years agoMerge pull request #262 from foutaise/master
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

6 years agoAdd check for interval value 262/head
foutaise [Tue, 6 Feb 2018 11:30:04 +0000 (12:30 +0100)]
Add check for interval value

6 years agoMerge pull request #261 from tylerbrazier/no-sloc
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

6 years agoRemove SLOC comment from man page 261/head
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

6 years agoTreat zero battery capacity as "not available" (#259)
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.

6 years agoMerge pull request #255 from eplanet/update_readme
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

6 years agoGet rid of the SLOC comment 255/head
eplanet [Mon, 11 Dec 2017 21:50:16 +0000 (22:50 +0100)]
Get rid of the SLOC comment

6 years agoUpdate comment as in #247 (#254)
Emeric Planet [Mon, 11 Dec 2017 11:16:00 +0000 (12:16 +0100)]
Update comment as in #247 (#254)

6 years agoAdd IPv6 address when IPv4 isn't available (#247)
Emeric Planet [Mon, 11 Dec 2017 10:38:31 +0000 (11:38 +0100)]
Add IPv6 address when IPv4 isn't available (#247)

6 years agoMerge pull request #253 from eplanet/always_reload_tz
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

6 years agoCall tzset at each time print 253/head
eplanet [Sat, 9 Dec 2017 14:48:18 +0000 (15:48 +0100)]
Call tzset at each time print

6 years agoMerge pull request #252 from GuyOfThePery/patch-1
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

6 years agoFixed minor typos 252/head
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."

6 years agoman: explicitly use format_up/format_down in ethernet, wireless conf 251/head
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>
7 years agoAdd network test cases (#246)
Emeric Planet [Mon, 20 Nov 2017 18:51:48 +0000 (19:51 +0100)]
Add network test cases (#246)

7 years agoMerge pull request #237 from kousu/215-battery
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.

7 years agoFix CPU unit tests (#239) 237/head
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.

7 years agoMakefile: make PKG_CONFIG overridable (patch by Helmut Grohne)
Michael Stapelberg [Mon, 18 Sep 2017 06:30:48 +0000 (08:30 +0200)]
Makefile: make PKG_CONFIG overridable (patch by Helmut Grohne)

7 years agoRemove overly aggressive #error 243/head
Jasper Lievisse Adriaanse [Mon, 4 Sep 2017 11:24:54 +0000 (13:24 +0200)]
Remove overly aggressive #error

Change-Id: I8c20606d386d713cac51b620d1fcdb479a3622fe

7 years agoFix CPU unit tests (#239)
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.

7 years agoRepair test case.
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.

7 years agoBe more cautious about handling invalid battery measurements.
kousu [Thu, 24 Aug 2017 08:11:18 +0000 (04:11 -0400)]
Be more cautious about handling invalid battery measurements.

7 years agoUse local timezone for battery %emptytime (#236)
Emeric Planet [Sat, 19 Aug 2017 12:56:30 +0000 (14:56 +0200)]
Use local timezone for battery %emptytime (#236)

7 years agoMerge pull request #219 from flammi/master
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

7 years agoAdd battery capacity parsing (#216)
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

7 years agoAdded braces 219/head
Fabian Franzen [Thu, 13 Apr 2017 10:51:29 +0000 (12:51 +0200)]
Added braces

Added braces to the if-statement as requested.

7 years agoFix memory leak/Use BEGINS_WITH macro
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.

7 years agoAdd check for virtual ethernet devices
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).

7 years agoMultiple CPU support for cpu_usage (#209)
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.

7 years agoMerge pull request #211 from ixjlyons/issue210
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

7 years agodisk: don't remove trailing slash if path is a single character 211/head
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

7 years agoMerge pull request #208 from stapelberg/warning
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)

7 years agoMerge pull request #207 from stapelberg/disk_info
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

7 years agoremove useless checks (we use char, not unsigned char) 208/head
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

7 years agodisk: sanitize trailing slashes 207/head
Michael Stapelberg [Wed, 8 Mar 2017 18:19:03 +0000 (19:19 +0100)]
disk: sanitize trailing slashes

fixes #200

7 years agoMerge pull request #202 from jasperla/openbsd_fdleak
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_

7 years agoMerge pull request #201 from jasperla/openbsd_bat_info
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

7 years agoPlug an fd leak in the OpenBSD-specific code for _first_ 202/head
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_

7 years agoSuppress printing :00 seconds of remaining battery lifetime, as apm(4)'s 201/head
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

7 years agoFix the deciKelvin to Celsius conversion on FreeBSD (#195)
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

7 years agoMake first_eth_interface() work on OpenBSD: (#197)
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

7 years agoInclude sys/select.h on OpenBSD (#198)
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

7 years agorelease v2.11 2.11
Michael Stapelberg [Sat, 21 Jan 2017 14:22:05 +0000 (15:22 +0100)]
release v2.11

7 years agocorrectly write I3STATUS_VERSION on release
Michael Stapelberg [Sat, 21 Jan 2017 14:53:09 +0000 (15:53 +0100)]
correctly write I3STATUS_VERSION on release

7 years agoMakefile: sort objects for deterministic linking order
Michael Stapelberg [Sat, 21 Jan 2017 14:33:39 +0000 (15:33 +0100)]
Makefile: sort objects for deterministic linking order

Patch by Reiner Herrmann

7 years agoman: fix spelling errors
Michael Stapelberg [Sat, 21 Jan 2017 14:31:51 +0000 (15:31 +0100)]
man: fix spelling errors

7 years agoman: switch link to directly go to github
Michael Stapelberg [Sat, 21 Jan 2017 14:15:01 +0000 (15:15 +0100)]
man: switch link to directly go to github

7 years agoConsolidate measure speed script (#188)
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

7 years agoRe-license contrib/netspeed to the same as i3status (#189)
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>
7 years agoFix i3status to compile with -fno-common (#185)
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.

8 years agoAdding documentation for PR #179 (#182)
eplanet [Sat, 19 Nov 2016 14:02:10 +0000 (15:02 +0100)]
Adding documentation for PR #179 (#182)

8 years agoMerge pull request #179 from mihaicmn/feature-threshold-format
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

8 years agoMerge pull request #178 from eplanet/ut_cpu_temp
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

8 years agoAdd unit tests for threshold format 179/head
Mihai Coman [Tue, 15 Nov 2016 11:34:06 +0000 (13:34 +0200)]
Add unit tests for threshold format

8 years agoAdd 'format_below_threshold' option for 'disk' module
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

8 years agoAdded test case for run_watch 178/head
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.

8 years agoAdded unit test case for path_exists
eplanet [Mon, 14 Nov 2016 21:24:16 +0000 (21:24 +0000)]
Added unit test case for path_exists

8 years agoAdded unit test case for CPU temperature
eplanet [Mon, 14 Nov 2016 20:58:58 +0000 (20:58 +0000)]
Added unit test case for CPU temperature

8 years agoUnit testing in Travis (#170)
eplanet [Mon, 14 Nov 2016 08:13:44 +0000 (09:13 +0100)]
Unit testing in Travis (#170)

8 years agoUse blank padding for wireless quality (#166) (#167)
Jon Bernard [Sat, 12 Nov 2016 14:39:41 +0000 (09:39 -0500)]
Use blank padding for wireless quality (#166) (#167)

8 years agoSetting of custom locale in tztime configuration. (#168)
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.

8 years agoDetect batteries using glob (#163)
Stu Zhao [Sun, 23 Oct 2016 19:20:31 +0000 (15:20 -0400)]
Detect batteries using glob (#163)

8 years agopulse device may be specified by name (#126) (#162)
Watcom [Wed, 14 Sep 2016 07:26:45 +0000 (04:26 -0300)]
pulse device may be specified by name (#126) (#162)

8 years agoBugfix: re-add single quotes around I3STATUS_VERSION
Michael Stapelberg [Mon, 5 Sep 2016 06:35:24 +0000 (08:35 +0200)]
Bugfix: re-add single quotes around I3STATUS_VERSION

related to https://github.com/i3/i3/issues/2437

8 years agoMerge pull request #140 from tommie/multibatt
Michael Stapelberg [Mon, 29 Aug 2016 07:45:15 +0000 (09:45 +0200)]
Merge pull request #140 from tommie/multibatt

Implement aggregates in print_battery_info

8 years agoImplement aggregates for batteries. 140/head
Tommie Gannert [Mon, 1 Aug 2016 17:03:03 +0000 (18:03 +0100)]
Implement aggregates for batteries.

Using title number all, this enables aggregates. Note that FreeBSD and
OpenBSD previously only reported aggregates, so this is bringing Linux
and NetBSD that functionality.

Changes the default battery reporting to the aggregate since most
users probably don't care about individual batteries. For single-battery
systems there should be no change.

Fixes one obvious memory leak in NetBSD.

8 years agoMatch trailing equal sign in slurp_battery_info.
Tommie Gannert [Tue, 16 Aug 2016 08:18:05 +0000 (09:18 +0100)]
Match trailing equal sign in slurp_battery_info.

Should make it more resilient to future ambiguities in uevent.

8 years agoParse uevent file to detect network device type (#153)
Cihangir Akturk [Mon, 22 Aug 2016 17:23:59 +0000 (20:23 +0300)]
Parse uevent file to detect network device type (#153)

Currently i3status differentiates wireless and wired devices based
on the existence of wireless directory inside the device's sysfs
directory. This approach seems to cause 3g modems to be incorrectly
identified as the first ethernet device.

This commit solves this problem by using DEVTYPE variable from
uevent file.

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
8 years agoprint_wireless_info: fix FTBFS on hurd and kfreebsd
Michael Stapelberg [Mon, 22 Aug 2016 06:48:55 +0000 (08:48 +0200)]
print_wireless_info: fix FTBFS on hurd and kfreebsd

Patch by Axel Beckert.

8 years agoAdded missing ampere to watt conversion for last full capacity. (#158)
tnnn [Sun, 21 Aug 2016 20:11:19 +0000 (22:11 +0200)]
Added missing ampere to watt conversion for last full capacity. (#158)

Signed-off-by: Tomasz Nitecki <tnnn@tnnn.pl>
8 years agodefault config: remove DHCP, VPN
Michael Stapelberg [Wed, 17 Aug 2016 06:16:20 +0000 (08:16 +0200)]
default config: remove DHCP, VPN

VPN was removed because it pointed to vpnc, which hasn’t been updated
since 2008 and is long obsolete in favor of openconnect. Since different
people use different VPN solutions, though (and other modules configured
by default do actually work regardless of the system), let’s remove this
and have people who need it configure it explicitly.

DHCP was removed because modern systems often don’t use dhclient anymore
(but rather systemd-networkd’s DHCP client, which can also be used via
NetworkManager these days) and because it fails our philosophy test:
it’s not something which you would look at every now and then if
i3status didn’t expose it.

8 years agoPrint empty string for not mounted disks. (#148)
eplanet [Tue, 16 Aug 2016 07:29:08 +0000 (09:29 +0200)]
Print empty string for not mounted disks. (#148)

An empty string becomes the default value for format_not_mounted parameter
for any disk entry. This avoids printing erroneous values when a
filesystem is not mounted.

8 years agoMove time and ratio computations out of slurp_battery_info. (#151)
tommie [Mon, 15 Aug 2016 06:52:20 +0000 (07:52 +0100)]
Move time and ratio computations out of slurp_battery_info. (#151)

This allows OSes that support reporting multiple batteries to simply
sum into full_design,full_last,remaining and let print_battery_info
make computations.

8 years agoMerge pull request #150 from tommie/incremental_multibatt
Michael Stapelberg [Sun, 14 Aug 2016 20:01:35 +0000 (13:01 -0700)]
Merge pull request #150 from tommie/incremental_multibatt

Move full_design and full_last into struct battery_info

8 years agoMove full_design and full_last into struct battery_info. 150/head
Tommie Gannert [Mon, 1 Aug 2016 14:25:13 +0000 (15:25 +0100)]
Move full_design and full_last into struct battery_info.

This is in preparation for moving the ratio computation code out of
slurp_battery_info to support aggregating multiple batteries.

8 years agoAlso capture charge rate in NetBSD.
Tommie Gannert [Mon, 1 Aug 2016 19:17:50 +0000 (20:17 +0100)]
Also capture charge rate in NetBSD.

For time estimates when charging.

8 years agoMerge pull request #149 from tommie/incremental_multibatt
Michael Stapelberg [Sun, 14 Aug 2016 13:29:20 +0000 (06:29 -0700)]
Merge pull request #149 from tommie/incremental_multibatt

Fix some compilation warnings on OpenBSD and NetBSD

8 years agoFix warnings about using a char array index on NetBSD. 149/head
Tommie Gannert [Sun, 14 Aug 2016 11:35:52 +0000 (12:35 +0100)]
Fix warnings about using a char array index on NetBSD.

The isspace macro is just a table lookup.