Skip to content

Instantly share code, notes, and snippets.

@Delt-A
Delt-A / xfce4-vpnip.sh
Created August 9, 2023 07:31
Show 2 VPN IP on taskbar if there are 2 VPN connections.
#!/bin/sh
interface1="$(ip tuntap show | cut -d : -f1 | sed -n '1p')"
interface2="$(ip tuntap show | cut -d : -f1 | sed -n '2p')"
ip1="$(ip a s "${interface1}" 2>/dev/null \
| grep -o -P '(?<=inet )[0-9]{1,3}(\.[0-9]{1,3}){3}')"
ip2="$(ip a s "${interface2}" 2>/dev/null \
| grep -o -P '(?<=inet )[0-9]{1,3}(\.[0-9]{1,3}){3}')"
### Keybase proof
I hereby claim:
* I am delt-a on github.
* I am delt4 (https://keybase.io/delt4) on keybase.
* I have a public key ASCjfBbK9AYxz1OAePl3eH6YRo0YlRUjgv0Z0jgYrm4LPAo
To claim this, I am signing this object: