This repository has been archived on 2024-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
al-skel/home/.config/polybar/scripts/network.sh
2017-10-16 12:38:02 -07:00

14 lines
273 B
Bash
Executable File

#!/usr/bin/env bash
online=$(ip addr | grep "state UP" | cut -d ":" -f2)
#connected=""
#offline=""
connected="  "
offline="  "
if [[ "$online" ]]; then
echo %{F#8FA1B3}${connected}
else
echo %{F#E7816B}${offline}; sleep 0.6; echo %{F#8FA1B3}${offline}
fi