Status area plugin? (Yes, I know...)
/* * theme-updater-object * * Copyright (C) 2010 Faheem Pervez <Don't really feel like spam on this lovely morning>. All rights reserved. * * Licensed under: * * DO WHAT THE **** YOU WANT TO PUBLIC LICENSE * Version 2, December 2004 * * Copyright (C) 2004 Sam Hocevar * 14 rue de Plaisance, 75014 Paris, France * Everyone is permitted to copy and distribute verbatim or modified * copies of this license document, and changing it is allowed as long * as the name is changed. * * DO WHAT THE **** YOU WANT TO PUBLIC LICENSE * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION * * 0. You just DO WHAT THE **** YOU WANT TO. * * This program is free software. It comes without any warranty, to * the extent permitted by applicable law. You can redistribute it * and/or modify it under the terms of the Do What The **** You Want * To Public License, Version 2, as published by Sam Hocevar. See * http://sam.zoy.org/wtfpl/COPYING for more details. * *//* theme-updater-object.c */#include <stdlib.h>#include <glib.h>#include <glib-object.h>#include <libhildondesktop/libhildondesktop.h>typedef struct{ HDStatusPluginItem parent;} ThemeUpdaterObject;typedef struct{ HDStatusPluginItemClass parent_class;} ThemeUpdaterObjectClass;HD_DEFINE_PLUGIN_MODULE (ThemeUpdaterObject, theme_updater_object, HD_TYPE_STATUS_PLUGIN_ITEM)static void theme_updater_object_class_init (ThemeUpdaterObjectClass *klass G_GNUC_UNUSED){}static void theme_updater_object_class_finalize (ThemeUpdaterObjectClass *klass G_GNUC_UNUSED){}static void on_theme_changed (GObject *obj G_GNUC_UNUSED, GParamSpec *pspec G_GNUC_UNUSED, gpointer user_data G_GNUC_UNUSED){ static gboolean first_emission = TRUE; /* We recieve notification of the bloody theme changing twice! */ first_emission = !first_emission; if (!first_emission) return; if (!system ("pidof catorise")) return; g_spawn_command_line_async ("/usr/bin/sudo /opt/catorise/catorise", NULL);}static void theme_updater_object_init (ThemeUpdaterObject *plugin G_GNUC_UNUSED){ g_signal_connect (G_OBJECT (gtk_settings_get_default ()), "notify::gtk-theme-name", G_CALLBACK (on_theme_changed), NULL);}
user ALL = NOPASSWD: /opt/catorise/catorise