#ifndef C8_DEFAULT_APPS_H
#define C8_DEFAULT_APPS_H
/*
* Default apps: the kinds of thing PC settings' Default apps page gives
* an app to, which the shell lists in All apps and opens with whatever is
* the default when used. One list, so the page that sets them and the
* shell that follows them can't come to differ.
*/
struct c8_default_role {
const char *id, *name;
const char *icon; // the kind's own, while no app is chosen
const char *exec; // what its tile runs
/* The type read back for "which app is it now", and every type and
* scheme the kind stands for (; apart, that one first). NULL: the
* terminal, which is the compositor's [general] terminal. */
const char *type, *types;
const char *terms; // search words
};
static const struct c8_default_role c8_default_roles[] = {
{ "browser", "Web browser", "web-browser", "@default browser",
"x-scheme-handler/https", "x-scheme-handler/https;"
"x-scheme-handler/http;text/html;application/xhtml+xml",
"default app internet web links" },
{ "mail", "Mail", "cont8nuum-mail", "@default mail",
"x-scheme-handler/mailto", "x-scheme-handler/mailto",
"default app email e-mail" },
{ "terminal", "Terminal", "utilities-terminal", "@terminal", NULL, NULL,
"default app console shell command line" },
{ "files", "File manager", "system-file-manager", "@default files",
"inode/directory", "inode/directory",
"default app files folders explorer" },
{ "music", "Music", "cont8nuum-music", "@default music",
"audio/mpeg", "audio/mpeg;audio/flac;audio/x-flac;audio/ogg;"
"audio/x-vorbis+ogg;audio/mp4;audio/aac;audio/x-wav;audio/x-opus+ogg",
"default app audio player songs" },
{ "video", "Video", "cont8nuum-video", "@default video",
"video/mp4", "video/mp4;video/x-matroska;video/webm;video/x-msvideo;"
"video/quicktime;video/mpeg", "default app movies player films" },
/* Every type glycin reads (c8-photos' desktop entry has the same) */
{ "photos", "Photos", "cont8nuum-photos", "@default photos",
"image/jpeg", "image/jpeg;image/png;image/apng;image/gif;image/webp;"
"image/avif;image/heif;image/jxl;image/jp2;image/bmp;"
"image/x-win-bitmap;image/tiff;image/x-tga;image/qoi;"
"image/vnd.microsoft.icon;image/vnd.ms-dds;image/vnd.radiance;"
"image/x-exr;image/x-portable-anymap;image/x-portable-bitmap;"
"image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;"
"image/x-xpixmap;image/svg+xml;image/svg+xml-compressed",
"default app pictures images viewer" },
{ "calendar", "Calendar", "cont8nuum-calendar", "@default calendar",
"text/calendar", "text/calendar", "default app events appointments" },
{ "maps", "Maps", "cont8nuum-maps", "@default maps",
"x-scheme-handler/geo", "x-scheme-handler/geo",
"default app places directions" },
{ "editor", "Text editor", "accessories-text-editor", "@default editor",
"text/plain", "text/plain", "default app notes plain text" },
};
#define C8_DEFAULT_ROLES \
((int)(sizeof(c8_default_roles) / sizeof(c8_default_roles[0])))
#endif