<?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>Cyberborean Chronicles &#187; KDE</title>
	<atom:link href="http://blog.cyberborean.org/tag/kde/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.cyberborean.org</link>
	<description>by Alex Alishevskikh</description>
	<lastBuildDate>Wed, 18 Jan 2012 07:52:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Nepomuk-KDE with the Sesame backend</title>
		<link>http://blog.cyberborean.org/2009/10/07/nepomuk-kde-with-the-sesame-backend</link>
		<comments>http://blog.cyberborean.org/2009/10/07/nepomuk-kde-with-the-sesame-backend#comments</comments>
		<pubDate>Wed, 07 Oct 2009 22:10:31 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Semantic Web]]></category>
		<category><![CDATA[tagging]]></category>

		<guid isPermaLink="false">http://blog.cyberborean.org/?p=487</guid>
		<description><![CDATA[There is a helpful article on how to make Nepomuk a lot faster by switching its default storage backend to Sesame2: Pimp my Nepomuk Being both a really old KDE user and a semantic desktop partisan at the same time, I am, of course, keeping my eye on the progress in Nepomuk project.  It was [...]]]></description>
			<content:encoded><![CDATA[<p>There is a helpful article on how to make <a href="http://nepomuk.kde.org/">Nepomuk</a> a lot faster by switching its default storage backend to <a href="http://openrdf.org">Sesame2</a>:</p>
<p class="hand"><a href="http://tokoe-kde.blogspot.com/2009/09/pimp-my-nepomuk.html">Pimp my Nepomuk </a></p>
<p><span id="more-487"></span>Being both a really old KDE user and a semantic desktop partisan at the same time, I am, of course, keeping my eye on the progress in Nepomuk project.  It was apparently close to my old dream of a tagging framework supported natively and consistently across the whole desktop environment, so I highly appreciated this effort and it was nice to hear that Nepomuk would be officially included into KDE &#8211; my desktop of choice for many years.</p>
<p>Unfortunately, the experience was rather disappointing. It&#8217;s turned out to be painfully slow, not only slow by itself, but being a brake for overall desktop navigation. Even hovering the cursor over files and folders in Dolphin made Nepomuk process to eat above 50% of CPU time and caused annoying delays. The simple operations like assigning a tag to a file took seconds, the responsiveness which is obviously inappropriate for a real-world desktop system. It thus was turned off in a hope that the things would be improved in future versions (I was confused a bit by how it might appear in the production release, but, frankly, early KDE 4 was full of much more disastrous things). Since then, I checked it after every KDE version upgrade, but there was no visible progress in performance, alas.</p>
<p>It was really good news &#8211; the author of the post above argues that the performance issues are in fact, caused by a storage backend which <a href="http://soprano.sourceforge.net/">Soprano</a>, an RDF framework underlying to Nepomuk, uses to keep RDF data. By default, it&#8217;s shipped with <a href="http://librdf.org">Redland</a> (aka librdf), an RDF database library written in C. Luckily, the backend is easily replaceable and it&#8217;s worth to try to install a faster alternative seeking for a better performance. The author recommends <a href="http://openrdf.org">Sesame2</a> &#8211; a 100% pure Java RDF framework which works (surprisingly for many, I think &#8211; but not for me!) much faster than it&#8217;s native code counterpart.</p>
<p>I tested Nepomuk with Sesame and convinced that now it works really faster &#8211; as it should, in fact. There is of course, a room for improvements in Nepomuk to be a real end-user tool &#8211; e.g. a tag navigation interface without which the tags are rather useless, but its another story. At least, the performance is not a blocker anymore, so Nepomuk now is enabled in my KDE all the time.</p>
<h3>For Kubuntu users: How-to</h3>
<p>I tested the Sesame2 backend for Nepomuk on Kubuntu 9.04 Jaunty Jackalope, KDE 4.3.0 and Sun JRE 6 (I have no idea if it works with GNU Java, but you can give it a try).</p>
<ol>
<li>Install <strong>soprano-backend-sesame</strong> package (<code>sudo apt-get install soprano-backend-sesame</code>)</li>
<li>Make a symlink from <code>$JAVA_HOME/jre/lib/i386/client/libjvm.so</code> in the <code>/usr/lib</code> directory</li>
<li>Restart Nepomuk server</li>
</ol>
<p>Check if Sesame2 backend is used now:</p>

<div class="wp_syntax"><div class="code"><pre class="" style="font-family:monospace;">qdbus org.kde.NepomukStorage /nepomukstorage usedSopranoBackend</pre></div></div>

<p>It should answer &#8220;<code>sesame2</code>&#8220;. If it still answers &#8220;<code>redland</code>&#8220;, something was wrong. You may need also to replace the value &#8220;<code>redland</code>&#8221; to &#8220;<code>sesame2</code>&#8221; in <code>~/.kde/share/config/nepomukserverrc</code> file manually and restart Nepomuk again.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2009/10/07/nepomuk-kde-with-the-sesame-backend/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kubuntu Hardy</title>
		<link>http://blog.cyberborean.org/2008/05/27/kubuntu-hardy</link>
		<comments>http://blog.cyberborean.org/2008/05/27/kubuntu-hardy#comments</comments>
		<pubDate>Tue, 27 May 2008 13:24:24 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[hardy heron]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://cyberborean.wordpress.com/?p=261</guid>
		<description><![CDATA[Finally moved my main working machine to Kubuntu 8.04 &#8220;Hardy Heron&#8221;. Yeah, late a bit, but it is my everyday working environment so I have to take these upgrades very seriously to not put my work into mess even for a day. Fortunately, no bad things were happened and in a lucky weekend I got [...]]]></description>
			<content:encoded><![CDATA[<p>Finally moved my main working machine to <a href="http://kubuntu.com">Kubuntu 8.04 &#8220;Hardy Heron&#8221;</a>. Yeah, late a bit, but it is my everyday working environment so I have to take these upgrades very seriously to not put my work into mess even for a day. Fortunately, no bad things were happened and in a lucky weekend I got Kubuntu 8.04 installed with all software I needed.</p>
<p><span id="more-212"></span></p>
<p>As I <a href="http://cyberborean.wordpress.com/2007/11/09/gutsy-doubts/">skipped</a> 7.10 &#8220;Gutsy&#8221; release, I preferred to do a fresh install from Hardy Heron LiveCD instead of two-step &#8220;Feisty » Gutsy » Hardy&#8221; network upgrade. I installed Hardy right into the existing Feisty partition replacing the old installation. Separate home partition was left untouched to keep all my personal preferences and data in new system.</p>
<p>It took ~25 minutes from booting the installation CD to logging into a working system.</p>
<h3>Unsurprisingly good</h3>
<p>No doubts, Kubuntu developers and packagers spent this year not for nothing. In general, Hardy is a better system than previous Kubuntu versions. It loads essentially faster and many little annoyances was fixed. Good job!</p>
<h3>Hardware compatibility</h3>
<p>Ubuntu systems are known to have great hardware support. As far back as 7.04 version, it recognized my hardware configuration including such exotic devices like DVB-card and CDMA modem without any problem. The only trouble was my HP LaserJet 1020 printer for which I had to install and configure foo2zjs package manually. So, it was nice to see it&#8217;s fixed in Hardy; now my printer is supported via native HP open source drivers and working out the box.</p>
<p>A bad surprise was that Hardy could not detect my monitor automatically and set failsafe 640&#215;480 resolution as a result. It was strange as it was no problem with it in Feisty. Even when I&#8217;ve clicked &#8220;Detect monitor&#8221; button manually, it detected it as default &#8220;plug-n-play&#8221; monitor. I had to remember a model of my monitor and select it from the list. Not a big deal, but a pity though.</p>
<h3>KDE 4</h3>
<p>Looking great and nice but apparently, a lot of work is still needed there. Crashes are not unusual everywhere and the single Plasma panel looks more like a prototype than a part of a desktop for the real world. It&#8217;s half-baked, almost not configurable and I cannot setup a desktop I need for my tasks (IMHO, an essential fault for any Linux software).</p>
<p>So, I&#8217;m use the &#8220;solid rock&#8221; KDE 3.5.9 as a primary desktop environment for work and sometimes switch to KDE 4 just to get a feeling of  bleeding edge desktop technologies.</p>
<h3>Grumbles</h3>
<ul>
<li>Dolphin &#8211; I already <a href="http://cyberborean.wordpress.com/2007/11/09/gutsy-doubts/">grumbled</a> at it and I still have no idea what are the reasons to have yet another desktop file manager. Konqueror was a default KDE file manager for years and a whole generation of Linux users grew up with an idea of this software inspired by Konq. Dolphin&#8217;s user experience is different in many ways and totally unusual for me (and I think, I&#8217;m not alone). No matter if Dolphin is good or bad, I need Konqueror, thanks!</li>
<li>Samba didn&#8217;t see my home network after installation. And I was unsuccesfull to fix it using configuration GUI in KDE Control Center (though I&#8217;m not a sysadmin guru and might miss some options). Finally I managed to configure the network by manual editing &#8216;smb.conf&#8217; taken file from a backup of previous installation. Maybe it sounds trivial for experienced network administrators, however I remember that I didn&#8217;t edit any configs to get Samba working in Kubuntu 7.04.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2008/05/27/kubuntu-hardy/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to make a shortcut for Memoranda in KDE</title>
		<link>http://blog.cyberborean.org/2007/05/17/how-to-make-a-shortcut-for-memoranda-in-kde</link>
		<comments>http://blog.cyberborean.org/2007/05/17/how-to-make-a-shortcut-for-memoranda-in-kde#comments</comments>
		<pubDate>Thu, 17 May 2007 22:49:20 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Memoranda]]></category>

		<guid isPermaLink="false">http://cyberborean.wordpress.com/2007/05/17/how-to-make-a-shortcut-for-memoranda-in-kde/</guid>
		<description><![CDATA[Because of its crossplatform nature (&#8220;run anywhere&#8221;), Memoranda has no default &#8220;installer&#8221; to be embedded into user&#8217;s desktop environment automatically. But it is pretty easy to integrate it into that environment. Let&#8217;s see how to do that in KDE case. We assuming Memoranda is already installed on your Linux system (that is, ZIP archive is [...]]]></description>
			<content:encoded><![CDATA[<p><em>Because of its crossplatform nature (&#8220;run anywhere&#8221;), Memoranda has no default &#8220;installer&#8221; to be embedded into user&#8217;s desktop environment automatically. But it is pretty easy to integrate it into that environment. Let&#8217;s see how to do that in KDE case.</em></p>
<p><span id="more-168"></span></p>
<p>We assuming Memoranda is already installed on your Linux system (that is, ZIP archive is unpacked) into, say, &#8220;/opt/memoranda&#8221; directory. To be sure that the executables have proper permissions, run:</p>
<pre>chmod 755 /opt/memoranda/memoranda.sh
chmod 755 /opt/memoranda/lib/kde/systray4jd</pre>
<h3>Creating a desktop shortcut</h3>
<ol>
<li>Right-click anywhere on your desktop, select &#8220;Create New-&gt;Link to application&#8230;&#8221; and enter &#8220;Memoranda&#8221;.</li>
<li>Go to &#8220;Application&#8221; tab and enter into the fields<br />
<strong>Command:</strong> /opt/memoranda/memoranda.sh<br />
<strong>Work path:</strong> /opt/memoranda</li>
<li>Go back to &#8220;General&#8221; tab and click the icon. In the icon dialog box select &#8220;Other icons&#8221;, &#8220;Browse&#8221; and point it to &#8216;/opt/memoranda/lib/icons/memoranda48x48.png&#8217;</li>
<li>Press &#8220;Ok&#8221;</li>
</ol>
<p>To put new shortcut into KDE panel also, simply drag-n-drop it from the desktop.</p>
<h3>Creating a menu item</h3>
<ol>
<li>Right click the desktop shortcut created before and select &#8220;Copy&#8221;</li>
<li>Open Konqueror and navigate to &#8220;/home/<em>you</em>/.kde/share/applnk&#8221; directory. Tip: if Konqueror does not display &#8220;.kde&#8221; directory, select &#8220;Show hidden files&#8221; in its &#8220;View&#8221; menu.</li>
<li>Create new subdirectory (say, &#8220;Utilites&#8221;, &#8220;Office&#8221; or &#8220;PIM&#8221;) or go into an existing one. These subdirectories are the sections of your K menu. Right click anywhere in this directory and select &#8220;Paste file&#8221;.</li>
</ol>
<p>Done.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2007/05/17/how-to-make-a-shortcut-for-memoranda-in-kde/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beryl</title>
		<link>http://blog.cyberborean.org/2007/05/10/beryl</link>
		<comments>http://blog.cyberborean.org/2007/05/10/beryl#comments</comments>
		<pubDate>Thu, 10 May 2007 19:39:48 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[beryl]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://cyberborean.wordpress.com/2007/05/10/beryl/</guid>
		<description><![CDATA[I&#8217;m feeling diggy a bit, because my desktop is shaking and spinning now. I&#8217;m trying Beryl &#8211; a 3D desktop and window manager for Linux. A lot of people know about Beryl due to its show-stopper feature &#8211; a 3D-dimensional &#8220;Desktop cube&#8221; where each edge of it is a separate desktop. You can place the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m feeling diggy a bit, because my desktop is shaking and spinning now. I&#8217;m trying <a href="http://www.beryl-project.org/">Beryl</a> &#8211; a 3D desktop and window manager for Linux.</p>
<p><a href="http://cyberborean.org/blog/wp-content/uploads/2007/05/desktopcube.jpg"><img src="http://cyberborean.files.wordpress.com/2007/05/desktopcube.thumbnail.jpg" alt="desktopcube.jpg" /></a></p>
<p><span id="more-162"></span></p>
<p>A lot of people know about Beryl due to its show-stopper  feature &#8211; a 3D-dimensional &#8220;Desktop cube&#8221; where each edge of it is a separate desktop. You can place the windows on separate edges and rotate the cube to change the current desktop. For those who are not on Linux, I should say that multiple desktops is a common practice in Linux desktop environments, and Beryl&#8217;s cube is just a metaphor for to visualise that old concept.</p>
<h3>What&#8217;s good</h3>
<ul>
<li>Switching between windows using their scaled live previews (like in OS X) is great.</li>
</ul>
<p><img src="http://cyberborean.org/blog/wp-content/uploads/2007/05/berylscaling.jpg" /></p>
<ul>
<li>It is an eye-candy. True transparency and realistic shadows effects make the windows looking awesome.</li>
</ul>
<p><img src="http://cyberborean.org/blog/wp-content/uploads/2007/05/berylopacity.jpg" /></p>
<ul>
<li>It is very customizable. You can spend hours to explore all options and adjust Beryl settings by your taste.</li>
<li>A rich set of customizable window decoration themes.</li>
<li>Zooming the screen is amusing and pays for accessibility.</li>
</ul>
<h3>What&#8217;s bad</h3>
<ul>
<li>Beryl didn&#8217;t work out of the box with ATI Radeon graphic card. <a href="http://www.howtoforge.com/ubuntu_feisty_beryl_ati_radeon">This howto</a> helped to fix the problem.</li>
<li>Java applications do not display correctly. See the <a href="http://wiki.beryl-project.org/wiki/Java">solution</a>.</li>
<li>I could not find an option to display taskbar icons only for a current desktop, as I used to do in default KDE mode.</li>
<li>There is a sort of conflict of Beryl and default KDE desktop switcher (&#8220;Pager&#8221;). It is better to turn it off when using Beryl.</li>
</ul>
<p><strong>[Upd:</strong> Unfortunately, the bad things list is growing<strong>]</strong></p>
<ul>
<li>Beryl makes SuperKaramba widgets invisible if SuperKaramba is started first. See <a href="https://bugs.launchpad.net/ubuntu/+source/beryl-core/+bug/104439">a trick with autostarting order</a>.</li>
<li>Beryl prevents the system to awake from Hibernate or Suspend mode. The solution is to <a href="http://forum.beryl-project.org/viewtopic.php?f=39&amp;t=789">kill Beryl before hibernating and to start it automatically on awakening</a>.</li>
</ul>
<p><strong>[/Upd]</strong><br />
Resume: Install it if you care about the desktop aesthetics or want to amaze your Windows friends.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2007/05/10/beryl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using &#8220;win-key&#8221; in KDE</title>
		<link>http://blog.cyberborean.org/2006/10/19/using-win-key-in-kde</link>
		<comments>http://blog.cyberborean.org/2006/10/19/using-win-key-in-kde#comments</comments>
		<pubDate>Thu, 19 Oct 2006 14:37:24 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://cyberborean.wordpress.com/2006/10/19/using-win-key-in-kde/</guid>
		<description><![CDATA[It is nearly impossible to buy a PC keyboard without a key with the flag icon, which is usually referred as a &#8220;Win-key&#8221;. It is, of course, a question if there are any logical reasons to stamp a particular private OS logo on a universal hardware, but I am not going to discuss it right [...]]]></description>
			<content:encoded><![CDATA[<p>It is nearly impossible to buy a PC keyboard without a key with the flag icon, which is usually referred as a &#8220;Win-key&#8221;.   It is, of course, a question if there are any logical reasons to stamp a particular private OS logo on a universal hardware, but I am not going to discuss it right now. Instead of that, let&#8217;s see how to use this additional key for improving Linux user productivity.<br />
<span id="more-142"></span></p>
<p>I have no idea what is it doing in Windows, but the greatest advantage of this key in KDE is that it does nothing by default. Also, this is a modifier key (like Shift, Ctrl or Alt), so it can be used for setting a lot of custom keyboard shortcuts. While the most of &#8220;Ctrl+&#8221; and &#8220;Alt+&#8221; combinations are usually reserved by applications, &#8220;Win+&#8221; is vacant and ideal for defining various global system shortcuts.</p>
<p>There is my experience of using Win-key combinations:</p>
<h3>&#8220;Win&#8221; is for the windows, I think</h3>
<p>The most of shortcuts are related to the windows and desktop management actions:</p>
<ul>
<li><strong>Win+Return</strong> maximizes a window and <strong>Ctrl+Win+Return</strong> makes it full-screen.</li>
<li><strong>Win+Backspace</strong> minimizes a window.</li>
<li><strong>Win+Esc</strong> closes a window.</li>
<li><strong>Win+Space</strong> shows desktop (minimizes all windows).</li>
<li><strong>Win+<em>number</em></strong> (<strong>Win+1</strong>, <strong>Win+2</strong>&#8230;) switches to the given desktop. Also, <strong>Win+Up/Down</strong> switches to the previous or next desktop (I use vertical desktop pager).</li>
<li><strong>Ctrl+Win+<em>number</em></strong> and <strong>Ctrl+Win+Up/Down</strong> moves active window to the specified desktop.</li>
<li><strong>Win+Menu</strong> shows a list of all windows on all desktops.</li>
</ul>
<h3>AmaroK</h3>
<p>Win-key in combination with additional numeric keypad (aka &#8220;grey keys&#8221;) is used for controlling AmaroK audioplayer.</p>
<ul>
<li><strong>Win+GrayInsert</strong> is for play/pause.</li>
<li><strong>Win+GrayPlus</strong> and <strong>Win+GrayMinus</strong> manage sound volume and <strong>Win+GrayMultiply</strong> mutes volume.</li>
<li><strong>Win+GrayLeft/Win+GrayRight</strong> switches the tracks</li>
</ul>
<h3>Launching the applications</h3>
<p>Combinations of the Win-key with alphabetic keys are used for quick launching the most needed applications and utilities. There are lot of them and it makes no sense to enumerate them here &#8211; every user has her own list of preferred software.</p>
<p>Win-key is a good thing, whatever a logo is there. Finally, everyone might put a penguin or K-gear sticker on it :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2006/10/19/using-win-key-in-kde/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting new mail onto the desktop</title>
		<link>http://blog.cyberborean.org/2006/09/12/getting-new-mail-onto-the-desktop</link>
		<comments>http://blog.cyberborean.org/2006/09/12/getting-new-mail-onto-the-desktop#comments</comments>
		<pubDate>Tue, 12 Sep 2006 15:24:56 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[PIM]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://cyberborean.wordpress.com/2006/09/12/getting-new-mail-onto-the-desktop/</guid>
		<description><![CDATA[I had nice last weekend gathering new harvest of apples, drinking fresh apple juice and playing with SuperKaramba widgets &#8211; a good opportunity to take a sort of &#8220;recreational programming&#8221;. Perhaps all modern KDE users know those nice resource eaters eye-candies which are living right on the desktop surface and displaying the clocks, calendars, weather [...]]]></description>
			<content:encoded><![CDATA[<p>I had nice last weekend gathering new harvest of apples, drinking fresh apple juice and playing with <a href="http://netdragon.sourceforge.net">SuperKaramba</a> widgets &#8211; a good opportunity to take a sort of &#8220;recreational programming&#8221;. Perhaps all modern KDE users know those nice <s>resource eaters</s> eye-candies which are living right on the desktop surface and displaying the clocks, calendars, weather forecasts, system monitors and so on.</p>
<p>Instead of developing some Yet Another Big Animated Clock, I decided to write something practical. What I&#8217;d like to have is a widget which would ask my e-mail client (<a href="http://kmail.kde.org">KMail</a>) for the headers of the latest unread messages to show them on the desktop.<br />
<span id="more-133"></span></p>
<p><img src="http://cyberborean.org/blog/wp-content/uploads/2006/09/skkmail.jpg" alt="skkmail.jpg" /></p>
<p>Two buttons in the top bar are for checking new mail from a server and for opening new message window. Clicking on the top bar somewhere else will open main KMail window.</p>
<p>SuperKaramba comes with a <a href="http://netdragon.sourceforge.net/api.html">Python API</a>, so everyone who is familiar with Pyton basics can write her own widget (aka &#8220;theme&#8221;) as a Python script. In my case, I wrote two scripts &#8211; one is for widget output and another as a simple KMail folder API wrapped around DCOP calls.</p>
<h3>Patching KMail</h3>
<p>There was a major problem &#8211; KMail DCOP interface had no a call to get unread message headers; only getting a number of them is possible. So I have had to dig into the KMail sourcecode (my current version is 1.9.4) for to add new function to FolderIFace interface (<code>folderIface.cpp</code>).</p>
<h4><code>kmail.diff:</code></h4>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">diff kmail/folderIface.cpp kmail_patched/folderIface.cpp
<span style="color: #440088;">147a148,162</span>
<span style="color: #00b000;">&gt; QStringList</span>
<span style="color: #00b000;">&gt; FolderIface::unreadMessageHeaders<span style="">&#40;</span><span style="">&#41;</span></span>
<span style="color: #00b000;">&gt; <span style="">&#123;</span></span>
<span style="color: #00b000;">&gt;      QStringList msgs;</span>
<span style="color: #00b000;">&gt;      mFolder-&gt;open<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">&gt;      for<span style="">&#40;</span> int i = <span style="">0</span>; i &amp;amp;lt; mFolder-&gt;count<span style="">&#40;</span><span style="">&#41;</span>; i++<span style="">&#41;</span> <span style="">&#123;</span></span>
<span style="color: #00b000;">&gt;          KMMsgBase *msg = mFolder-&gt;getMsgBase<span style="">&#40;</span>i<span style="">&#41;</span>;</span>
<span style="color: #00b000;">&gt; 	     if <span style="">&#40;</span>msg-&gt;isNew<span style="">&#40;</span><span style="">&#41;</span> || msg-&gt;isUnread<span style="">&#40;</span><span style="">&#41;</span><span style="">&#41;</span> <span style="">&#123;</span></span>
<span style="color: #00b000;">&gt; 	       msgs.append<span style="">&#40;</span>msg-&gt;fromStrip<span style="">&#40;</span><span style="">&#41;</span> + &quot;\\t&quot; + msg-&gt;subject<span style="">&#40;</span><span style="">&#41;</span> + &quot;\\t&quot; + msg-&gt;dateStr<span style="">&#40;</span><span style="">&#41;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">&gt;          <span style="">&#125;</span></span>
<span style="color: #00b000;">&gt;      <span style="">&#125;</span></span>
<span style="color: #00b000;">&gt;      mFolder-&gt;close<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">&gt;      return msgs;</span>
<span style="color: #00b000;">&gt; <span style="">&#125;</span></span>
<span style="color: #00b000;">&gt;</span>
diff kmail/folderIface.h kmail_patched/folderIface.h
<span style="color: #440088;">61c61,62</span>
<span style="color: #991111;">&lt;</span>
<span style="color: #888822;">---
<span style="color: #00b000;">&gt;     virtual QStringList unreadMessageHeaders<span style="">&#40;</span><span style="">&#41;</span>;</span></span>
<span style="color: #00b000;">&gt;</span></pre></div></div>

<p>After adding new function header to <code>folderIface.h</code> and rebuilding KMail, new DCOP call &#8220;<code>kmail FolderIface unreadMessageHeaders</code>&#8221; became available to get the list of message headers in format &#8220;From/Subject/Date&#8221; divided by tab characters (<code>\t</code>).</p>
<h3>Sourcecode</h3>
<h4><code>skkmail.py</code>:</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> karamba
<span style="color: #ff7700;font-weight:bold;">import</span> kmail
&nbsp;
text = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
images = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
clickAreas = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Define widget area width here (height is adjusted automatically)</span>
s_width = <span style="color: #ff4500;">350</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># If an actual height is above this value, a widget area will be clipped</span>
maxHeight = <span style="color: #ff4500;">600</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Margins inside a widget area</span>
s_x = <span style="color: #ff4500;">10</span>
s_y = <span style="color: #ff4500;">10</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> _update<span style="color: black;">&#40;</span>widget<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">global</span> text, images, clickAreas, s_width, s_x, s_y
    x_gap = <span style="color: #ff4500;">10</span>
    y_gap = <span style="color: #ff4500;">4</span>
&nbsp;
    s_height = <span style="color: #ff4500;">14</span>
    s_col1 = <span style="color: black;">&#40;</span>s_width-x_gap<span style="color: black;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #ff4500;">0.66</span>
    s_col2 = s_width
    s_col3 = <span style="color: black;">&#40;</span>s_width-x_gap-<span style="color: #ff4500;">16</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #ff4500;">0.33</span>
&nbsp;
    folderFont = <span style="color: #483d8b;">&quot;Franklin Gothic Medium&quot;</span>
    folderFontSize = <span style="color: #ff4500;">14</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">for</span> t <span style="color: #ff7700;font-weight:bold;">in</span> text:
        <span style="color: #ff7700;font-weight:bold;">try</span>:
          karamba.<span style="color: black;">deleteText</span><span style="color: black;">&#40;</span>widget, t<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span>:
          <span style="color: #ff7700;font-weight:bold;">pass</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> images:
        <span style="color: #ff7700;font-weight:bold;">try</span>:
          karamba.<span style="color: black;">deleteImage</span><span style="color: black;">&#40;</span>widget, i<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span>:
          <span style="color: #ff7700;font-weight:bold;">pass</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> c <span style="color: #ff7700;font-weight:bold;">in</span> clickAreas:
        <span style="color: #ff7700;font-weight:bold;">try</span>:
          karamba.<span style="color: black;">removeClickArea</span><span style="color: black;">&#40;</span>widget, c<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span>:
          <span style="color: #ff7700;font-weight:bold;">pass</span>
    text = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    images = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    clickAreas = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    folders = kmail.<span style="color: black;">getFolders</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    y = s_y + <span style="color: #ff4500;">25</span><span style="color: #66cc66;">;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> f <span style="color: #ff7700;font-weight:bold;">in</span> folders:
        msgs = f.<span style="color: black;">unreadMessages</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>msgs<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
            y0 = y
            t = karamba.<span style="color: black;">createText</span><span style="color: black;">&#40;</span>widget, s_x+<span style="color: #ff4500;">15</span>, y, s_width, s_height,
                f.<span style="color: black;">name</span>+<span style="color: #483d8b;">&quot; (&quot;</span>+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>msgs<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>+<span style="color: #483d8b;">&quot;)&quot;</span><span style="color: black;">&#41;</span>
            karamba.<span style="color: black;">changeTextFont</span><span style="color: black;">&#40;</span>widget, t, folderFont<span style="color: black;">&#41;</span>
            karamba.<span style="color: black;">changeTextSize</span><span style="color: black;">&#40;</span>widget, t, folderFontSize<span style="color: black;">&#41;</span>
            text.<span style="color: black;">append</span><span style="color: black;">&#40;</span>t<span style="color: black;">&#41;</span>
            images.<span style="color: black;">append</span><span style="color: black;">&#40;</span>karamba.<span style="color: black;">createImage</span><span style="color: black;">&#40;</span>widget, s_x-<span style="color: #ff4500;">10</span>, y, <span style="color: #483d8b;">&quot;icons/folder.png&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
            y = y + s_height + y_gap<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span> +<span style="color: #ff4500;">10</span>
            <span style="color: #ff7700;font-weight:bold;">for</span> m <span style="color: #ff7700;font-weight:bold;">in</span> msgs:
                t = karamba.<span style="color: black;">createText</span><span style="color: black;">&#40;</span>widget, s_x+<span style="color: #ff4500;">20</span>, y, s_col1, s_height, m<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
                text.<span style="color: black;">append</span><span style="color: black;">&#40;</span>t<span style="color: black;">&#41;</span>
                t = karamba.<span style="color: black;">createText</span><span style="color: black;">&#40;</span>widget, s_x, y+s_height, s_col2, s_height, m<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
                text.<span style="color: black;">append</span><span style="color: black;">&#40;</span>t<span style="color: black;">&#41;</span>
                t = karamba.<span style="color: black;">createText</span><span style="color: black;">&#40;</span>widget, s_x+<span style="color: #ff4500;">20</span>+s_col1+x_gap, y, s_col3, s_height, m<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
                karamba.<span style="color: black;">setTextAlign</span><span style="color: black;">&#40;</span>widget, t, <span style="color: #483d8b;">&quot;RIGHT&quot;</span><span style="color: black;">&#41;</span>
                text.<span style="color: black;">append</span><span style="color: black;">&#40;</span>t<span style="color: black;">&#41;</span>
                images.<span style="color: black;">append</span><span style="color: black;">&#40;</span>karamba.<span style="color: black;">createImage</span><span style="color: black;">&#40;</span>widget, s_x, y, <span style="color: #483d8b;">&quot;icons/mail.png&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
                y = y + s_height<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span> + y_gap<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>
            clickAreas.<span style="color: black;">append</span><span style="color: black;">&#40;</span>karamba.<span style="color: black;">createClickArea</span><span style="color: black;">&#40;</span>widget, s_x-<span style="color: #ff4500;">10</span>, y0, s_width, y-y0,
                <span style="color: #483d8b;">&quot;dcop kmail KMailIface selectFolder &quot;</span>+f.<span style="color: black;">path</span>+<span style="color: #483d8b;">&quot; &amp;&amp; kmail&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
            y = y + y_gap<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>y <span style="color: #66cc66;">&lt;</span> maxHeight - <span style="color: #ff4500;">20</span><span style="color: black;">&#41;</span>:
        karamba.<span style="color: black;">resizeWidget</span><span style="color: black;">&#40;</span>widget, s_width+s_x<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>, y+<span style="color: #ff4500;">20</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#this is called when you widget is initialized</span>
<span style="color: #ff7700;font-weight:bold;">def</span> initWidget<span style="color: black;">&#40;</span>widget<span style="color: black;">&#41;</span>:
    bgImage = karamba.<span style="color: black;">createBackgroundImage</span><span style="color: black;">&#40;</span>widget, <span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">5</span>, <span style="color: #483d8b;">&quot;icons/bg.png&quot;</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">resizeImage</span><span style="color: black;">&#40;</span>widget, bgImage, s_width+s_x<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">20</span><span style="color: black;">&#41;</span>
    logo = karamba.<span style="color: black;">createImage</span><span style="color: black;">&#40;</span>widget, <span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">0</span>, <span style="color: #483d8b;">&quot;icons/kmail.png&quot;</span><span style="color: black;">&#41;</span>
    t = karamba.<span style="color: black;">createText</span><span style="color: black;">&#40;</span>widget, <span style="color: #ff4500;">35</span>, <span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">100</span>, <span style="color: #ff4500;">20</span>, <span style="color: #483d8b;">&quot;new mail&quot;</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">changeTextFont</span><span style="color: black;">&#40;</span>widget, t, <span style="color: #483d8b;">&quot;Franklin Gothic Medium&quot;</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">changeTextSize</span><span style="color: black;">&#40;</span>widget, t, <span style="color: #ff4500;">16</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">createClickArea</span><span style="color: black;">&#40;</span>widget, <span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">100</span>, <span style="color: #ff4500;">30</span>, <span style="color: #483d8b;">&quot;kmail&quot;</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">createImage</span><span style="color: black;">&#40;</span>widget, s_width+s_x<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>-<span style="color: #ff4500;">18</span>, <span style="color: #ff4500;">7</span>, <span style="color: #483d8b;">&quot;icons/mail_get.png&quot;</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">createClickArea</span><span style="color: black;">&#40;</span>widget, s_width+s_x<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>-<span style="color: #ff4500;">18</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">16</span>, <span style="color: #ff4500;">16</span>, <span style="color: #483d8b;">&quot;dcop kmail KMailIface checkMail&quot;</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">createImage</span><span style="color: black;">&#40;</span>widget, s_width+s_x<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>-<span style="color: #ff4500;">40</span>, <span style="color: #ff4500;">7</span>, <span style="color: #483d8b;">&quot;icons/mail_new.png&quot;</span><span style="color: black;">&#41;</span>
    karamba.<span style="color: black;">createClickArea</span><span style="color: black;">&#40;</span>widget, s_width+s_x<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>-<span style="color: #ff4500;">40</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">16</span>, <span style="color: #ff4500;">16</span>,
        <span style="color: #483d8b;">&quot;dcop kmail KMailIface openComposer '' '' '' '' '' ''&quot;</span><span style="color: black;">&#41;</span>
    _update<span style="color: black;">&#40;</span>widget<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#this is called everytime your widget is updated</span>
<span style="color: #808080; font-style: italic;">#the update inverval is specified in the .theme file</span>
<span style="color: #ff7700;font-weight:bold;">def</span> widgetUpdated<span style="color: black;">&#40;</span>widget<span style="color: black;">&#41;</span>:
    _update<span style="color: black;">&#40;</span>widget<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#This gets called everytime our widget is clicked.</span>
<span style="color: #808080; font-style: italic;"># Middle button click forces to check new mail</span>
<span style="color: #ff7700;font-weight:bold;">def</span> widgetClicked<span style="color: black;">&#40;</span>widget, x, y, button<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>button == <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>:
        kmail.<span style="color: black;">dcopCall</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;kmail KMailIface checkMail&quot;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h4><code>kmail.py:</code></h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">subprocess</span>, <span style="color: #dc143c;">string</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> dcopCall<span style="color: black;">&#40;</span>call<span style="color: black;">&#41;</span>:
  <span style="color: #dc143c;">cmd</span> = <span style="color: #483d8b;">&quot;dcop &quot;</span>+call
  pipe = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">Popen</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">cmd</span>, shell=<span style="color: #008000;">True</span>, bufsize=<span style="color: #ff4500;">1024</span>, stdout=<span style="color: #dc143c;">subprocess</span>.<span style="color: black;">PIPE</span><span style="color: black;">&#41;</span>.<span style="color: black;">stdout</span>
  res = pipe.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
  pipe.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
  <span style="color: #ff7700;font-weight:bold;">return</span> res
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Folder:
  path = <span style="color: #483d8b;">&quot;&quot;</span>
  name = <span style="color: #483d8b;">&quot;&quot;</span>
  unreadCount = <span style="color: #ff4500;">0</span>
  unreadMessages = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
&nbsp;
  <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, path<span style="color: black;">&#41;</span>:
    dcopCall<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;kmail KMailIface getFolder &quot;</span>+path<span style="color: black;">&#41;</span>
    <span style="color: #008000;">self</span>.<span style="color: black;">path</span> = path
    <span style="color: #008000;">self</span>.<span style="color: black;">unreadMessages</span> = <span style="color: #008000;">self</span>.<span style="color: black;">getUnreadMessages</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
  <span style="color: #ff7700;font-weight:bold;">def</span> getUnreadMessages<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
    r = dcopCall<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;kmail FolderIface unreadMessageHeaders&quot;</span><span style="color: black;">&#41;</span>
    ss = <span style="color: #dc143c;">string</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span>r, <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>n&quot;</span><span style="color: black;">&#41;</span>
    msg = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> s <span style="color: #ff7700;font-weight:bold;">in</span> ss:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>s<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
            msg.<span style="color: black;">append</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">string</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span>s, <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>t&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    unreadCount = <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>msg<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>unreadCount <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">name</span> = <span style="color: #dc143c;">string</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span>dcopCall<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;kmail FolderIface displayName&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    msg.<span style="color: black;">reverse</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> msg
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> getFolders<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    r = dcopCall<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;kmail KMailIface folderList&quot;</span><span style="color: black;">&#41;</span>
    folders = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> f <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">string</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span>r, <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>n&quot;</span><span style="color: black;">&#41;</span>:
        folders.<span style="color: black;">append</span><span style="color: black;">&#40;</span>Folder<span style="color: black;">&#40;</span>f<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> folders</pre></td></tr></table></div>

<h4><code>skkmail.theme:</code></h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># you can change initial widget position, area size and updatin interval (default = 1min)</span>
karamba x=<span style="color: #ff4500;">100</span> y=<span style="color: #ff4500;">100</span> w=<span style="color: #ff4500;">400</span> h=<span style="color: #ff4500;">200</span> interval=<span style="color: #ff4500;">60000</span>
defaultfont font=<span style="color: #483d8b;">&quot;Franklin Gothic Book&quot;</span> fontsize=<span style="color: #ff4500;">12</span> color=<span style="color: #ff4500;">230</span>,<span style="color: #ff4500;">230</span>,<span style="color: #ff4500;">230</span></pre></td></tr></table></div>

<p>All code above is <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>&#8216;ed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2006/09/12/getting-new-mail-onto-the-desktop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Tools:] BasKet &#8211; A persistent clipboard</title>
		<link>http://blog.cyberborean.org/2006/09/06/tools-basket-a-persistent-clipboard</link>
		<comments>http://blog.cyberborean.org/2006/09/06/tools-basket-a-persistent-clipboard#comments</comments>
		<pubDate>Wed, 06 Sep 2006 07:12:38 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://cyberborean.wordpress.com/2006/09/06/tools-basket-a-persistent-clipboard/</guid>
		<description><![CDATA[BasKet is one of those small productivity tools which does a lot for improving our life&#8217;s quality. Everyday we deal with tons of small data items &#8211; text quotes and notes, web links, passwords, mail addresses, phone numbers etc. Generally, these units of a user microcosm are too small and too numerous to be stored [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://basket.kde.org/icos/64-basket.png" alt="" align="left" hspace="5"> <a href="http://basket.kde.org/">BasKet</a> is one of those small productivity tools which does a lot for improving our life&#8217;s quality. Everyday we deal with tons of small data items &#8211; text quotes and notes, web links, passwords, mail addresses, phone numbers etc. Generally, these units of a user microcosm are too small and too numerous to be stored as files and should be easily findable and quickly  accessible. BasKet is a KDE software which is intended to manage this kind of data.</p>
<p><span id="more-131"></span></p>
<p><img src="http://cyberborean.org/blog/wp-content/uploads/2006/09/basket.jpg" alt="basket.jpg" /></p>
<p>BasKet acts as a persistent clipboard manager for various data types (plain text, rich text, images, links, files and application shortcuts). You can create few containers (baskets) inside it to organize your data items as you wish. You can copy (or drag-n-drop) the items into the baskets from applications and paste them back from the baskets. In my case, I set the global keyboard shortcuts &#8220;Win+C&#8221; for to copy a  selected item to a current basket and &#8220;Win+V&#8221; to paste the latest copied item (from the top of a current basket&#8217;s stack) into the current selection (like conventional Crtl+C/Ctrl+V for default system clipboard).</p>
<p>Moreover, BasKet can track all your operations with system clipboard and store the whole clipboard history in special &#8220;Clipboard manager&#8221; basket, if you would create it. Though, I found this feature not very useful &#8211; I don&#8217;t want to store all data passing through my clipboard for ages and bother to clear the overblowed stack. So, I used to press Ctrl+C/Ctrl+V when I want to use the default system clipboard and Win+C/Win+V for important things which I&#8217;d like to save for the future.</p>
<h3>What is good</h3>
<ul>
<li>Convenient storage for small important data items &#8211; quick as the system clipboard but persistent and structured.</li>
<li>Is not limited by text data types. The specific types of items are opened with appropriate programs (for instance, double-clicking the email address opens new message window).</li>
<li>Inline editing the basket items</li>
<li>Along with copying existing data from applications, it is possible to create new items and fill them in place &#8211; this feature is very useful for taking the text notes.</li>
<li>Quick search the items</li>
<li>Special basket type for mirroring the files in selected folders.</li>
<li>Global shortcuts support</li>
<li>Transparent and inobtrusive &#8211; no saving/loading operations, lives in the system tray, accessible by one click and hides automatically when inactive.</li>
</ul>
<h3>What is bad</h3>
<ul>
<li>There is a bug with Firefox &#8211; when a piece of text is copied from a web-page to the basket, a link is inserted instead of the text. </li>
<li>Every time when items are deleted from the basket, the annoying &#8220;are-u-sure?&#8221; dialog is appeared. At least, it should contain a checkbox to not asking me anymore, I believe.</li>
<li>Occasional crashes by unknown reasons.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2006/09/06/tools-basket-a-persistent-clipboard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Tools:] digiKam &#8211; Manage your photos</title>
		<link>http://blog.cyberborean.org/2006/04/27/tools-digikam-manage-your-photos</link>
		<comments>http://blog.cyberborean.org/2006/04/27/tools-digikam-manage-your-photos#comments</comments>
		<pubDate>Thu, 27 Apr 2006 22:02:54 +0000</pubDate>
		<dc:creator>Alex Alishevskikh</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[tagging]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">https://cyberborean.wordpress.com/2006/04/27/tools-digikam-manage-your-photos/</guid>
		<description><![CDATA[digiKam is a digital photo management application for KDE. It provides a full image processing cycle &#8211; from acquiring and editing to collection organizing, browsing and exporting. For years I used no special software for digital photography and photoalbums management. Just command-line gphoto2, GIMP and usual filemanager in preview mode were enough, or at least [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://cyberborean.files.wordpress.com/2006/04/hi64-app-digikam.gif" align="left" alt="digiKam" /><em><a href="http://www.digikam.org">digiKam</a> is a digital photo management application for KDE. It provides a full image processing cycle &#8211; from acquiring and editing to collection organizing, browsing and exporting.</em></p>
<p><span id="more-95"></span></p>
<p>For years I used no special software for digital photography and photoalbums management. Just command-line gphoto2, GIMP and usual filemanager in preview mode were enough, or at least I thought so. Few months ago I decided to scan my old photo archives to have them in digital form and was drowned quickly in the thousands of shots many of which needed for some correction. And new shots from my digital camera are going on. So, once I felt I&#8217;ve lost control on my photo collection.</p>
<p>I looked for a software which could help me and found digiKam &#8211; a great photo organizer, editor and more.</p>
<h3>Acquiring photos</h3>
<p>digiKam works directly with a digital camera. In fact, it depends on <a href="http://gphoto.org">gPhoto</a> framework, so you need to have gphoto2 installed and working (if you are a photographer on Linux, you probably already have it). digiKam provides an easy to use interface to the camera that enables you to browse, preview, download and delete your images.</p>
<div align="center"><img src="http://cyberborean.files.wordpress.com/2006/04/digikam0.jpg" alt="digikam0.jpg" /><br />
<em>Camera interface</em></div>
<p>For those who used to download photos with gphoto2 from console, this new experience is really impressive.</p>
<p>digiKam also can acquire images directly from a scanner (through SANE interface) and grab the screenshots. Of course, you can also import  your existing photo directories into the digiKam database.</p>
<h3>Organizing</h3>
<p>An essential part of digiKam what makes it a really great app is its photo organizing functionality. It makes use of a database to store tags, comments and other metadata related to images and albums. So, you can easily find, browse and sort images in your collection.</p>
<p><img src="http://cyberborean.files.wordpress.com/2006/04/digikam1.jpg" alt="digiKam" /></p>
<p>The photo browser supports faceted navigation &#8211; you can explore your collection by albums (just the folders), tags or dates. It is possible to assign a number of tags for each photo which makes its finding extremely easy (if you are a Flickr user, you know what help the tags make).</p>
<div align="center"><img src="http://cyberborean.files.wordpress.com/2006/04/digikam2.jpg" alt="Tags" />&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://cyberborean.files.wordpress.com/2006/04/digikam3.jpg" alt="Dates" /><br />
<em>Faceted navigation by tags and dates</em></div>
<p><b>[added]</b><br />
The key difference from the Flickr tags (not too obvious) is that the tags can be organized hierarchically &#8211; they are rather taxonomical categories than usual labels. So you can set, say the &#8220;Roses&#8221; tag as a child of &#8220;Flowers&#8221;, and &#8220;Flowers&#8221; in turn, as a child of &#8220;Nature&#8221;. Then, all your &#8220;Roses&#8221; photos will automatically be assigned to &#8220;Flowers&#8221; and &#8220;Nature&#8221; which makes a great help in further navigation</p>
<p>The advanced search functionality enables to select the shots which match the specific criteria (it looks like the queries to database). You can save your queries to quickly repeat them in future.</p>
<p><img src="http://cyberborean.files.wordpress.com/2006/04/digikam4.jpg" alt="Advanced search" /></p>
<p>There is a bit of fantastics &#8211; searching images by similarity. It makes use of an intellectual algorithm of &#8220;fingerprints&#8221; to compare images and find their &#8220;optical similarities&#8221;. You can adjust a treshold level to find more or less similar images &#8211; from the exact duplicates to the &#8220;slightly resembling&#8221; shots (for instance, from the same session).</p>
<div align="center"><img src="http://cyberborean.org/blog/wp-content/uploads/2006/04/digikam6-1.jpg" alt="digikam6-1.jpg" /><br />
<em>It supposes these shots are similar. I think so too :-)</em></div>
<h3>Editing: Goodbye, GIMP?</h3>
<p>digiKam integrates an advanced image viewer/editor (ShowFoto) which also can be used as a standalone application. Along with   basic image processing functionality (cropping, resizing, rotating, color correction) it supports a plugins architecture for to add new tools and image effects. <a href="http://extragear.kde.org/apps/digikamimageplugins/">digiKam plugins</a> are developed by another project and should be downloaded and installed separately. Current distribution includes a variety (about 30) of plugins including correction filters, funny artistic and distortion effects, adding borders and text to images and so on.</p>
<p>The most interesting and useful tools for photographers are, of course, those for improving image quality. digiKam provides a rich set of those tools (both embedded and pluggable) &#8211; from basic brightness/contrast/color adjustments to sophisticated photo restoration utilities. They are collected in a &#8220;Fix&#8221; menu of the image editor:</p>
<p><img src="http://cyberborean.files.wordpress.com/2006/04/digikam5.jpg" alt="Fix menu" /></p>
<p>I think, even a professional photographer will be happy with that toolkit. All filters have the live previews and work surprisingly quickly. In general, digiKam seems to work much more faster in comparison with monsters like GIMP or Photoshop.</p>
<p>There is a magic feature which really impressed me &#8211; an &#8220;auto-correction&#8221;. It is unbelievable, but by a single mouse click you can turn your ugly dark or low-contrast photo into an eye-candy. Just take a look:</p>
<div align="center"><img src="http://cyberborean.files.wordpress.com/2006/04/digikam6.jpg" alt="digikam6.jpg" /><br />
<em>Auto-correction: before and after</em></div>
<p>digiKam makes use of the <a href="http://extragear.kde.org/apps/kipi">KIPI plugin framework</a> which aimed to be a common shared plugin infrastructure for KDE graphic apps. The current set of KIPI plugins enables very useful features of batch image processing. You can do resizing, converting, adjustment, applying filters and effects on the selected photos or even on the whole directories just by few mouse clicks.</p>
<h3>Sharing and exporting</h3>
<p>Yes, digiKam does flickring! Uploading photos to there is a snap &#8211; just choose images you want to upload and (optionally) enter the Flickr tags and privacy options. At very first time it will open your default browser for logging in to Flickr. A very useful feature is that it can resize the uploading shots on the fly, so you don&#8217;t need to prepare the special low-res variants of your original shots. For instance, I usually take the hi-res shots of 1600&#215;1200 or even more, and reduce them for Flickr to 640&#215;480, so automatical scaling makes a great help for me.</p>
<p>digiKam also can build HTML photo galleries, burn CD/DVD with your photo collections (via external b3d software) and of course, print your photos.</p>
<p>A really cool and handy app which seems to have no competitors in Linux world for now. Recommended for all Linux photographers &#8211; profies and amateurs like me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyberborean.org/2006/04/27/tools-digikam-manage-your-photos/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

