here's a short list of things i think we can do in the short to medium term to
make it a first-class terminal:
-[X] evas textgrid needs creating and to be used
-[X] underline and strikethrough need supporting at termio level
[ ] blink and blink2 attributes need to be supported
-[ ] improve terminal emulation handling (i know it doesn't handle gfx
- chars and it definitely has an incomplete escape handling core -
- many are commented out and unhandled)
+[ ] improve terminal emulation handling. known apps with problems:
+ mc
[ ] copy & paste support for clipboard not just primary (like xterm)
[ ] dnd text (to/from terminal)
-[X] ecore-imf support
[ ] handle multibyte displays better (does handle utf8 only atm and
- then maybe not according to convention)
+ then maybe not according to convention like double cell spacing
+ for jp/kr/zh etc.)
[ ] general input mode handling improvements (keypad, other key
- input, mousereporting etc.)
-[X] save of config after options changes (option checkbox for
- temporary local only changes)
+ input, etc.)
[ ] selection of themes
[ ] selection of background "wallpapers" (and support them at all -
doesn't right now - should support regular images, animated gifs,
and edje files)
-[X] transparency support (theme needs to be told to go into
- tranpsarency mode and then window alpha enabled)
-[ ] visual bell reporting (signals to theme)
[ ] scrollbar (elm scroller that mirrors the term smart size/position
- gives us fingerscroll - layer on top of term smart, stick
invisible rect inside to track for scrolling etc.)
[ ] selection should become single edje object so it can be styled nicely
[ ] selection should have handles on the start/end so u can drag and
change its size once there
-[ ] improve selection text extraction logic
-[X] font selector should include font previews in the list -
- preferably ONLY be a list of previews
-[X] options widgets should be deleted once they are hidden. they stay
- in memory at the moment
+[ ] improve selection text extraction logic so its reliable
[ ] clicking with ANY mouse button while options is up outside of
options should dismiss it.
image: "bg_shine.png" COMP;
image: "bg_glint.png" COMP;
image: "bg_shadow.png" COMP;
+ image: "bg_led.png" COMP;
}
parts {
part { name: "shadow";
aspect_preference: HORIZONTAL;
}
}
+ part { name: "bell";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ min: 32 32;
+ max: 32 32;
+ rel2.offset: -5 -5;
+ align: 1.0 1.0;
+ image.normal: "bg_led.png";
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 255 255 255 255;
+ }
+ }
part { name: "terminology.options"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
target: "shadow";
target: "fade";
}
+ program { name: "bell";
+ signal: "bell";
+ source: "terminology";
+ action: STATE_SET "visible" 0.0;
+ target: "bell";
+ after: "bell2";
+ }
+ program { name: "bell2";
+ action: STATE_SET "default" 0.0;
+ transition: BOUNCE 1.0 1.0 3.0;
+ target: "bell";
+ }
+// program { name: "focus_in";
+// signal: "focus,in";
+// source: "terminology";
+// }
+// program { name: "focus_out";
+// signal: "focus,out";
+// source: "terminology";
+// }
program { name: "media_off";
signal: "media,off";
source: "terminology";
bg_bevel.png \
bg_shine.png \
bg_glint.png \
+bg_led.png \
bg_shadow.png \
cr_fill.png \
cr_key.png \
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "font.bitmap", font.bitmap, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
- (edd_base, Config, "scrollback", scrollback, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "theme", theme, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "background", background, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC
+ (edd_base, Config, "wordsep", wordsep, EET_T_STRING);
+ EET_DATA_DESCRIPTOR_ADD_BASIC
+ (edd_base, Config, "scrollback", scrollback, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC
+ (edd_base, Config, "vidmod", vidmod, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "jump_on_change", jump_on_change, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "flicker_on_key", flicker_on_key, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "translucent", translucent, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
- (edd_base, Config, "wordsep", wordsep, EET_T_STRING);
- EET_DATA_DESCRIPTOR_ADD_BASIC
- (edd_base, Config, "vidmod", vidmod, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "mute", mute, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC
+ (edd_base, Config, "urg_bell", urg_bell, EET_T_UCHAR);
}
void
config->wordsep = eina_stringshare_add(" '\"()[]{}=*!#$^\\:;,?`");
config->vidmod = 0;
config->mute = EINA_FALSE;
+ config->urg_bell = EINA_TRUE;
}
config->config_key = eina_stringshare_add(key); /* not in eet */
Eina_Bool flicker_on_key;
Eina_Bool translucent;
Eina_Bool mute;
+ Eina_Bool urg_bell;
+
Eina_Bool temporary; /* not in EET */
const char *config_key; /* not in EET, the key that config was loaded */
};
static Evas_Object *win = NULL, *bg = NULL, *term = NULL, *media = NULL;
static Ecore_Timer *flush_timer = NULL;
+static Eina_Bool focused = EINA_FALSE;
static void
_cb_focus_in(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
+ if (!focused) elm_win_urgent_set(win, EINA_FALSE);
+ focused = EINA_TRUE;
edje_object_signal_emit(bg, "focus,in", "terminology");
elm_object_focus_set(data, EINA_TRUE);
}
static void
_cb_focus_out(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
+ focused = EINA_FALSE;
edje_object_signal_emit(bg, "focus,out", "terminology");
elm_object_focus_set(data, EINA_FALSE);
elm_cache_all_flush();
elm_exit();
}
+static void
+_cb_bell(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
+{
+ Config *config = termio_config_get(term);
+
+ edje_object_signal_emit(bg, "bell", "terminology");
+ if (!config) return;
+ if (config->urg_bell)
+ {
+ if (!focused) elm_win_urgent_set(win, EINA_TRUE);
+ }
+}
+
void
main_trans_update(const Config *config)
{
evas_object_smart_callback_add(o, "options", _cb_options, NULL);
evas_object_smart_callback_add(o, "change", _cb_change, NULL);
evas_object_smart_callback_add(o, "exited", _cb_exited, NULL);
+ evas_object_smart_callback_add(o, "bell", _cb_bell, NULL);
evas_object_show(o);
main_trans_update(config);
}
static void
+_cb_op_behavior_urg_bell_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
+{
+ Evas_Object *term = data;
+ Config *config = termio_config_get(term);
+ config->urg_bell = elm_check_state_get(obj);
+ config_save(config, NULL);
+}
+
+static void
_cb_op_behavior_wsep_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
{
Evas_Object *term = data;
evas_object_smart_callback_add(o, "changed",
_cb_op_behavior_flicker_chg, term);
+ o = elm_check_add(opbox);
+ evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
+ elm_object_text_set(o, "Urgent on bell");
+ elm_check_state_set(o, config->urg_bell);
+ elm_box_pack_end(opbox, o);
+ evas_object_show(o);
+ evas_object_smart_callback_add(o, "changed",
+ _cb_op_behavior_urg_bell_chg, term);
+
o = elm_separator_add(opbox);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_call(data, "exited", NULL);
}
+static void
+_smart_pty_bell(void *data)
+{
+ evas_object_smart_callback_call(data, "bell", NULL);
+}
+
Evas_Object *
termio_add(Evas_Object *parent, Config *config, const char *cmd, int w, int h)
{
sd->pty->cb.cancel_sel.data = obj;
sd->pty->cb.exited.func = _smart_pty_exited;
sd->pty->cb.exited.data = obj;
+ sd->pty->cb.bell.func = _smart_pty_bell;
+ sd->pty->cb.bell.data = obj;
_smart_size(obj, w, h, EINA_FALSE);
return obj;
}
return 1;
*/
case 0x07: // BEL '\a' (bell)
- INF("BEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEP");
+ if (ty->cb.bell.func) ty->cb.bell.func(ty->cb.bell.data);
ty->state.had_cr = 0;
return 1;
case 0x08: // BS '\b' (backspace)
struct {
void (*func) (void *data);
void *data;
- } change, scroll, set_title, set_icon, cancel_sel, exited;
+ } change, scroll, set_title, set_icon, cancel_sel, exited, bell;
} cb;
struct {
const char *title;