Network Interface Name Detection in Conky

Once-off Conky config for network graphs

When one changes connection type (say, from ethernet to Wi-Fi), the interface name changes (e.g. eth0 → wlan1). To avoid changing Conky config file all the time, here’s a little Lua function for finding the network interface name. function findInterface() local handle = io.popen('ip a | grep "state UP" | cut -d: -f2 | tr -d " "') local result = handle:read('*a'):gsub('\n$','') handle:close() return result end ip a gives everything about connection info. [Read More]
Conky  Lua