dotfiles

dotfiles - ryukamish edition
Log | Files | Refs | README

waybar-vpn (257B)


      1 #!/bin/sh
      2 
      3 vpn=$(nmcli connection show --active | rg -i 'wireguard' | awk '{print $1}')
      4 if [ -n "$vpn" ]; then
      5 	printf "{\"text\": \"$vpn\", \"class\": \"wireguard\", \"alt\": \"disconnected\" }\n"
      6 else
      7 	# Hide the module if no vpn connection
      8 	printf ""
      9 fi