summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/terminology.15
-rw-r--r--src/bin/config.c10
-rw-r--r--src/bin/ipc.h1
-rw-r--r--src/bin/main.c20
4 files changed, 31 insertions, 5 deletions
diff --git a/man/terminology.1 b/man/terminology.1
index 1b20f6b..c4f3a76 100644
--- a/man/terminology.1
+++ b/man/terminology.1
@@ -121,6 +121,11 @@ Force single executable if multi-instance is enabled..
121Set TERM to \fBxterm-256color\fP instead of \fBxterm\fP. 121Set TERM to \fBxterm-256color\fP instead of \fBxterm\fP.
122. 122.
123.TP 123.TP
124.B \-\-active\-links=ACTIVATE\-LINKS
125Whether to highlight links.
126Type: BOOL.
127.
128.TP
124.B \-V, \-\-version 129.B \-V, \-\-version
125Show program version. 130Show program version.
126. 131.
diff --git a/src/bin/config.c b/src/bin/config.c
index 03e43e9..c80a3db 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -7,7 +7,7 @@
7#include "col.h" 7#include "col.h"
8#include "utils.h" 8#include "utils.h"
9 9
10#define CONF_VER 2 10#define CONF_VER 3
11 11
12#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;} 12#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
13 13
@@ -281,11 +281,17 @@ config_load(const char *key)
281 case 1: 281 case 1:
282 _config_upgrade_to_v2(config); 282 _config_upgrade_to_v2(config);
283 /*pass through*/ 283 /*pass through*/
284 case CONF_VER: /* 2 */ 284 case 2:
285 LIM(config->font.size, 3, 400); 285 LIM(config->font.size, 3, 400);
286 LIM(config->scrollback, 0, 200000); 286 LIM(config->scrollback, 0, 200000);
287 LIM(config->tab_zoom, 0.0, 1.0); 287 LIM(config->tab_zoom, 0.0, 1.0);
288 LIM(config->vidmod, 0, 3) 288 LIM(config->vidmod, 0, 3)
289
290 /* upgrade to v3 */
291 config->active_links = EINA_TRUE;
292 config->version = 3;
293 /*pass through*/
294 case CONF_VER: /* 3*/
289 break; 295 break;
290 default: 296 default:
291 if (config->version < CONF_VER) 297 if (config->version < CONF_VER)
diff --git a/src/bin/ipc.h b/src/bin/ipc.h
index 17c9026..8d41f33 100644
--- a/src/bin/ipc.h
+++ b/src/bin/ipc.h
@@ -27,6 +27,7 @@ struct _Ipc_Instance
27 int hold; 27 int hold;
28 int nowm; 28 int nowm;
29 int xterm_256color; 29 int xterm_256color;
30 int active_links;
30}; 31};
31 32
32void ipc_init(void); 33void ipc_init(void);
diff --git a/src/bin/main.c b/src/bin/main.c
index 4cda584..a122245 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -2316,6 +2316,7 @@ main_ipc_new(Ipc_Instance *inst)
2316 if (inst->hold) nargc += 1; 2316 if (inst->hold) nargc += 1;
2317 if (inst->nowm) nargc += 1; 2317 if (inst->nowm) nargc += 1;
2318 if (inst->xterm_256color) nargc += 1; 2318 if (inst->xterm_256color) nargc += 1;
2319 if (inst->active_links) nargc += 1;
2319 if (inst->cmd) nargc += 2; 2320 if (inst->cmd) nargc += 2;
2320 2321
2321 nargv = calloc(nargc + 1, sizeof(char *)); 2322 nargv = calloc(nargc + 1, sizeof(char *));
@@ -2441,6 +2442,10 @@ main_ipc_new(Ipc_Instance *inst)
2441 { 2442 {
2442 nargv[i++] = "-2"; 2443 nargv[i++] = "-2";
2443 } 2444 }
2445 if (inst->active_links)
2446 {
2447 nargv[i++] = "--active-links";
2448 }
2444 if (inst->cmd) 2449 if (inst->cmd)
2445 { 2450 {
2446 nargv[i++] = "-e"; 2451 nargv[i++] = "-e";
@@ -2599,6 +2604,7 @@ static const Ecore_Getopt options = {
2599 "Set font (NAME/SIZE for scalable, NAME for bitmap."), 2604 "Set font (NAME/SIZE for scalable, NAME for bitmap."),
2600 ECORE_GETOPT_CHOICE ('v', "video-module", 2605 ECORE_GETOPT_CHOICE ('v', "video-module",
2601 "Set emotion module to use.", emotion_choices), 2606 "Set emotion module to use.", emotion_choices),
2607
2602 ECORE_GETOPT_STORE_BOOL('l', "login", 2608 ECORE_GETOPT_STORE_BOOL('l', "login",
2603 "Run the shell as a login shell."), 2609 "Run the shell as a login shell."),
2604 ECORE_GETOPT_STORE_BOOL('m', "video-mute", 2610 ECORE_GETOPT_STORE_BOOL('m', "video-mute",
@@ -2625,6 +2631,8 @@ static const Ecore_Getopt options = {
2625 "Force single executable if multi-instance is enabled.."), 2631 "Force single executable if multi-instance is enabled.."),
2626 ECORE_GETOPT_STORE_TRUE('2', "256color", 2632 ECORE_GETOPT_STORE_TRUE('2', "256color",
2627 "Set TERM to 'xterm-256color' instead of 'xterm'."), 2633 "Set TERM to 'xterm-256color' instead of 'xterm'."),
2634 ECORE_GETOPT_STORE_BOOL('\0', "active-links",
2635 "Whether to highlight links."),
2628 2636
2629 ECORE_GETOPT_VERSION ('V', "version"), 2637 ECORE_GETOPT_VERSION ('V', "version"),
2630 ECORE_GETOPT_COPYRIGHT ('C', "copyright"), 2638 ECORE_GETOPT_COPYRIGHT ('C', "copyright"),
@@ -2671,7 +2679,7 @@ elm_main(int argc, char **argv)
2671 ECORE_GETOPT_VALUE_BOOL(cmd_options), 2679 ECORE_GETOPT_VALUE_BOOL(cmd_options),
2672#else 2680#else
2673 ECORE_GETOPT_VALUE_STR(cmd), 2681 ECORE_GETOPT_VALUE_STR(cmd),
2674#endif 2682#endif
2675 ECORE_GETOPT_VALUE_STR(cd), 2683 ECORE_GETOPT_VALUE_STR(cd),
2676 ECORE_GETOPT_VALUE_STR(theme), 2684 ECORE_GETOPT_VALUE_STR(theme),
2677 ECORE_GETOPT_VALUE_STR(background), 2685 ECORE_GETOPT_VALUE_STR(background),
@@ -2682,7 +2690,7 @@ elm_main(int argc, char **argv)
2682 ECORE_GETOPT_VALUE_STR(icon_name), 2690 ECORE_GETOPT_VALUE_STR(icon_name),
2683 ECORE_GETOPT_VALUE_STR(font), 2691 ECORE_GETOPT_VALUE_STR(font),
2684 ECORE_GETOPT_VALUE_STR(video_module), 2692 ECORE_GETOPT_VALUE_STR(video_module),
2685 2693
2686 ECORE_GETOPT_VALUE_BOOL(login_shell), 2694 ECORE_GETOPT_VALUE_BOOL(login_shell),
2687 ECORE_GETOPT_VALUE_BOOL(video_mute), 2695 ECORE_GETOPT_VALUE_BOOL(video_mute),
2688 ECORE_GETOPT_VALUE_BOOL(cursor_blink), 2696 ECORE_GETOPT_VALUE_BOOL(cursor_blink),
@@ -2696,12 +2704,13 @@ elm_main(int argc, char **argv)
2696 ECORE_GETOPT_VALUE_BOOL(hold), 2704 ECORE_GETOPT_VALUE_BOOL(hold),
2697 ECORE_GETOPT_VALUE_BOOL(single), 2705 ECORE_GETOPT_VALUE_BOOL(single),
2698 ECORE_GETOPT_VALUE_BOOL(xterm_256color), 2706 ECORE_GETOPT_VALUE_BOOL(xterm_256color),
2707 ECORE_GETOPT_VALUE_BOOL(active_links),
2699 2708
2700 ECORE_GETOPT_VALUE_BOOL(quit_option), 2709 ECORE_GETOPT_VALUE_BOOL(quit_option),
2701 ECORE_GETOPT_VALUE_BOOL(quit_option), 2710 ECORE_GETOPT_VALUE_BOOL(quit_option),
2702 ECORE_GETOPT_VALUE_BOOL(quit_option), 2711 ECORE_GETOPT_VALUE_BOOL(quit_option),
2703 ECORE_GETOPT_VALUE_BOOL(quit_option), 2712 ECORE_GETOPT_VALUE_BOOL(quit_option),
2704 2713
2705 ECORE_GETOPT_VALUE_NONE 2714 ECORE_GETOPT_VALUE_NONE
2706 }; 2715 };
2707 Win *wn; 2716 Win *wn;
@@ -2876,6 +2885,11 @@ elm_main(int argc, char **argv)
2876 config->disable_visual_bell = !visual_bell; 2885 config->disable_visual_bell = !visual_bell;
2877 config->temporary = EINA_TRUE; 2886 config->temporary = EINA_TRUE;
2878 } 2887 }
2888 if (active_links != 0xff)
2889 {
2890 config->active_links = !!active_links;
2891 config->temporary = EINA_TRUE;
2892 }
2879 2893
2880 if (xterm_256color) 2894 if (xterm_256color)
2881 { 2895 {