Configuration file for dwm-bar on macbook air
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.

23 lines
503 B

  1. #!/bin/sh
  2. # A dwm_bar function to show VPN connections (if any are active)
  3. # Joe Standring <git@joestandring.com>
  4. # GNU GPLv3
  5. # Dependencies: NetworkManager-openvpn
  6. dwm_vpn () {
  7. VPN=$(nmcli -a | grep 'VPN connection' | sed -e 's/\( VPN connection\)*$//g')
  8. if [ "$IDENTIFIER" = "unicode" ]; then
  9. if [ "$VPN" != "" ]; then
  10. printf "[🔒 %s]\n" "$VPN"
  11. fi
  12. else
  13. if [ "$VPN" != "" ]; then
  14. printf "[VPN %s]\n" "$VPN"
  15. fi
  16. fi
  17. }
  18. dwm_vpn