add some shortcuts to "g" termcmd.

SVN revision: 75539
devs/lucas/wip
Gustavo Sverzut Barbieri 11 years ago
parent 0d5b09207c
commit d859563fb7
  1. 5
      README
  2. 48
      src/bin/termcmd.c

@ -60,7 +60,10 @@ f = Reset font to default settign saved in config
f+ = Increase fontsize
f- = Decreate fontsize
fb = Display big font size (10x20 bitmap, or size 20 with scalable).
gNxM = make terminal NxM chars in size (if possible). e.g. g80x48 g40x20
gNxM = make terminal NxM chars in size (if possible). e.g. g80x48 g40x20.
If just one number is provided, it will use the following shortcuts:
g0=80x40; g1=80x40; g2=80x60; g3=80x80; g4=120x24; g5=120x40; g6=120x60;
g7=120x80; g8=120x120
Mouse controls:

@ -86,17 +86,55 @@ termcmd_do(Evas_Object *obj, Evas_Object *win, Evas_Object *bg, const char *cmd)
}
return EINA_TRUE;
}
if ((cmd[0] == 'g') || (cmd[0] == 'G')) // font size
if ((cmd[0] == 'g') || (cmd[0] == 'G')) // grid size
{
int w = -1, h = -1;
if (sscanf(cmd, "g%ix%i", &w, &h) == 2)
int r = sscanf(cmd, "g%ix%i", &w, &h);
if (r == 1)
{
if ((w > 0) && (h > 0))
switch (w)
{
termio_grid_size_set(obj, w, h);
case 0:
w = 80;
h = 24;
break;
case 1:
w = 80;
h = 40;
break;
case 2:
w = 80;
h = 60;
break;
case 3:
w = 80;
h = 80;
break;
case 4:
w = 120;
h = 24;
break;
case 5:
w = 120;
h = 40;
break;
case 6:
w = 120;
h = 60;
break;
case 7:
w = 120;
h = 80;
break;
case 8:
w = 120;
h = 120;
break;
}
}
if ((w > 0) && (h > 0))
termio_grid_size_set(obj, w, h);
return EINA_TRUE;
}
return EINA_FALSE;

Loading…
Cancel
Save