These polybar modules use the Mullvad CLI to display details about the VPN connection and the established tunnel and allow to control certain settings from the modules without having to open the Mullvad GUI.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matthias Thym bc89a251dd Add screenshots to README 4 months ago
assets/screenshots Add screenshots to README 4 months ago
LICENSE Initial commit 4 months ago
README.md Add screenshots to README 4 months ago
vpn-mullvad.sh Use `/usr/bin/env sh` for better portability 4 months ago

README.md

Polybar Modules for Mullvad VPN

💬 A collection of other useful polybar modules maintained by the community can be found here.

These polybar modules use the Mullvad CLI mullvad to display details about the VPN connection and the established tunnel and allow to control certain settings from the module without having to open the Mullvad GUI.

connected  syd-au wg connecting  gr ov disconnected  at wg blocked  al wg Tunnel status: Disconnecting...  ee wg

For a blocked connection, the tunnel protocol has to be toggled, as wireguard is not available for all locations.

For an unknown tunnel status, the polybar module will display the error message.

Connection module

This polybar module displays the connection status (and potential errors) and allows for establishing a VPN connection, disconnecting and reconnecting with a simple click.

With the module configuration shown below, left-click toggles the connection state and right-click triggers a reconnect.

[module/vpn-mullvad-status]
type = custom/script
exec = ~/.config/polybar/scripts/vpn-mullvad.sh --status
click-left = ~/.config/polybar/scripts/vpn-mullvad.sh --toggle
click-right = ~/.config/polybar/scripts/vpn-mullvad.sh --reconnect
interval = 1

Tunnel module

In a second polybar module, some tunnel details like the location of the VPN server currently connected to, as well as the used tunnel protocol can be viewed and changed.

The location is just the country shortcode if only the country was set (e.g. at) and city and country shortcodes if city was set (e.g. vie-at).

With the module configuration shown below, scrolling cycles through available server locations by country and left-click toggles the tunnel protocol (WireGuard, OpenVPN).

By default the status shown are the tunnel details (--tunnel-details), but it can be configured to only show the location (--location) or only the protocol (--protocol).

[module/vpn-mullvad-tunnel]
type = custom/script
exec = ~/.config/polybar/scripts/vpn-mullvad.sh --tunnel-details
click-left = ~/.config/polybar/scripts/vpn-mullvad.sh --toggle-protocol
scroll-up = ~/.config/polybar/scripts/vpn-mullvad.sh --previous
scroll-down = ~/.config/polybar/scripts/vpn-mullvad.sh --next
interval = 1