File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -515,12 +515,17 @@ set -g @dracula-ping-rate 5
515515```
516516
517517### network-vpn - [ up] ( #table-of-contents )
518- This widget displays whether a vpn is connected.
518+ This widget tries to display whether a vpn is connected.
519+ Tailscale exit nodes are fully supported for Linux and MacOS.
519520
520- These options are not available yet .
521+ Set verbose to true in order to see the VPNs IP or name of Tailscale exit node .
521522``` bash
522523set -g @dracula-network-vpn-verbose true
523- set -g @dracula-network-vpn-label
524+ ```
525+
526+ Set the widgets label like so:
527+ ``` bash
528+ set -g @dracula-network-vpn-label " "
524529```
525530### playerctl - [ up] ( #table-of-contents )
526531This widget displays playerctl info.
Original file line number Diff line number Diff line change @@ -13,14 +13,20 @@ vpn_function() {
1313
1414 verbose=$( get_tmux_option " @dracula-network-vpn-verbose" false)
1515
16- # Show IP of tun0 if connected
16+ # Show IP of tun0 if connected
1717 vpn=$( ip -o -4 addr show dev tun0 | awk ' {print $4}' | cut -d/ -f1)
1818
1919 which -s tailscale > /dev/null
2020 tailscale_installed=$?
2121
2222 if [[ $vpn =~ ^([0-9]{1,3}\. ){3}[0-9]{1,3}$ ]]; then
23- echo $vpn
23+ if $verbose ; then
24+ vpn_label=$( get_tmux_option " @dracula-network-vpn-label" " " )
25+ echo " $vpn_label$vpn "
26+ else
27+ vpn_label=$( get_tmux_option " @dracula-network-vpn-label" " VPN-ON" )
28+ echo " $vpn_label "
29+ fi
2430 elif [ $tailscale_installed ]; then
2531 # if tailscale is installed
2632 #
You can’t perform that action at this time.
0 commit comments