shervinsahba / polybar-vpn-controller

Polybar module for VPN control. Set up for Mullvad VPN but modifiable for others.
MIT License
61 stars 12 forks source link

Using mullvad status command to get location instead of geoiplookup #10

Closed albuquerque53 closed 2 years ago

albuquerque53 commented 3 years ago

using the polybar-vpn-controller I had some issues with geoiplookup, sometimes it simply doesn't find from where my IP come from, and when does that happen, my location becomes "IP" (because of the message when doen't find the IP), looking around Mullvad CLI, I found the command status -l that brings the location of IP, seems better use Mullvad native features than third part dependencies to find the IP.

with this change, the location will always appear with the followed format: `City, (maybe State,) Country

shervinsahba commented 2 years ago

Heyo, I updated several things, and implemented your suggestion. It's def the best way to go for Mullvad.

You can use vpn_module status mullvad in lieu of what's now called vpn_module status geoip. Take a look at the changelog or vpn_module help to see what's new.