summaryrefslogtreecommitdiffstats
path: root/.local/bin/conky/getif.sh
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-10-12 12:54:22 +0200
committerjoe <rbo@gmx.us>2025-10-12 12:54:22 +0200
commit49016c7d84a789701166178b027d8dccc0f0b375 (patch)
tree917a5714b324dd8d4b089b7419c2019e84c64ffe /.local/bin/conky/getif.sh
parentup (diff)
downloaddotfiles-bsd-49016c7d84a789701166178b027d8dccc0f0b375.tar.gz
dotfiles-bsd-49016c7d84a789701166178b027d8dccc0f0b375.tar.bz2
dotfiles-bsd-49016c7d84a789701166178b027d8dccc0f0b375.tar.xz
dotfiles-bsd-49016c7d84a789701166178b027d8dccc0f0b375.tar.zst
dotfiles-bsd-49016c7d84a789701166178b027d8dccc0f0b375.zip
up
Diffstat (limited to '')
-rwxr-xr-x.local/bin/conky/getif.sh31
1 files changed, 0 insertions, 31 deletions
diff --git a/.local/bin/conky/getif.sh b/.local/bin/conky/getif.sh
deleted file mode 100755
index a4aff49..0000000
--- a/.local/bin/conky/getif.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# ifconfig | command grep '^[a-z]' | awk '{print $1}' | sed '{/lo/d;s/://;}'
-
-case "$(hostname -s)" in
- mother)
- if_main="eth1"
- if_alt="eth0"
- ;;
- po-rbo)
- if_main="enx4ce1734c425a"
- if_alt="wlp1s0"
- ;;
- mars)
- if_main="em0"
- if_alt="wlan0"
- exit
- ;;
-esac
-
-if grep up "/sys/class/net/$if_main/operstate" >/dev/null 2>&1 && ! [ -z $(ifconfig $if_main 2>/dev/null | awk '/inet / {print $2}') ]; then
- :
-elif grep up "/sys/class/net/$if_alt/operstate" >/dev/null 2>&1 && ! [ -z $(ifconfig $if_alt 2>/dev/null | awk '/inet / {print $2}') ]; then
- if_main=$if_alt
-else
- echo '${font1}NETWORK ${hr}${font}
-${color #928374}No network${font}'
- exit
-fi
-
-echo -n $if_main