script to toggle mmozilla vpn

This commit is contained in:
Lord Of Nougate 2024-02-25 23:13:22 +01:00
parent e83df654fa
commit 7ff3eb66f8
1 changed files with 14 additions and 0 deletions

14
toggle-mozvpn.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
STATE=$(mozillavpn status | grep "VPN state" | awk '{print $3}')
if [ "$STATE" == "off" ]; then
mozillavpn activate
notify-send -i /usr/share/icons/hicolor/32x32/apps/mozillavpn.png "Mozilla VPN" "VPN Activated"
fi
if [ "$STATE" == "on" ]; then
mozillavpn deactivate
notify-send -i /usr/share/icons/hicolor/32x32/apps/mozillavpn.png "Mozilla VPN" "VPN Deactivated"
fi