add wg.sh
This commit is contained in:
10
components/wg.sh
Normal file
10
components/wg.sh
Normal file
@ -0,0 +1,10 @@
|
||||
response=$(curl -s https://am.i.mullvad.net/json)
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
server=$(echo "$response" | jq -r '.mullvad_exit_ip_hostname')
|
||||
if [ "$server" != "null" ]; then
|
||||
echo "$server"
|
||||
else
|
||||
echo "NULL"
|
||||
fi
|
@ -10,6 +10,7 @@ static const struct arg args[] = {
|
||||
{ netspeed_rx, " [ %sB/s]", IFACE },
|
||||
{ netspeed_tx, " [ %sB/s]", IFACE },
|
||||
{ ipv4, " ^c#fb4934^[ %s]", IFACE },
|
||||
{ run_command, " ^c#fb4934^[%s]", "sh /opt/suckless/slstatus/components/wg.sh" },
|
||||
//{ mullvad_stat, " [VPN: %s]", NULL},
|
||||
|
||||
//{ battery_perc, " ^c#fe9019^[ %s%%", BAT },
|
||||
|
Reference in New Issue
Block a user