Refresh conky when Network Becomes Available

For those of you using conky, you probably already realize that it allows you to pull a lot of useful information from other machines, or Internet sources, such as Google Calendar or Remember the Milk.  But, those pieces of information aren’t typically polled very often so lapses in network connectivity can cause those portions of your conky display to remain un-updated or showing blank, even after you regain network connectivity.  Fortunately, Debian based systems provide a script directory that is executed whenever a network interface is brought up, i.e., it regains network connectivity.  This directory is: /etc/network/if-up.d/.  Copy the following to a script in the directory and it will update all of your conky instances every time you regain network connectivity:

#! /bin/bash
killall -SIGUSR1 conky

Don’t forget to change the ownership to root:root and to set the permissions to 755.

This entry was posted in Software and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>