about summary refs log tree commit diff
path: root/sh/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'sh/snippets')
-rw-r--r--sh/snippets12
1 files changed, 12 insertions, 0 deletions
diff --git a/sh/snippets b/sh/snippets
index 6836083..800acf2 100644
--- a/sh/snippets
+++ b/sh/snippets
@@ -53,3 +53,15 @@ EOF
 # use cd to workaround monero-blockchain-export.log log file save in current dir? issue, haven't tested
 cd "$HOME/.bitmonero" || exit
 monero-blockchain-export --output-file "$XDG_DOWNLOAD_DIR/xmr/monero_blockchain.raw"
+
+nm_device_state="$(nmcli -t --fields device,state device)"
+if echo "$nm_device_state" | grep -q '^wg_ka:connected$'; then
+	echo ka
+elif echo "$nm_device_state" | grep -q '^wg_studio:connected$'; then
+	echo studio
+else
+	echo insp
+fi
+printf 'default: '; curl ifconfig.co
+printf '4: '; curl -4 ifconfig.co
+printf '6: '; curl -6 ifconfig.co