}
print_online() {
- print_bar_element "$(ip -4 addr show scope global | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | head -1)"
+ show_conn() {
+ COLOR="${COL_GREEN}"
+ IP=$(ip --brief addr show | grep "$2" | sed -E 's/ +/\t/g' | cut -f3 | cut -f1 -d'/')
+ if [ -z "${IP}" ]; then
+ IP=-
+ COLOR="${COL_RED}"
+ fi
+ print_bar_element "$1:${IP}" "${COLOR}" "$3"
+ }
+ show_conn E enp 10
+ show_conn W wlp
}
print_battery() {
}
print_temperature() {
- COLOR="${COL_WHITE}"
+ COLOR="${COL_GREEN}"
TEMPERATURE=$(cat ${SYSCLASS_DIR}/thermal/thermal_zone0/temp)
TEMPERATURE_IN_C=$(printf "%d" $(calc "${TEMPERATURE} // 1000"))
if [ $TEMPERATURE_IN_C -gt 85 ]; then