All,
I just did a quick hack to allow desktop selection using enlightenment_remote.
I was thinking it might be nice to be able to use a shell script to
change desktops.
It doesn't do any validation except to ensure that it is changing to a
real desktop (to prevent e from segfaulting :) and this is my first
time trying to do anything in the e code. I couldn't tell if there was
anywhere else i needed to make changes other than in the
e_ipc_handlers*.h in the main bin source code.
Comments are welcome.
Thanks for e,
Marc
--
http://www.diadems.com/
1 3 5
2 4 6 R
diff -u src/bin/e_ipc_handlers.h /home/mcgmar0u/source/e/src/bin/e_ipc_handlers.h
--- src/bin/e_ipc_handlers.h 2005-06-29 10:36:49.000000000 -0500
+++ /home/mcgmar0u/source/e/src/bin/e_ipc_handlers.h 2005-06-30 18:12:12.000000000 -0500
@@ -591,6 +591,36 @@
#undef HDL
/****************************************************************************/
+#define HDL E_IPC_OP_GOTO_DESKTOP
+#if (TYPE == E_REMOTE_OPTIONS)
+ OP("-goto-desktop", 2, "Changes to the desktop specified by column and row, respectively OPT1 and OPT2", 0, HDL)
+#elif (TYPE == E_REMOTE_OUT)
+ REQ_2INT(atoi(params[0]), atoi(params[1]), HDL);
+#elif (TYPE == E_WM_IN)
+ START_2INT(val1, val2, HDL);
+ Evas_List *l, *ll;
+ E_Manager *man;
+ E_Container *con;
+ E_Zone *zone;
+ E_Desk *targetDesk;
+ for (l = e_manager_list(); l; l = l->next) {
+ man = l->data;
+ for (ll = man->containers; ll; ll = ll->next) {
+ con = ll->data;
+ zone = e_zone_current_get(con);
+ targetDesk = e_desk_at_xy_get(zone, val1, val2);
+ if (targetDesk != NULL) {
+ e_desk_show(targetDesk);
+ }
+ }
+ }
+ SAVE;
+ END_2INT;
+#elif (TYPE == E_REMOTE_IN)
+#endif
+#undef HDL
+
+/****************************************************************************/
#define HDL E_IPC_OP_MODULE_UNLOAD
#if (TYPE == E_REMOTE_OPTIONS)
OP("-module-unload", 1, "Unloads the module named 'OPT1' from memory", 0, HDL)
diff -u src/bin/e_ipc_handlers_list.h /home/mcgmar0u/source/e/src/bin/e_ipc_handlers_list.h
--- src/bin/e_ipc_handlers_list.h 2005-06-18 07:51:00.000000000 -0500
+++ /home/mcgmar0u/source/e/src/bin/e_ipc_handlers_list.h 2005-06-30 17:24:00.000000000 -0500
@@ -84,3 +84,4 @@
#define E_IPC_OP_MAXIMIZE_POLICY_SET 84
#define E_IPC_OP_MAXIMIZE_POLICY_GET 85
#define E_IPC_OP_MAXIMIZE_POLICY_GET_REPLY 86
+#define E_IPC_OP_GOTO_DESKTOP 87