<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Focus an application instead of re-launching it</title>
	<atom:link href="http://urukrama.wordpress.com/2008/05/05/focus-an-application-instead-of-re-launching-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://urukrama.wordpress.com/2008/05/05/focus-an-application-instead-of-re-launching-it/</link>
	<description></description>
	<lastBuildDate>Mon, 07 Dec 2009 12:39:04 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Animesh</title>
		<link>http://urukrama.wordpress.com/2008/05/05/focus-an-application-instead-of-re-launching-it/#comment-537</link>
		<dc:creator>Animesh</dc:creator>
		<pubDate>Sun, 08 Feb 2009 14:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://urukrama.wordpress.com/?p=54#comment-537</guid>
		<description>I forgot to mention; I keep my scripts in 
----------------------------------------------------
/home/username/bin/
----------------------------------------------------

so I don&#039;t need to mention full path for my scripts :)</description>
		<content:encoded><![CDATA[<p>I forgot to mention; I keep my scripts in<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
/home/username/bin/<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>so I don&#8217;t need to mention full path for my scripts <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Animesh</title>
		<link>http://urukrama.wordpress.com/2008/05/05/focus-an-application-instead-of-re-launching-it/#comment-536</link>
		<dc:creator>Animesh</dc:creator>
		<pubDate>Sun, 08 Feb 2009 14:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://urukrama.wordpress.com/?p=54#comment-536</guid>
		<description>Navi&#039;s comment got me thinkering with your/Vaughn&#039;s scripts and with very little modifications this is what I came up with :
======================================================
#!/bin/sh

app_exec=$1
app_wm_class=$2

# no app started, so start one
if [ -z &quot;`wmctrl -lx &#124; grep $app_wm_class`&quot; ]; then
    $app_exec &amp;
else
    # search for existing apps on current desktop
    current_desk=`wmctrl -d &#124; grep &#039;*&#039; &#124; cut -d &#039; &#039; -f 1`
    app_on_this_desk=`wmctrl -lx &#124; grep &quot;$current_desk[ ]*$app_exec&quot; &#124; cut -d &#039; &#039; -f 1`
    if [ -n &quot;$app_on_this_desk&quot; ]; then
        wmctrl -i -a $app_on_this_desk
    else
        # no apps on current desktop, so just open the first one
        wmctrl -x -a $app_wm_class
    fi;
fi;
======================================================
I called it :    app_focus.sh 

for example you can launch/ focus 

gnome-terminal with :
-----------------------------------------------------
app_focus.sh gnome-terminal Gnome-terminal
-----------------------------------------------------

nautilus with :
---------------------------------------------------
app_focus.sh &quot;nautilus --no-desktop&quot; Nautilus
---------------------------------------------------


And since I use Arch linux, Gran Paradiso i.e. some form of &quot;free firefox&quot; with :
------------------------------------------------------
app_focus.sh firefox &quot;&quot;Gran Paradiso&quot;&quot;
------------------------------------------------------

And like Navi said I assigned them to wbar ....... :)

BUT it is not a taskbar replacement :(  applications not in the bar initially would still need a proper taskbar that is only if you use one :) :)


wmctrl + devilspie is a great combination in my opinion, hey I even made xterm into a  drop down terminal like tilda using those two with animation even :)</description>
		<content:encoded><![CDATA[<p>Navi&#8217;s comment got me thinkering with your/Vaughn&#8217;s scripts and with very little modifications this is what I came up with :<br />
======================================================<br />
#!/bin/sh</p>
<p>app_exec=$1<br />
app_wm_class=$2</p>
<p># no app started, so start one<br />
if [ -z "`wmctrl -lx | grep $app_wm_class`" ]; then<br />
    $app_exec &amp;<br />
else<br />
    # search for existing apps on current desktop<br />
    current_desk=`wmctrl -d | grep &#8216;*&#8217; | cut -d &#8216; &#8216; -f 1`<br />
    app_on_this_desk=`wmctrl -lx | grep &#8220;$current_desk[ ]*$app_exec&#8221; | cut -d &#8216; &#8216; -f 1`<br />
    if [ -n "$app_on_this_desk" ]; then<br />
        wmctrl -i -a $app_on_this_desk<br />
    else<br />
        # no apps on current desktop, so just open the first one<br />
        wmctrl -x -a $app_wm_class<br />
    fi;<br />
fi;<br />
======================================================<br />
I called it :    app_focus.sh </p>
<p>for example you can launch/ focus </p>
<p>gnome-terminal with :<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
app_focus.sh gnome-terminal Gnome-terminal<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>nautilus with :<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
app_focus.sh &#8220;nautilus &#8211;no-desktop&#8221; Nautilus<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>And since I use Arch linux, Gran Paradiso i.e. some form of &#8220;free firefox&#8221; with :<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
app_focus.sh firefox &#8220;&#8221;Gran Paradiso&#8221;"<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>And like Navi said I assigned them to wbar &#8230;&#8230;. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>BUT it is not a taskbar replacement <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   applications not in the bar initially would still need a proper taskbar that is only if you use one <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>wmctrl + devilspie is a great combination in my opinion, hey I even made xterm into a  drop down terminal like tilda using those two with animation even <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Navi</title>
		<link>http://urukrama.wordpress.com/2008/05/05/focus-an-application-instead-of-re-launching-it/#comment-479</link>
		<dc:creator>Navi</dc:creator>
		<pubDate>Sun, 21 Dec 2008 07:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://urukrama.wordpress.com/?p=54#comment-479</guid>
		<description>Would be more useful if you could make it modular. I.e change it so that it only needs one script that does every program, the variables can be set in a config file somewhere... This + wbar = poor man&#039;s OSX knockoff. Then again, maybe I should just use simdock...</description>
		<content:encoded><![CDATA[<p>Would be more useful if you could make it modular. I.e change it so that it only needs one script that does every program, the variables can be set in a config file somewhere&#8230; This + wbar = poor man&#8217;s OSX knockoff. Then again, maybe I should just use simdock&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mads</title>
		<link>http://urukrama.wordpress.com/2008/05/05/focus-an-application-instead-of-re-launching-it/#comment-177</link>
		<dc:creator>Mads</dc:creator>
		<pubDate>Mon, 05 May 2008 15:15:49 +0000</pubDate>
		<guid isPermaLink="false">http://urukrama.wordpress.com/?p=54#comment-177</guid>
		<description>Hey, he stole my script! :D</description>
		<content:encoded><![CDATA[<p>Hey, he stole my script! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
