A small script to add a one click solution to your polybar when you are a Mullvad user. Inspired by shervinsahba/polybar-vpn-controller, but I took the liberty of rewriting this for my needs, cleaned up and removed unnecessary stuff. Thanks for the inspiration.
- Left click: connect/disconnect
- Right click: Select relay
- Middle click: Copy IP
See shervinsahba/polybar-vpn-controller.
Add to your polybar config:
[module/mullvad]
type = custom/script
exec = $HOME/.config/polybar/vpn/mullvad.sh
click-left = $HOME/.config/polybar/vpn/mullvad.sh toggle
click-middle = $HOME/.config/polybar/vpn/mullvad.sh ip
click-right = $HOME/.config/polybar/vpn/mullvad.sh menu
interval = 1
format = <label>
Then add it where you want it:
modules-right = pulseaudio memory cpu mullvad