Last active
August 29, 2015 14:07
-
-
Save klaxa/98b9183fae46f061e1ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ping -c 1 -W 2 8.8.8.8 2> /dev/null > /dev/null | |
ret=$? | |
if [[ "$ret" -ne "0" ]] | |
then | |
#echo \'<span color=\"red\">Offline</span> \' | |
echo " Offline " | |
else | |
#echo \'<span color=\"green\">Online</span> \' | |
echo " Online" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...] | |
local bashets = require("bashets") | |
[...] | |
alivewidget = wibox.widget.textbox() | |
bashets.register("/home/klaxa/Development/shell/gdns_ping.sh", {widget = alivewidget, separator = " ", update_time=3, file_update_time=3, async=true, | |
format = ' <span color="red">$1</span> <span color="green">$2</span>'}) | |
bashets.start() | |
[...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment