<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.xfce.org/extern.php?action=feed&amp;tid=6814&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Xfce Forums / Applet request - Run script, show icon]]></title>
		<link>http://forum.xfce.org/viewtopic.php?id=6814</link>
		<description><![CDATA[The most recent posts in Applet request - Run script, show icon.]]></description>
		<lastBuildDate>Mon, 13 Feb 2012 17:26:07 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Applet request - Run script, show icon]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=24999#p24999</link>
			<description><![CDATA[<p>See also the genmon page: <a href="http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin" rel="nofollow">http://goodies.xfce.org/projects/panel- … mon-plugin</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Nick)]]></author>
			<pubDate>Mon, 13 Feb 2012 17:26:07 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=24999#p24999</guid>
		</item>
		<item>
			<title><![CDATA[Re: Applet request - Run script, show icon]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=24998#p24998</link>
			<description><![CDATA[<p>If you use %k in the command, it will be replaced with the desktop file uri. You can use that in the script to modify the launcher.</p><div class="codebox"><pre><code>#!/bin/sh

filename=${1#file://}

desktop-file-edit --set-icon=&quot;face-tired&quot; &quot;$filename&quot;
touch &quot;$filename&quot;

# Do stuff
sleep 5

desktop-file-edit --set-icon=&quot;face-smile&quot; &quot;$filename&quot;
touch &quot;$filename&quot;</code></pre></div><p>Only create a launcher with the following command &quot;scriptname.sh %k&quot;</p>]]></description>
			<author><![CDATA[dummy@example.com (Nick)]]></author>
			<pubDate>Mon, 13 Feb 2012 17:21:20 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=24998#p24998</guid>
		</item>
		<item>
			<title><![CDATA[Re: Applet request - Run script, show icon]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=24997#p24997</link>
			<description><![CDATA[<p>I use launcher system to check mail. <br />- Create a launcher, make it run your script<br />- Go in ~/.config/xfce4/panel,&#160; the last created directory &quot;launcher-##&quot; normally contain a .desktop file (look inside and verify that is the launcher that run your script by looking the &quot;Exec=&quot; property)<br />- Now your script :</p><div class="codebox"><pre class="vscroll"><code>#!/bin/bash

launcherDir=~/.config/xfce4/panel/launcher-##

##### Your code ####
...
##################

function gendesktop 
{
    cat &lt;&lt;EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=$1
Comment=
Icon=$2
Exec=/path/to/your/script
Path=
Terminal=false
StartupNotify=false
EOF
}

rm -f $launcherDir/*.desktop

if [ $res == 0 ]; then    
    gendesktop    &quot;Tool tips that OK&quot;     &quot;path to your icon, or icon name from gtk cache icons&quot;    &gt; $launcherDir/$$.desktop
else
    gendesktop    &quot;Tool tips that not ok&quot;    &quot;path to your second icon&quot;    &gt;   $launcherDir/$$.desktop
fi    </code></pre></div><p>- There must be is a better way to force update the launcher&#039;s icon than creating a new .desktop file. Nick, is that what you are refering by using %k ?</p>]]></description>
			<author><![CDATA[dummy@example.com (angstrom)]]></author>
			<pubDate>Mon, 13 Feb 2012 15:44:24 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=24997#p24997</guid>
		</item>
		<item>
			<title><![CDATA[Re: Applet request - Run script, show icon]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=24993#p24993</link>
			<description><![CDATA[<p>The xfce4-genmon-plugin can do this, but without the icons. With some clever scripting you can also do this with normal launchers (change the icon of the desktop file, use %k to get the uri to the file).</p>]]></description>
			<author><![CDATA[dummy@example.com (Nick)]]></author>
			<pubDate>Mon, 13 Feb 2012 07:15:03 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=24993#p24993</guid>
		</item>
		<item>
			<title><![CDATA[Applet request - Run script, show icon]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=24991#p24991</link>
			<description><![CDATA[<p>I need simple applet. <br />- Run script. <br />- Script return 0 (ok) or 1 (fail) <br />- Show icon. If 0 - show first icon. <br />- It 1 - show second icon. </p><p>It applet will be places in panel. <br />Near other indicators. </p><p>Settings:<br />- script<br />- incos<br /><span class="postimg"><img src="http://xmages.net/storage/10/1/0/2/3/upload/a15c471f.png" alt="a15c471f.png" /></span></p>]]></description>
			<author><![CDATA[dummy@example.com (adisk)]]></author>
			<pubDate>Mon, 13 Feb 2012 02:47:36 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=24991#p24991</guid>
		</item>
	</channel>
</rss>
