]> gitweb.fluxo.info Git - scripts.git/commitdiff
Adding 'refresh' action to xconky
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 2 May 2013 16:25:07 +0000 (13:25 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 2 May 2013 16:25:07 +0000 (13:25 -0300)
xconky

diff --git a/xconky b/xconky
index 8986e169fda13190acdb59e03f97bce0ab9ba1bc..f03feb7a1fc4583ab3c32d34b960a92d9e3fc8c9 100755 (executable)
--- a/xconky
+++ b/xconky
@@ -36,6 +36,15 @@ function xconky_fs_home {
   echo "~/ \$color\${fs_free $HOME}/\${fs_size $HOME} \${fs_bar 6 $HOME}"
 }
 
+# Refresh all instances
+function xconky_refresh {
+  # Clear cache
+  brweather --clean-cache
+
+  # Send HUP
+  killall -USR1 conky
+}
+
 # Parse
 if [ -z "$1" ] || [ "$1" == "start" ]; then
   xconky_start
@@ -43,4 +52,6 @@ elif [ "$1" == "battery" ]; then
   xconky_battery
 elif [ "$1" = "fs_home" ]; then
   xconky_fs_home
+elif [ "$1" = "refresh" ]; then
+  xconky_refresh
 fi