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.

24 lines
513 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 [ "$VPN" != "" ]; then
  9. printf "%s" "$SEP1"
  10. if [ "$IDENTIFIER" = "unicode" ]; then
  11. printf "🔒 %s" "$VPN"
  12. else
  13. printf "VPN %s" "$VPN"
  14. fi
  15. printf "%s\n" "$SEP2"
  16. fi
  17. }
  18. dwm_vpn