Go to file
Olivier Gayot 451ff9be0b 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>
2018-06-11 22:06:57 +02:00
contrib Consolidate measure speed script (#188) 2017-01-02 16:06:06 +01:00
include Simplify the memory thresholds 2018-05-04 18:46:59 +02:00
man Merge pull request #282 from Stunkymonkey/mem-support 2018-05-22 06:57:45 +02:00
src Fix shown IP address belonging to wrong interface 2018-06-11 22:06:57 +02:00
testcases Treat zero battery capacity as "not available" (#259) 2018-01-28 15:37:51 +01:00
travis Fix CPU unit tests (#239) 2017-08-29 19:01:30 +02:00
yajl-fallback/yajl add yajl compat code 2012-04-08 14:05:47 +02:00
.clang-format clang-format-3.5 -i **/*.[ch], update modeline 2015-03-16 10:01:07 +01:00
.gitignore Add i3status and man/i3status.1 to ignore list. 2015-02-07 22:17:59 -02:00
.travis.yml Unit testing in Travis (#170) 2016-11-14 00:13:44 -08:00
CHANGELOG release v2.12 2018-05-11 11:07:22 +02:00
CONTRIBUTING.md add CONTRIBUTING file 2015-03-16 10:02:22 +01:00
i3status.c Simplify the memory thresholds 2018-05-04 18:46:59 +02:00
i3status.conf Simplify the memory thresholds 2018-05-04 18:46:59 +02:00
I3STATUS_VERSION release v2.12 2018-05-11 11:07:22 +02:00
LICENSE Separate license into file LICENSE 2009-10-15 20:44:24 +02:00
Makefile Makefile: make PKG_CONFIG overridable (patch by Helmut Grohne) 2017-09-18 08:30:48 +02:00
README.md Get rid of the SLOC comment 2017-12-11 22:50:16 +01:00

i3status

Description

i3status is a small program for generating a status bar for i3bar, dzen2, xmobar or similar programs. It is designed to be very efficient by issuing a very small number of system calls, as one generally wants to update such a status line every second. This ensures that even under high load, your status bar is updated correctly. Also, it saves a bit of energy by not hogging your CPU as much as spawning the corresponding amount of shell commands would.

Development

i3status has the following dependencies:

  • libconfuse-dev
  • libyajl-dev
  • libasound2-dev
  • libnl-genl-3-dev
  • libcap2-bin (for getting network status without root permissions)
  • asciidoc (only for the documentation)
  • libpulse-dev (for getting the current volume using PulseAudio)

On debian-based systems, the following line will install all requirements:

apt-get install libconfuse-dev libyajl-dev libasound2-dev libiw-dev asciidoc libcap2-bin libpulse-dev libnl-genl-3-dev

Upstream

i3status is developed at https://github.com/i3/i3status

Compilation

Compiling is done with the usual make-line

  make && sudo make install