summaryrefslogtreecommitdiffstats
path: root/src/defaulttable.h
blob: 9328212d1ff1058660c3fba59a20fe33e9528b8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _GSM_DEFAULT_TABLE_H_
#define _GSM_DEFAULT_TABLE_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

static const PrettyTableItem default_table[] = {
    /* GNOME services */
    ITEM(".*applet(-?2)?|gnome-panel", "gnome-panel"),
    ITEM("evolution.*", "emblem-mail"),
    ITEM("gconfd-2|dconf-service", "preferences-desktop"),
    ITEM("metacity|gnome-shell", "gnome-window-manager"),
    ITEM("vino.*", "gnome-remote-desktop"),
    /* Other processes */
    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("atd|cron|CRON|ntpd", "date"),
    ITEM("cupsd|lpd?", "printer"),
    ITEM("cvsd|mtn|git|svn", "file-manager"),
    ITEM("emacs(server|\\d+)?", "gnome-emacs"),
    ITEM("famd|gam_server", "file-manager"),
    ITEM("getty", "input-keyboard"),
    ITEM("gdb|((gcc|g\\+\\+)(-.*)?)|ar|ld|make", "applications-development"),
    ITEM("sendmail|exim\\d?", "internet-mail"),
    ITEM("squid", "proxy"),
    ITEM("ssh(d|-agent)", "ssh-askpass-gnome"),
    ITEM("top|vmstat", "system-monitor"),
    ITEM("vim?", "vim"),
    ITEM("x?inetd", "internet-web-browser")
};

#undef ITEM

#endif /* _GSM_DEFAULT_TABLE_H_ */