multiple desktops... BAD BAD BAD hack (alt F1-F8 take u to them) - just


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 22 years ago
parent f3fdf7d846
commit 4143f0353f
  1. BIN
      data/config/behavior/default/actions.db
  2. BIN
      data/config/behavior/default/grabs.db
  3. BIN
      data/config/behavior/default/settings.db
  4. 64
      data/scripts/build_db.sh
  5. 20
      src/actions.c
  6. 16
      src/desktops.c
  7. 1
      src/e.h

@ -177,6 +177,70 @@ edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "m"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_CTRL_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "0"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F1"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "1"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F2"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "2"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F3"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "3"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F4"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "4"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F5"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "5"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F6"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "6"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F7"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
edb_ed $DB add "/actions/"$NUM"/params" str "7"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F8"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/count" int $NUM
# basic settings

@ -55,6 +55,8 @@ static void e_act_snap_start (void *o, E_Action *a, void *data, int x, int y, in
static void e_act_zoom_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry);
static void e_act_desk_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry);
static void
_e_action_find(char *action, int act, int button, char *key, Ev_Key_Modifiers mods, void *o)
{
@ -467,6 +469,7 @@ e_actions_init(void)
e_action_add_proto("Window_Max_Size", e_act_max_start, NULL, NULL);
e_action_add_proto("Winodw_Snap", e_act_snap_start, NULL, NULL);
e_action_add_proto("Window_Zoom", e_act_zoom_start, NULL, NULL);
e_action_add_proto("Desktop", e_act_desk_start, NULL, NULL);
}
@ -1240,3 +1243,20 @@ e_act_zoom_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry
UN(ry);
}
static void
e_act_desk_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry)
{
int desk = 0;
if (a->params) desk = atoi(a->params);
e_desktops_goto(desk);
return;
UN(a);
UN(data);
UN(x);
UN(y);
UN(rx);
UN(ry);
}

@ -4,6 +4,7 @@ static Evas_List desktops = NULL;
static Window e_base_win = 0;
static int screen_w, screen_h;
static int current_desk = 0;
static int current_desk_x = 0;
static void e_idle(void *data);
@ -267,3 +268,18 @@ e_desktops_get_current(void)
{
return current_desk;
}
void
e_desktops_goto(int d)
{
int dx;
E_Desktop *desk;
dx = d - current_desk_x;
desk = e_desktops_get(0);
if (desk)
{
e_desktops_scroll(desk, -(dx * desk->real.w), 0);
}
current_desk_x = d;
}

@ -754,6 +754,7 @@ void e_desktops_hide(E_Desktop *d);
int e_desktops_get_num(void);
E_Desktop * e_desktops_get(int d);
int e_desktops_get_current(void);
void e_desktops_goto(int num);
void e_desktops_update(E_Desktop *desk);
void e_resist_border(E_Border *b);

Loading…
Cancel
Save