Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- [mac-player](#mac-player---up)
- [mpc](#mpc---up)
- [network](#network---up)
- [network-public-ip](#network-public-ip---up)
- [network-bandwidth](#network-bandwidth---up)
- [network-ping](#network-ping---up)
- [network-vpn](#network-vpn---up)
Expand Down Expand Up @@ -645,6 +646,16 @@ Known issues:

- If for some reason `iw` is only in the path for root and not the normal user, wifi connections will be considered ethernet connections.

### network-public-ip - [up](#table-of-contents)

This widget displays the public IP address you're using, by querying the public service `ifconfig.me`.

Possible nerdfont settings for public IP info:

```bash
set -g @dracula-network-public-ip-label "󰖟 "
```

### network-bandwidth - [up](#table-of-contents)

This widget gives the currently used up and download speeds per second for one interface.
Expand Down
3 changes: 2 additions & 1 deletion scripts/network-public-ip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ main() {
IP_SERVER="ifconfig.me"
ip=$(curl -s "$IP_SERVER")

echo "$(get_tmux_option "@dracula-network-public-ip-label" "")$ip" > "${DATAFILE}"
network_public_ip_label=$(get_tmux_option "@dracula-network-public-ip-label" "IP")
echo "$network_public_ip_label$ip" > "${DATAFILE}"
printf '%s' "$_now" > "${LAST_EXEC_FILE}"
fi

Expand Down