From d6e33d7a25362f5a5546ffdfb4dd899258c9ff57 Mon Sep 17 00:00:00 2001 From: David Todd Date: Mon, 4 Mar 2019 23:46:56 -0600 Subject: [PATCH] Add check for internet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We will have a happy face (😛) most of the time When the internet goes down, this will become an steamed face (😤) Also interesting note, the unicode name for the steamed face is "Face with Look of Triumph" --- i3/i3blocks.conf | 4 ++++ i3/i3blocks/internet | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100755 i3/i3blocks/internet diff --git a/i3/i3blocks.conf b/i3/i3blocks.conf index 0987204..ea3a44c 100644 --- a/i3/i3blocks.conf +++ b/i3/i3blocks.conf @@ -74,3 +74,7 @@ label=🗔 label=📅 interval=30 +[internet] +interval=15 + + diff --git a/i3/i3blocks/internet b/i3/i3blocks/internet new file mode 100755 index 0000000..f8d6fda --- /dev/null +++ b/i3/i3blocks/internet @@ -0,0 +1,7 @@ +#!/bin/bash + +if ping -c 1 1.1.1.1 > /dev/null 2>&1; then + echo "😛" +else + echo "😤" +fi