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>vanrenterghem.biz - e_launchOrMoveApp.sh</TITLE>
7 <link rel="stylesheet" href="/styles/header.css" type="text/css" />
8 <link rel="stylesheet" href="/styles/main.css" type="text/css" />
11 <!--#include virtual='/header.shtml' -->
12 <H1>e_launchOrMoveApp.sh</h1>
14 <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 />
17 <B>Requirements:</B> <a href="http://www.enlightenment.org/main/pages.html">Enlightenment window manager</A>
20 <table border="1" cellpadding="6" bgcolor="#ffeeee" width=100%><tr><td>
22 <font color="0000ff"><strong>#!/bin/bash</strong></font>
24 <font color="#444444"># This script gets the current desktop and area</font>
25 <font color="#444444"># and checks if the prog $1 (identifier) is running</font>
26 <font color="#444444"># and moves a running $1 to current desktop/area
27 # or starts $2 (command)</font>
28 <font color="#444444"># e.g. $1 = Evolution and $2 = evolution
30 eesh -ewait <font color="#008000">"goto_desktop ?"</font>| \
32 while read desktop; do
33 eesh -ewait <font color="#008000">"goto_area ?"</font>| \
36 if eesh -ewait <font color="#008000">"window_list"</font> | grep <font color="#2040a0">$1</font>
38 eesh -ewait <font color="#008000">"window_list"</font> | \
39 grep <font color="#2040a0">$1</font>| \
42 eesh -e <font color="#008000">"win_op ${win_id} move 80 0"</font>;
43 eesh -e <font color="#008000">"win_op ${win_id} desk ${desktop}"</font>;
44 eesh -e <font color="#008000">"win_op ${win_id} area ${area}"</font>;
47 <font color="#2040a0">$2</font> &
54 and in ~/.enlightenment/keybindings.cfg:
55 <table border="1" cellpadding="6" bgcolor="#ffeeee" width=100%><tr><td>
60 __ACTION __A_EXEC ~/scripts/e_launchOrMoveApp.sh Evolution evolution
64 <!--#include virtual='/footer.shtml' -->