lynks-- / lifebar

Transparent workspace bar for i3 window manager.
GNU General Public License v2.0
36 stars 6 forks source link

Internal IP shown instead the public one #19

Closed cig0 closed 9 years ago

cig0 commented 9 years ago

Hello again,

I just noticed that the local IP is shown instead the public one (as shown in the snapshot I attached in issue #17 ).

I'm using systemd and the interface is correctly set in my ~/.lifebarrc: ;## network interface names used for reporting ip address information ifone enp3s0

iftwo wlan0

I already tried looking into the code but I'm a C n00b, I'll need some more time to find the root cause...

lynks-- commented 9 years ago

So there are two different modules that will show you an IP; 1) Interface modules ifone, iftwo 2) External IP lookup extip

The first two just look at the local interface IP, they pull this information from the kernel. The external IP lookup on the other hand is the one that has to ping out to an external server, your local machine has no way of knowing what its public IP is at any given moment.

The solution to your problem is to add the extip module to your module list in ~/.lifebarrc such as:

modules uptime therm0 bat0 fsone ifone extip date time