main: add --colorscheme

terminology-1.9
Boris Faure 2 years ago
parent 7bb1639260
commit 0a85423759
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
  1. 5
      man/terminology.1
  2. 2
      src/bin/ipc.c
  3. 1
      src/bin/ipc.h
  4. 16
      src/bin/main.c

@ -167,6 +167,11 @@ Scaling factor to use on the UI.
Type: DOUBLE.
.
.TP
.B \-\-colorscheme=COLORSCHEME
Use the named color scheme.
Type: STR.
.
.TP
.B \-V, \-\-version
Show program version.
.

@ -104,6 +104,8 @@ ipc_init(void)
"name", name, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
"theme", theme, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
"colorscheme", colorscheme, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
"role", role, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,

@ -12,6 +12,7 @@ struct _Ipc_Instance
char *background;
char *name;
char *theme;
char *colorscheme;
char *role;
char *title;
char *icon_name;

@ -57,6 +57,13 @@ _configure_instance(Ipc_Instance *inst)
_set_instance_theme(inst);
if (inst->colorscheme)
{
eina_stringshare_replace(&(config->color_scheme_name), inst->colorscheme);
config_compute_color_scheme(config);
config->temporary = EINA_TRUE;
}
if (inst->background)
{
eina_stringshare_replace(&(config->background), inst->background);
@ -221,6 +228,7 @@ main_ipc_new(Ipc_Instance *inst)
if (inst->visual_bell) nargc += 1;
if (inst->cmd) nargc += 2;
if (inst->theme) nargc += 2;
if (inst->colorscheme) nargc += 2;
nargv = calloc(nargc + 1, sizeof(char *));
if (!nargv) return;
@ -247,6 +255,11 @@ main_ipc_new(Ipc_Instance *inst)
nargv[i++] = "-t";
nargv[i++] = (char *)inst->theme;
}
if (inst->colorscheme)
{
nargv[i++] = "--colorscheme";
nargv[i++] = (char *)inst->colorscheme;
}
if (inst->role)
{
nargv[i++] = "-r";
@ -500,6 +513,8 @@ static Ecore_Getopt options = {
gettext_noop("Highlight links")),
ECORE_GETOPT_STORE_BOOL('\0', "no-wizard",
gettext_noop("Do not display wizard on start up")),
ECORE_GETOPT_STORE_STR ('\0', "colorscheme",
gettext_noop("Use the named color scheme")),
ECORE_GETOPT_VERSION ('V', "version"),
ECORE_GETOPT_COPYRIGHT ('C', "copyright"),
@ -832,6 +847,7 @@ elm_main(int argc, char **argv)
ECORE_GETOPT_VALUE_DOUBLE(scale),
ECORE_GETOPT_VALUE_BOOL(instance.active_links),
ECORE_GETOPT_VALUE_BOOL(no_wizard),
ECORE_GETOPT_VALUE_STR(instance.colorscheme),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),

Loading…
Cancel
Save