| 1 |
#ifndef _GSM_DEFAULT_TABLE_H_ |
| 2 |
#define _GSM_DEFAULT_TABLE_H_ |
| 3 |
|
| 4 |
#include <string> |
| 5 |
#include <glibmm/refptr.h> |
| 6 |
#include <glibmm/regex.h> |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
struct PrettyTableItem |
| 11 |
{ |
| 12 |
Glib::RefPtr<Glib::Regex> command; |
| 13 |
std::string icon; |
| 14 |
|
| 15 |
PrettyTableItem (const std::string &a_command, |
| 16 |
const std::string &a_icon) |
| 17 |
: command (Glib::Regex::create (("^(" + a_command + ")$").c_str ())), |
| 18 |
icon (a_icon) |
| 19 |
{ |
| 20 |
} |
| 21 |
}; |
| 22 |
|
| 23 |
#define ITEM PrettyTableItem |
| 24 |
|
| 25 |
static const PrettyTableItem default_table[] = { |
| 26 |
|
| 27 |
ITEM (".*applet(-?2)?|gnome-panel", "gnome-panel"), |
| 28 |
ITEM ("evolution.*", "emblem-mail"), |
| 29 |
ITEM ("gconfd-2|dconf-service", "preferences-desktop"), |
| 30 |
ITEM ("metacity|gnome-shell", "gnome-window-manager"), |
| 31 |
ITEM ("vino.*", "gnome-remote-desktop"), |
| 32 |
|
| 33 |
ITEM ("(ba|z|tc|c|k)?sh", "utilities-terminal"), |
| 34 |
ITEM ("(k|sys|u)logd|logger", "internet-news-reader"), |
| 35 |
ITEM ("X(org)?", "display"), |
| 36 |
ITEM ("apache2?|httpd|lighttpd", "internet-web-browser"), |
| 37 |
ITEM ("atd|cron|CRON|ntpd", "date"), |
| 38 |
ITEM ("cupsd|lpd?", "printer"), |
| 39 |
ITEM ("cvsd|mtn|git|svn", "file-manager"), |
| 40 |
ITEM ("emacs(server|\\d+)?", "gnome-emacs"), |
| 41 |
ITEM ("famd|gam_server", "file-manager"), |
| 42 |
ITEM ("getty", "input-keyboard"), |
| 43 |
ITEM ("gdb|((gcc|g\\+\\+)(-.*)?)|ar|ld|make", "applications-development"), |
| 44 |
ITEM ("sendmail|exim\\d?", "internet-mail"), |
| 45 |
ITEM ("squid", "proxy"), |
| 46 |
ITEM ("ssh(d|-agent)", "ssh-askpass-gnome"), |
| 47 |
ITEM ("top|vmstat", "system-monitor"), |
| 48 |
ITEM ("vim?", "vim"), |
| 49 |
ITEM ("x?inetd", "internet-web-browser") |
| 50 |
}; |
| 51 |
|
| 52 |
#undef ITEM |
| 53 |
|
| 54 |
#endif |