3 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
4 <meta name="author" content="Frederik Vanrenterghem">
5 <META NAME="Description" CONTENT="Personal homepage - Script">
6 <TITLE>frederik.gotdns.org:1976 - e_launchOrMoveApp.sh</TITLE>
9 <!--#include virtual='/header.shtml' -->
10 <H1>e_launchOrMoveApp.sh</h1>
12 <B>Purpose:</B> This script was written to be bound to the extra keys on my Logitech Cordless Desktop Deluxe wireless keyboard. This way, I can click on f.i. the E-Mail button to either launch my mail program, or transfer the application to the current desktop.<BR>
15 <B>Requirements:</B> <a href="http://www.enlightenment.org/main/pages.html">Enlightenment window manager</A>
18 <table border="1" cellpadding="6" bgcolor="#ffeeee" width=100%><tr><td>
20 <font color="0000ff"><strong>#!/bin/bash</strong></font>
22 <font color="#444444"># This script gets the current desktop and area</font>
23 <font color="#444444"># and checks if the prog $1 (identifier) is running</font>
24 <font color="#444444"># and moves a running $1 to current desktop/area
25 # or starts $2 (command)</font>
26 <font color="#444444"># e.g. $1 = Evolution and $2 = evolution
28 eesh -ewait <font color="#008000">"goto_desktop ?"</font>| \
30 while read desktop; do
31 eesh -ewait <font color="#008000">"goto_area ?"</font>| \
34 if eesh -ewait <font color="#008000">"window_list"</font> | grep <font color="#2040a0">$1</font>
36 eesh -ewait <font color="#008000">"window_list"</font> | \
37 grep <font color="#2040a0">$1</font>| \
40 eesh -e <font color="#008000">"win_op ${win_id} move 80 0"</font>;
41 eesh -e <font color="#008000">"win_op ${win_id} desk ${desktop}"</font>;
42 eesh -e <font color="#008000">"win_op ${win_id} area ${area}"</font>;
45 <font color="#2040a0">$2</font> &
52 and in keybindings.cfg:
53 <table border="1" cellpadding="6" bgcolor="#ffeeee" width=100%><tr><td>
59 __ACTION __A_EXEC /scripts/e_launchOrMoveApp.sh Evolution evolution
63 <!--#include virtual='/footer.shtml' -->