add -2/--256color option to set TERM to xterm-256color
Man page was modified accordingly.
This commit is contained in:
parent
ef543aa753
commit
68133d2614
|
@ -120,6 +120,10 @@ Don't exit when the command process exits.
|
||||||
Force single executable if multi-instance is enabled..
|
Force single executable if multi-instance is enabled..
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-2, \-\-256color
|
||||||
|
Set TERM to \fBxterm-256color\fP instead of \fBxterm\fP.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
.B \-V, \-\-version
|
.B \-V, \-\-version
|
||||||
Show program version.
|
Show program version.
|
||||||
.
|
.
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct _Ipc_Instance
|
||||||
int maximized;
|
int maximized;
|
||||||
int hold;
|
int hold;
|
||||||
int nowm;
|
int nowm;
|
||||||
|
int xterm_256color;
|
||||||
};
|
};
|
||||||
|
|
||||||
void ipc_init(void);
|
void ipc_init(void);
|
||||||
|
|
|
@ -2257,6 +2257,7 @@ main_ipc_new(Ipc_Instance *inst)
|
||||||
if (inst->maximized) nargc += 1;
|
if (inst->maximized) nargc += 1;
|
||||||
if (inst->hold) nargc += 1;
|
if (inst->hold) nargc += 1;
|
||||||
if (inst->nowm) nargc += 1;
|
if (inst->nowm) nargc += 1;
|
||||||
|
if (inst->xterm_256color) nargc += 1;
|
||||||
if (inst->cmd) nargc += 2;
|
if (inst->cmd) nargc += 2;
|
||||||
|
|
||||||
nargv = calloc(nargc + 1, sizeof(char *));
|
nargv = calloc(nargc + 1, sizeof(char *));
|
||||||
|
@ -2378,6 +2379,10 @@ main_ipc_new(Ipc_Instance *inst)
|
||||||
{
|
{
|
||||||
nargv[i++] = "-W";
|
nargv[i++] = "-W";
|
||||||
}
|
}
|
||||||
|
if (inst->xterm_256color)
|
||||||
|
{
|
||||||
|
nargv[i++] = "-2";
|
||||||
|
}
|
||||||
if (inst->cmd)
|
if (inst->cmd)
|
||||||
{
|
{
|
||||||
nargv[i++] = "-e";
|
nargv[i++] = "-e";
|
||||||
|
@ -2560,6 +2565,8 @@ static const Ecore_Getopt options = {
|
||||||
"Don't exit when the command process exits."),
|
"Don't exit when the command process exits."),
|
||||||
ECORE_GETOPT_STORE_TRUE('s', "single",
|
ECORE_GETOPT_STORE_TRUE('s', "single",
|
||||||
"Force single executable if multi-instance is enabled.."),
|
"Force single executable if multi-instance is enabled.."),
|
||||||
|
ECORE_GETOPT_STORE_TRUE('2', "256color",
|
||||||
|
"Set TERM to 'xterm-256color' instead of 'xterm'."),
|
||||||
|
|
||||||
ECORE_GETOPT_VERSION ('V', "version"),
|
ECORE_GETOPT_VERSION ('V', "version"),
|
||||||
ECORE_GETOPT_COPYRIGHT ('C', "copyright"),
|
ECORE_GETOPT_COPYRIGHT ('C', "copyright"),
|
||||||
|
@ -2599,6 +2606,7 @@ elm_main(int argc, char **argv)
|
||||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||||
Eina_Bool cmd_options = EINA_FALSE;
|
Eina_Bool cmd_options = EINA_FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
Eina_Bool xterm_256color = EINA_FALSE;
|
||||||
Ecore_Getopt_Value values[] = {
|
Ecore_Getopt_Value values[] = {
|
||||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||||
ECORE_GETOPT_VALUE_BOOL(cmd_options),
|
ECORE_GETOPT_VALUE_BOOL(cmd_options),
|
||||||
|
@ -2628,6 +2636,7 @@ elm_main(int argc, char **argv)
|
||||||
ECORE_GETOPT_VALUE_BOOL(nowm),
|
ECORE_GETOPT_VALUE_BOOL(nowm),
|
||||||
ECORE_GETOPT_VALUE_BOOL(hold),
|
ECORE_GETOPT_VALUE_BOOL(hold),
|
||||||
ECORE_GETOPT_VALUE_BOOL(single),
|
ECORE_GETOPT_VALUE_BOOL(single),
|
||||||
|
ECORE_GETOPT_VALUE_BOOL(xterm_256color),
|
||||||
|
|
||||||
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
||||||
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
||||||
|
@ -2809,6 +2818,12 @@ elm_main(int argc, char **argv)
|
||||||
config->temporary = EINA_TRUE;
|
config->temporary = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xterm_256color)
|
||||||
|
{
|
||||||
|
config->xterm_256color = EINA_TRUE;
|
||||||
|
config->temporary = EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (geometry)
|
if (geometry)
|
||||||
{
|
{
|
||||||
if (sscanf(geometry,"%ix%i+%i+%i", &size_w, &size_h, &pos_x, &pos_y) == 4)
|
if (sscanf(geometry,"%ix%i+%i+%i", &size_w, &size_h, &pos_x, &pos_y) == 4)
|
||||||
|
|
Loading…
Reference in New Issue