diff options
author | Perberos <[email protected]> | 2011-11-08 16:22:08 -0300 |
---|---|---|
committer | Perberos <[email protected]> | 2011-11-08 16:22:08 -0300 |
commit | f45852ab2a7126f354079499fc8b03976c0eab27 (patch) | |
tree | 885c32d804d3c970c5da41a5527882e8a956b42d /src/defaulttable.h | |
download | mate-system-monitor-f45852ab2a7126f354079499fc8b03976c0eab27.tar.bz2 mate-system-monitor-f45852ab2a7126f354079499fc8b03976c0eab27.tar.xz |
initial
Diffstat (limited to 'src/defaulttable.h')
-rw-r--r-- | src/defaulttable.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/defaulttable.h b/src/defaulttable.h new file mode 100644 index 0000000..6b5a096 --- /dev/null +++ b/src/defaulttable.h @@ -0,0 +1,51 @@ +#ifndef _PROCMAN_DEFAULTTABLE_H_ +#define _PROCMAN_DEFAULTTABLE_H_ + +#include <string> +#include <glibmm/refptr.h> +#include <glibmm/regex.h> + +/* This file contains prettynames and icons for well-known applications, that by default has no .desktop entry */ + +struct PrettyTableItem +{ + Glib::RefPtr<Glib::Regex> command; + std::string icon; + + PrettyTableItem(const std::string& a_command, const std::string& a_icon) + : command(Glib::Regex::create("^(" + a_command + ")$")), + icon(a_icon) + { } +}; + +#define ITEM PrettyTableItem + +/* The current table is only a test */ +static const PrettyTableItem default_table[] = { + ITEM("(ba|z|tc|c|k)?sh", "utilities-terminal"), + ITEM("(k|sys|u)logd|logger", "internet-news-reader"), + ITEM("X(org)?", "display"), + ITEM("apache2?|httpd|lighttpd", "internet-web-browser"), + ITEM(".*applet(-?2)?", "mate-applets"), + ITEM("atd|cron|CRON|ntpd", "date"), + ITEM("cupsd|lpd?", "printer"), + ITEM("cvsd|mtn|git|svn", "file-manager"), + ITEM("emacs(server|\\d+)?", "mate-emacs"), + ITEM("evolution.*", "internet-mail"), + ITEM("famd|gam_server", "file-manager"), + ITEM("mateconfd-2", "preferences-desktop"), + ITEM("getty", "input-keyboard"), + ITEM("gdb|((gcc|g\\+\\+)(-.*)?)|ar|ld|make", "applications-development"), + ITEM("marco", "mate-window-manager"), + ITEM("sendmail|exim\\d?", "internet-mail"), + ITEM("squid", "proxy"), + ITEM("ssh(d|-agent)", "ssh-askpass-mate"), + ITEM("top|vmstat", "system-monitor"), + ITEM("vim?", "vim"), + ITEM("x?inetd", "internet-web-browser"), + ITEM("vino.*", "mate-remote-desktop") +}; + +#undef ITEM + +#endif /* _PROCMAN_DEFAULTTABLE_H_ */ |