<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>hacklaviva! &#187; KODE</title>
	<atom:link href="http://hacklaviva.net/category/kode/feed/" rel="self" type="application/rss+xml" />
	<link>http://hacklaviva.net</link>
	<description>~* DIY livre techs *~</description>
	<lastBuildDate>Fri, 16 Jul 2010 08:44:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Terminal desktop integration!</title>
		<link>http://hacklaviva.net/2009/12/terminal-desktop-integration/</link>
		<comments>http://hacklaviva.net/2009/12/terminal-desktop-integration/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 11:09:15 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[KODE]]></category>

		<guid isPermaLink="false">http://hacklaviva.net/?p=300</guid>
		<description><![CDATA[I have made a few hacks on my Linux/Gnome system with the purpose to make the terminal more friendly with the desktop environment. What I wanted was something very simple from the user&#8217;s point of view: Imagine you execute a &#8216;ls&#8217; command and it outputs a list of files. Why wouldn&#8217;t you be able to [...]]]></description>
			<content:encoded><![CDATA[<p>I have made a few hacks on my Linux/Gnome system with the purpose to make the terminal more friendly with the desktop environment.</p>
<p><span id="more-300"></span></p>
<p>What I wanted was something very simple from the user&#8217;s point of view:</p>
<p>Imagine you execute a &#8216;ls&#8217; command and it outputs a list of files.<br />
Why wouldn&#8217;t you be able to open one of these files be simply clicking in it&#8217;s name from the terminal?</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7903963&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="500" height="375" src="http://vimeo.com/moogaloop.swf?clip_id=7903963&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>How does it work?</strong></p>
<p>Vte is the terminal emulator widget used in Gnome. It was modified to process a new kind of escape sequence that allows an application running inside the terminal to give meta-information about one piece of the text it writes on the terminal.</p>
<p>The rest of the work was made in Terminator, which I choose because I like it and it is written in Python!</p>
<p>The ls command was modified to produce this meta-information when it detects the terminal supports this funcionality. This happens the same way for instance, it generates a color output when it detects the terminal support colors. This change in ls was made as a demonstration. Other commands like find or du could be adapted also to produce the information.</p>
<p>All was done in such a way to interfere as little as possible in the usual way of working with the terminal. To avoid unexpected behaviours all operations are initiated from context menus, including drag and drop actions:</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8104707&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8104707&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object>
<p><a href="http://vimeo.com/8104707">Drag and drop no libvte!</a> from <a href="http://vimeo.com/user2720640">Daniel Carvalho</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><strong>More information</strong></p>
<p><a href="http://w.hacklaviva.net/index.php?title=Terminal_desktop_integration/Install_How-to">Instalation instructions</a></p>
<p><a href="http://w.hacklaviva.net/index.php?title=Terminal_desktop_integration/FAQs">FAQ</a></p>
<p>Please post comments in this page or contact me at idnael @ gmail.com!</p>
]]></content:encoded>
			<wfw:commentRss>http://hacklaviva.net/2009/12/terminal-desktop-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integração terminal desktop</title>
		<link>http://hacklaviva.net/2009/12/integracao-terminal-desktop/</link>
		<comments>http://hacklaviva.net/2009/12/integracao-terminal-desktop/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 12:40:51 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[KODE]]></category>

		<guid isPermaLink="false">http://hacklaviva.net/?p=290</guid>
		<description><![CDATA[Fiz uns hackings em alguns componentes do meu sistema Linux/Gnome, com o fim de tornar o terminal mais bem integrado no desktop.

O que eu queria era muito simples, do ponto de vista do utilizador:

Imaginem que executam por exemplo um comando “ls”, e ele escreve um monte de linhas. Porque não hão de poder abrir um desses ficheiros simplesmente clicando no nome no terminal?

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7903963&#38;server=vimeo.com&#38;show_title=1&#38;show_byline=1&#38;show_portrait=0&#38;color=&#38;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=7903963&#38;server=vimeo.com&#38;show_title=1&#38;show_byline=1&#38;show_portrait=0&#38;color=&#38;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object>
]]></description>
			<content:encoded><![CDATA[<p>Fiz uns hackings em alguns componentes do meu sistema Linux/Gnome, com o fim de tornar o terminal mais bem integrado no desktop.<br />
(read this post in english <a href="http://hacklaviva.net/2009/12/terminal-desktop-integration">here</a>)</p>
<p>O que eu queria era muito simples, do ponto de vista do utilizador: Imaginem que executam por exemplo um comando &#8220;ls&#8221;, e ele escreve um monte de linhas. Porque não hão de poder abrir um desses ficheiros simplesmente clicando no nome no terminal?</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7903963&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="500" height="375" src="http://vimeo.com/moogaloop.swf?clip_id=7903963&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><span id="more-290"></span></p>
<p><strong>Como funciona?</strong></p>
<p>O vte é o widget emulador de terminal usado no Gnome. Eu modifiquei-o para tratar um novo tipo de sequência de escape, que permite a uma aplicação que corre dentro do terminal dar meta-informação a respeito de um pedaço de texto escrito no terminal.</p>
<p>O resto do trabalho foi feito no Terminator, que foi escolhido porque além de ser o meu preferido, está escrito em Python.</p>
<p>O comando &#8220;ls&#8221; foi modificado para produzir a meta-informação quando detecta que o terminal suporta essa funcionalidade. Isso acontece da mesma forma que o ls por exemplo faz um output colorido quando detecta que está a escrever num terminal que suporta cores.</p>
<p>A alteração do &#8220;ls&#8221; vou feita como demonstração. Outros comandos como o &#8220;find&#8221;, &#8220;du&#8221; e muitos outros podem também ser adaptados para usar a nova funcionalidade do libvte!!</p>
<p>Tudo feito de forma a interferir o menos possível na forma habitual de utilização do terminal. Para evitar comportamentos inesperados, todas as operações são lançadas apartir dos menus de contexto. Isso inclúi as operações de drag e drop:</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8104707&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8104707&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object>
<p><a href="http://vimeo.com/8104707">Drag and drop no libvte!</a> from <a href="http://vimeo.com/user2720640">Daniel Carvalho</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><strong>Mais informações:</strong></p>
<ul>
<li><a href="http://w.hacklaviva.net/index.php?title=Terminal_desktop_integration/Install_How-to">Instruções de instalação</a></li>
<li><a href="http://w.hacklaviva.net/index.php?title=Terminal_desktop_integration/FAQs">FAQ</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://hacklaviva.net/2009/12/integracao-terminal-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script greasemonkey para arredondar preços</title>
		<link>http://hacklaviva.net/2009/08/243/</link>
		<comments>http://hacklaviva.net/2009/08/243/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 12:35:27 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[KODE]]></category>

		<guid isPermaLink="false">http://hacklaviva.net/?p=243</guid>
		<description><![CDATA[O que mais se vê nas lojas são os preços terminados em 99. Os vendedores usam este ardil para dar a ilusão que o preço é mais baixo do que realmente é! Mas se for visitar uma loja online já pode corrigir isso usando esta script que nasceu durante uma conversa no hacklaviva. Primeiro precisa [...]]]></description>
			<content:encoded><![CDATA[<p><head>  <meta content="text/html; charset=utf-8"  http-equiv="content-type"></p>
<p>
O que mais se vê nas lojas são os preços terminados em 99. Os vendedores usam este ardil para dar a ilusão que o preço é mais baixo do que realmente é!
</p>
<p>
Mas se for visitar uma loja online já pode corrigir isso usando esta script que nasceu durante uma conversa no hacklaviva.
</p>
<p>
Primeiro precisa instalar o <a href="http://diveintogreasemonkey.org/download/">GreaseMonkey</a> (só funciona no Firefox), depois instalar esta <a href='http://hacklaviva.net/wp-content/uploads/2009/08/onecentuser.js'>script</a>. Se quiser que um dado site seja processado pela script, vá ao menu &#8220;Ferramentas / Grease Monkeys / Gerir scripts&#8221;, escolha a script &#8220;onecent&#8221; e faça &#8220;Adicionar url&#8221;.
</p>
<p>
A script elimina da página os preços terminados em &quot;99&quot;, e substitui-os pelos valores arredondados! Exemplo de utilização:
</p>
<p>
Antes:<br />
<img src="http://hacklaviva.net/wp-content/uploads/2009/08/amazon_antes.png" alt="amazon_antes" title="amazon_antes" width="349" height="224" class="alignnone size-full wp-image-241" />
  </p>
<p>
  Depois:</p>
<p><img src="http://hacklaviva.net/wp-content/uploads/2009/08/amazon_depois.png" alt="amazon_depois" title="amazon_depois" width="349" height="224" class="alignnone size-full wp-image-242" />
</p>
<p>
Ver também em <a href="http://userscripts.org/scripts/show/56749">usercripts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hacklaviva.net/2009/08/243/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
