summaryrefslogtreecommitdiffstats
path: root/.local/bin/conky/net.sh
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-02-03 11:33:47 +0100
committerJoe <rrbo@proton.me>2023-02-03 11:33:47 +0100
commit01ac7bd119be1bee4f325a4e3aab6a0ce203252c (patch)
tree05bc6ca0f983e07f837b14d0b48be0ce2efda551 /.local/bin/conky/net.sh
parentup (diff)
downloaddotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.gz
dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.bz2
dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.xz
dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.tar.zst
dotfiles-bsd-01ac7bd119be1bee4f325a4e3aab6a0ce203252c.zip
up
Diffstat (limited to '')
-rwxr-xr-x.local/bin/conky/net.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/.local/bin/conky/net.sh b/.local/bin/conky/net.sh
new file mode 100755
index 0000000..4316e1a
--- /dev/null
+++ b/.local/bin/conky/net.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+os="$(uname)"
+
+if [ "$os" = "Linux" ]; then
+ grep "Artix" /etc/issue >/dev/null 2>&1 && os=1 || os=2
+elif [ "$os" = "FreeBSD" ]; then
+ os=3
+else
+ echo "unknown OS"
+ exit 1
+fi
+
+case $os in
+ 1) icon=" " ;;
+ 2) icon=" " ;;
+ 3) icon=" " ;;
+esac
+
+echo '${color grey}Net'
+# ${hr}${if_up enx4ce1734c425a}
+# ${color grey}LAN IP: ${font1}${color white}${addr enx4ce1734c425a}${font}
+# ${color grey}---------
+# ${color grey}VPN IP: ${font1}${color white}${addr proton0}${font}
+# ${color grey}---------
+# ${color grey}Public IP: ${color white}${font1}${execi 300 curl -s https://ifconfig.me || echo No Address}${font}${color grey}
+# ${hr}
+# ${color grey}Down: ${color white}${font1}${downspeed enx4ce1734c425a} ${font}${color grey}- Up: ${color white}${font1}${upspeed enx4ce1734c425a}${font}
+# ${color grey}Down: ${color white}${downspeedgraph enx4ce1734c425a bfbfbf c0c0c0 125829120}
+# ${color grey}Up: ${color white}${upspeedgraph enx4ce1734c425a bfbfbf c0c0c0 125829120}
+# ${hr}
+# ${color grey}DNS:
+# ${font1}${color white}${nameserver 0}${font}
+# ${font1}${color white}${nameserver 1}${font}
+# ${hr}${endif}