<?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>Do Know Evil - A Blog by Tyler Mulligan &#187; Desktop Mods</title>
	<atom:link href="http://www.doknowevil.net/category/computers/software/desktop-mods/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doknowevil.net</link>
	<description>Tips and Tricks About Computers, Web Development, Linux, the Internet and the Like</description>
	<lastBuildDate>Thu, 29 Jul 2010 03:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Compiz 0.9.0 Released &#8211; Completely Rewritten in C++</title>
		<link>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/</link>
		<comments>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 02:44:16 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Application Management]]></category>
		<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=738</guid>
		<description><![CDATA[I was doing some in depth research / code hacking regarding the support of multi-headed output (dual monitors) on Linux. I won&#8217;t get into details but my video is being output to my monitors as &#8220;one screen&#8221; with a virtual distinctions handled by the window manager. Because of this, figuring out which of the monitors]]></description>
			<content:encoded><![CDATA[<p>I was doing some in depth research / code hacking regarding the support of multi-headed output (dual monitors) on Linux.  I won&#8217;t get into <a href="http://forum.compiz.org/viewtopic.php?f=89&#038;t=13362" title="managing windows across dual monitors in compiz?">details</a> but my video is being output to my monitors as &#8220;one screen&#8221; with a virtual distinctions handled by the window manager.  Because of this, figuring out which of the monitors you are on isn&#8217;t as straight forward as you might think.  Originally I was looking for a way to access the c functions in compiz through python but that point is now moot (likely for the better).</p>
<p>The <a href="http://lists.freedesktop.org/archives/compiz/2010-July/003429.html">first unstable release of the Compiz 0.9 series</a>, completely rewritten in C++.  As said, this &#8220;brings a whole new developer API, splits rendering into plugins, switches the buildsystem from automake to cmake and brings minor functionality improvements. This release represents the first developer and tester preview of what will eventually make the 0.10.x stable series. Please note that as such, it is not yet ready for general use as there are a number of known  ssues, regressions and incomplete functionality.&#8221;</p>
<p>Here is a <b>SLIGHTLY DATED</b> graph I got <a href="http://santiance.com/2009/10/compiz-code-comparison/">from Santiance.com</a>.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2010/07/compiz_comparison_chart.png" rel="shadowbox[post-738];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2010/07/compiz_comparison_chart.png" alt="" title="compiz_comparison_chart" width="776" height="449" class="alignnone size-full wp-image-739" /></a></p>
<p>This is a really interesting turning point for the project and I&#8217;m glad I came across this while doing my research for multi-head handling in compiz. Knowing where the future lies could drastically change where I put my efforts in developing to support them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>scp-notifications for GNOME and Ubuntu &#8211; Expanding on My Original Python Script</title>
		<link>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/</link>
		<comments>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 00:11:15 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[The Internet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[libnotify]]></category>
		<category><![CDATA[notification-daemon]]></category>
		<category><![CDATA[pynotify]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=698</guid>
		<description><![CDATA[I&#8217;ve only been coding Python for ~12 hours total, so don&#8217;t expect this to be perfect. Knowing what I know about creating/testing other software and doing my best to scour through very light pynotify documentation, I&#8217;ve begun to build out this script to be more useful / portable / configurable. As the Version 0.6 indicates,]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve only been coding Python for ~12 hours total, so don&#8217;t expect this to be perfect.  Knowing what I know about creating/testing other software and doing my best to scour through very light pynotify documentation, I&#8217;ve begun to build out this script to be more useful / portable / configurable.  As the Version 0.6 indicates, I&#8217;m not quite at my goal yet and there is still more to learn to bring it up to that point.</p>
<p>I&#8217;m releasing this early on my blog just in case I caught any people yesterday who&#8217;ve been experimenting with my research / code so far.  I&#8217;ll share it on github when I evolve it just a bit more.</p>
<p><a href="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv">Video of it in Action</a></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="co1">#!/usr/bin/env python</span>
<span class="co1">#</span>
<span class="co1"># Title: scp-notifications</span>
<span class="co1"># Author: Tyler Mulligan (tyler@detrition.net)</span>
<span class="co1"># Date: 06/26/2010</span>
<span class="co1"># Version: 0.6</span>
<span class="co1"># Description:</span>
<span class="co1"># Used in combination with an event, such as an action or cronjob, this script</span>
<span class="co1"># will scp the latest file from a folder to your server.</span>
<span class="co1">#</span>
<span class="co1"># Optionally, it can copy the url to your clipboard and/or show a popup with a</span>
<span class="co1"># link to the file after succesfully uploading</span>
<span class="co1">#</span>
<span class="co1"># Orginally developed to be piped to from compiz screenshot tool</span>
<span class="co1"># http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv</span>
<span class="co1">#</span>
<span class="co1"># The MIT License</span>
<span class="co1">#</span>
<span class="co1"># Copyright (c) 2010 Tyler Mulligan</span>
<span class="co1">#</span>
<span class="co1"># Permission is hereby granted, free of charge, to any person obtaining a copy</span>
<span class="co1"># of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
<span class="co1"># in the Software without restriction, including without limitation the rights</span>
<span class="co1"># to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
<span class="co1"># copies of the Software, and to permit persons to whom the Software is</span>
<span class="co1"># furnished to do so, subject to the following conditions:</span>
<span class="co1">#</span>
<span class="co1"># The above copyright notice and this permission notice shall be included in</span>
<span class="co1"># all copies or substantial portions of the Software.</span>
<span class="co1">#</span>
<span class="co1"># THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<span class="co1"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<span class="co1"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<span class="co1"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<span class="co1"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<span class="co1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
<span class="co1"># THE SOFTWARE</span>
<span class="co1">#</span>
&nbsp;
<span class="kw1">import</span> pygtk
pygtk.<span class="me1">require</span><span class="br0">&#40;</span><span class="st0">'2.0'</span><span class="br0">&#41;</span>
<span class="kw1">import</span> pynotify
<span class="kw1">import</span> gtk
<span class="kw1">import</span> <span class="kw3">sys</span>
<span class="kw1">import</span> <span class="kw3">os</span>
<span class="kw1">import</span> <span class="kw3">subprocess</span>
&nbsp;
<span class="co1"># Set Variables</span>
<span class="co1">#####################################</span>
<span class="kw3">user</span> = <span class="st0">&quot;user&quot;</span>
host = <span class="st0">&quot;server.com&quot;</span>
<span class="co1"># All should have trailing slashes</span>
lfolder = <span class="st0">&quot;/home/user/screenshots/&quot;</span>
hfolder = <span class="st0">&quot;/home/remote_user/screenshots/&quot;</span>
httplink = <span class="st0">&quot;http://&quot;</span>+host+<span class="st0">&quot;/screenshots/&quot;</span>
&nbsp;
&nbsp;
<span class="co1"># Display</span>
<span class="co1">#####################################</span>
t1 = <span class="nu0">5000</span> <span class="co1"># timeout for screenshot upload dialog</span>
t2 = <span class="nu0">3000</span> <span class="co1"># timeout for screenshot preview</span>
t3 = <span class="nu0">7000</span> <span class="co1"># timeout for link dialog</span>
&nbsp;
screenshot_preview = <span class="nu0">1</span> <span class="co1"># If using with the compiz screenshot plugin, you may want this</span>
popup_link = <span class="nu0">1</span> <span class="co1"># another popup</span>
copy_to_clipboard = <span class="nu0">0</span> <span class="co1"># automatically copy text to keyboard</span>
&nbsp;
<span class="co1"># Position</span>
<span class="co1">#####################################</span>
&nbsp;
<span class="co1"># Get screensize &lt; &lt; used for relative positioning</span>
display = gtk.<span class="me1">gdk</span>.<span class="me1">display_get_default</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
screen = display.<span class="me1">get_default_screen</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
x = screen.<span class="me1">get_width</span><span class="br0">&#40;</span><span class="br0">&#41;</span> - <span class="nu0">1</span>
y = screen.<span class="me1">get_height</span><span class="br0">&#40;</span><span class="br0">&#41;</span> - <span class="nu0">1</span>
&nbsp;
<span class="co1"># 0 for Automatic Placement</span>
<span class="st0">&quot;&quot;&quot;
x1 = 0
y1 = 0
x2 = 0
y2 = 0
x3 = 0
y3 = 0
&quot;&quot;&quot;</span>
<span class="co1"># Define Relative Position (assuming top-right)</span>
x1 = x-<span class="nu0">1</span>
y1 = <span class="nu0">12</span>
x2 = x1
y2 = y1 + <span class="nu0">100</span>
x3 = x-<span class="nu0">1</span>
y3 = <span class="nu0">12</span>
<span class="co1"># Define Static (1920 puts it on my second monitor)</span>
<span class="st0">&quot;&quot;&quot;
x1 = 1919
y1 = 12
x2 = x1
y2 = y1 + 100
x3 = 1920
y3 = 12
&quot;&quot;&quot;</span>
<span class="co1">#####################################</span>
&nbsp;
<span class="kw1">def</span> upload_cb<span class="br0">&#40;</span>n, action<span class="br0">&#41;</span>:
    <span class="kw1">assert</span> action == <span class="st0">&quot;upload&quot;</span> 
&nbsp;
    <span class="kw3">subprocess</span>.<span class="me1">call</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="st0">&quot;scp&quot;</span>, <span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">join</span><span class="br0">&#40;</span>lfolder, f<span class="br0">&#41;</span>, <span class="st0">'%s@%s:%s'</span> <span class="sy0">%</span> <span class="br0">&#40;</span><span class="kw3">user</span>, host, hfolder<span class="br0">&#41;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># setup URL in </span>
    <span class="kw1">if</span> copy_to_clipboard:
        clipboard = gtk.<span class="me1">clipboard_get</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
        clipboard.<span class="me1">set_text</span><span class="br0">&#40;</span>httplink + f<span class="br0">&#41;</span>
        <span class="co1"># make our data available to other applications</span>
        clipboard.<span class="me1">store</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># Notification: Link for the clicking</span>
    <span class="kw1">if</span> popup_link:
        n3 = pynotify.<span class="me1">Notification</span><span class="br0">&#40;</span><span class="st0">&quot;Here is your link&quot;</span>,<span class="st0">&quot;&lt;a href='&quot;</span> + httplink + f + <span class="st0">&quot;'&gt;&quot;</span> + httplink + f + <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span>
&nbsp;
        helper = gtk.<span class="me1">Button</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
        icon = helper.<span class="me1">render_icon</span><span class="br0">&#40;</span>gtk.<span class="me1">STOCK_DIALOG_INFO</span>, gtk.<span class="me1">ICON_SIZE_DIALOG</span><span class="br0">&#41;</span>
        n3.<span class="me1">set_icon_from_pixbuf</span><span class="br0">&#40;</span>icon<span class="br0">&#41;</span>
&nbsp;
        n3.<span class="me1">set_urgency</span><span class="br0">&#40;</span>pynotify.<span class="me1">URGENCY_NORMAL</span><span class="br0">&#41;</span>
        <span class="kw1">if</span> x3:
            n3.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;x&quot;</span>, x3<span class="br0">&#41;</span>
        <span class="kw1">if</span> y3:
            n3.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;y&quot;</span>, y3<span class="br0">&#41;</span>
        n3.<span class="me1">set_timeout</span><span class="br0">&#40;</span>t3<span class="br0">&#41;</span>
        n3.<span class="me1">connect</span><span class="br0">&#40;</span><span class="st0">&quot;closed&quot;</span>,closen3_cb<span class="br0">&#41;</span>
&nbsp;
        <span class="kw1">if</span> <span class="kw1">not</span> n3.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:
            <span class="kw1">print</span> <span class="st0">&quot;Failed to send notification&quot;</span>
            <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
        closen1_cb<span class="br0">&#40;</span>n1<span class="br0">&#41;</span>
        closen2_cb<span class="br0">&#40;</span>n2<span class="br0">&#41;</span>
&nbsp;
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Notification 1 was closed</span>
<span class="kw1">def</span> closen1_cb<span class="br0">&#40;</span>n<span class="br0">&#41;</span>:
    n1.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    <span class="kw1">if</span> screenshot_preview:
        n2.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Notification 2 was closed</span>
<span class="kw1">def</span> closen2_cb<span class="br0">&#40;</span>n<span class="br0">&#41;</span>:
    n2.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Notification 2 was closed</span>
<span class="kw1">def</span> closen3_cb<span class="br0">&#40;</span>n<span class="br0">&#41;</span>:
    n3.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># The Ignore button was clicked</span>
<span class="kw1">def</span> ignore_cb<span class="br0">&#40;</span>n, action<span class="br0">&#41;</span>:
    <span class="kw1">assert</span> action == <span class="st0">&quot;ignore&quot;</span>
&nbsp;
    closen1_cb<span class="br0">&#40;</span>n1<span class="br0">&#41;</span>
    closen2_cb<span class="br0">&#40;</span>n2<span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Main</span>
<span class="kw1">def</span> main<span class="br0">&#40;</span><span class="br0">&#41;</span>:
    gtk.<span class="me1">main</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Init</span>
<span class="kw1">if</span> __name__ == <span class="st0">'__main__'</span>:
    <span class="kw1">if</span> <span class="kw1">not</span> pynotify.<span class="me1">init</span><span class="br0">&#40;</span><span class="st0">&quot;Notifier 'scp' Option&quot;</span><span class="br0">&#41;</span>:
        <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># Get latest file and build uri</span>
    start = <span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">abspath</span><span class="br0">&#40;</span>lfolder<span class="br0">&#41;</span>
    f = <span class="kw2">max</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="br0">&#40;</span><span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">getmtime</span><span class="br0">&#40;</span><span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">join</span><span class="br0">&#40;</span>start,p<span class="br0">&#41;</span><span class="br0">&#41;</span>,p<span class="br0">&#41;</span>
         <span class="kw1">for</span> p <span class="kw1">in</span> <span class="kw3">os</span>.<span class="me1">listdir</span><span class="br0">&#40;</span>start<span class="br0">&#41;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>
    uri = lfolder + f
&nbsp;
    <span class="co1"># Notification: Upload to Server</span>
    n1 = pynotify.<span class="me1">Notification</span><span class="br0">&#40;</span><span class="st0">&quot;Upload to Server?&quot;</span>,<span class="st0">&quot;Copy the file '&quot;</span> + f + <span class="st0">&quot;' to the server?&quot;</span><span class="br0">&#41;</span>
&nbsp;
    helper = gtk.<span class="me1">Button</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    icon = helper.<span class="me1">render_icon</span><span class="br0">&#40;</span>gtk.<span class="me1">STOCK_DIALOG_QUESTION</span>, gtk.<span class="me1">ICON_SIZE_DIALOG</span><span class="br0">&#41;</span>
    n1.<span class="me1">set_icon_from_pixbuf</span><span class="br0">&#40;</span>icon<span class="br0">&#41;</span>
&nbsp;
    n1.<span class="me1">set_urgency</span><span class="br0">&#40;</span>pynotify.<span class="me1">URGENCY_NORMAL</span><span class="br0">&#41;</span>
    <span class="kw1">if</span> x1:
        n1.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;x&quot;</span>, x1<span class="br0">&#41;</span>
    <span class="kw1">if</span> y1:
        n1.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;y&quot;</span>, y1<span class="br0">&#41;</span>
    n1.<span class="me1">set_timeout</span><span class="br0">&#40;</span>t1<span class="br0">&#41;</span>
    n1.<span class="me1">add_action</span><span class="br0">&#40;</span><span class="st0">&quot;upload&quot;</span>, <span class="st0">&quot;Yes, Upload&quot;</span>, upload_cb<span class="br0">&#41;</span>
    n1.<span class="me1">add_action</span><span class="br0">&#40;</span><span class="st0">&quot;ignore&quot;</span>, <span class="st0">&quot;Ignore&quot;</span>, ignore_cb<span class="br0">&#41;</span>
    n1.<span class="me1">connect</span><span class="br0">&#40;</span><span class="st0">&quot;closed&quot;</span>,closen1_cb<span class="br0">&#41;</span>
&nbsp;
    <span class="kw1">if</span> <span class="kw1">not</span> n1.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:
        <span class="kw1">print</span> <span class="st0">&quot;Failed to send notification&quot;</span>
        <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># Notification: Screenshot Preview</span>
    <span class="kw1">if</span> screenshot_preview:
        n2 = pynotify.<span class="me1">Notification</span><span class="br0">&#40;</span><span class="st0">&quot;Screenshot Preview&quot;</span>, <span class="st0">&quot;&quot;</span>, uri<span class="br0">&#41;</span>
        n2.<span class="me1">set_urgency</span><span class="br0">&#40;</span>pynotify.<span class="me1">URGENCY_LOW</span><span class="br0">&#41;</span>
        <span class="kw1">if</span> x2:
            n2.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;x&quot;</span>, x2<span class="br0">&#41;</span>
        <span class="kw1">if</span> y2:
            n2.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;y&quot;</span>, y2<span class="br0">&#41;</span>
        n2.<span class="me1">set_timeout</span><span class="br0">&#40;</span>t2<span class="br0">&#41;</span>
        n2.<span class="me1">connect</span><span class="br0">&#40;</span><span class="st0">&quot;closed&quot;</span>,closen2_cb<span class="br0">&#41;</span>
&nbsp;
        <span class="kw1">if</span> <span class="kw1">not</span> n2.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:
            <span class="kw1">print</span> <span class="st0">&quot;Failed to send notification&quot;</span>
            <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
    main<span class="br0">&#40;</span><span class="br0">&#41;</span></pre></div></div>

<p>I also rigged up a quick gallery script to parse the incoming images http://interwebninja.com/screenshots/ &#8212; I used <a href="http://scriptandstyle.com/automatically-generate-a-photo-gallery-from-a-directory-of-images">AutoGeneratingGallery</a> for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv" length="2797703" type="video/ogg" />
		</item>
		<item>
		<title>Ubuntu System Panel &#8211; A &#8216;start menu&#8217; for the power-user</title>
		<link>http://www.doknowevil.net/2009/05/07/ubuntu-system-panel-a-start-menu-for-the-power-user/</link>
		<comments>http://www.doknowevil.net/2009/05/07/ubuntu-system-panel-a-start-menu-for-the-power-user/#comments</comments>
		<pubDate>Thu, 07 May 2009 16:58:56 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Organization]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=353</guid>
		<description><![CDATA[Ubuntu System Panel (USP) is a replacement for the standard three menus (Applications, Places, System) that come with Ubuntu in the top left. USP condenses these three menus into one easily filtered menu system. You can either navigate the list by clicking buttons related to the type of application you&#8217;re looking for (e.g. Accessories, Games,]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/ubuntu-system-panel/" target="_blank">Ubuntu System Panel</a> (USP) is a replacement for the standard three menus (Applications, Places, System) that come with Ubuntu in the top left.  USP condenses these three menus into one easily filtered menu system.  You can either navigate the list by clicking buttons related to the type of application you&#8217;re looking for (e.g. Accessories, Games, System Tools) or just start typing the name of what you want for a live filter search (my preferred method).</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2009/04/ubuntu-system-panel.png" rel="shadowbox[post-353];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2009/04/ubuntu-system-panel-300x127.png" alt="ubuntu-system-panel" title="ubuntu-system-panel" width="300" height="127" class="alignnone size-medium wp-image-354" /></a></p>
<p>There are many extra tweaks, as seen above I&#8217;ve &#8220;pimped&#8221; mine out a bit with the options.  The preferences dialog, you can get to by right clicking system and choosing preferences, has a lot to be desired as it&#8217;s interface is a bit O.o.  If you play around for a while though, you&#8217;ll be able to figure it out.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2009/04/ubuntu-system-panel_rightclick.png" rel="shadowbox[post-353];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2009/04/ubuntu-system-panel_rightclick.png" alt="ubuntu-system-panel_rightclick" title="ubuntu-system-panel_rightclick" width="193" height="225" class="alignnone size-full wp-image-355" /></a><br />
<a href="http://www.doknowevil.net/wp-content/uploads/2009/04/usp-preferences.png" rel="shadowbox[post-353];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2009/04/usp-preferences-300x258.png" alt="usp-preferences" title="usp-preferences" width="300" height="258" class="alignnone size-medium wp-image-356" /></a></p>
<p>Optionally, I&#8217;ve provided <a href="http://z.nexuizninjaz.com/linux/ganksta_usp.xml" title="My USP configuration" target="_blank">my configuration file</a> which you can apply to your USP by selecting &#8220;restore&#8221; in the bottom right of the preferences dialog.</p>
<p>Read the <a href="http://code.google.com/p/ubuntu-system-panel/wiki/Installation" title="Ubuntu System Panel - Installation Documentation" target="_blank">installation documentation</a> to get started.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2009/05/07/ubuntu-system-panel-a-start-menu-for-the-power-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Window Management with Multiple Monitors, Window Effects and Default File Associations</title>
		<link>http://www.doknowevil.net/2008/11/25/ubuntu-window-management-with-multiple-monitors-window-effects-and-default-file-associations/</link>
		<comments>http://www.doknowevil.net/2008/11/25/ubuntu-window-management-with-multiple-monitors-window-effects-and-default-file-associations/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 02:25:38 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Application Management]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[dual screen]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[multiple monitors]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/2008/11/25/ubuntu-window-management-with-multiple-monitors-window-effects-and-default-file-associations/</guid>
		<description><![CDATA[Multiple Monitors Window Management in Ubuntu Moving your applications from one monitor to the next with hotkeys I&#8217;ve been using multiple monitors for a while now, Starting with a 17&#8243; CRT with a 19&#8243; CRT and moving up to two 19&#8243; LCD, then 3, then temporarily one wide screen and back to 2. Something I]]></description>
			<content:encoded><![CDATA[<h3>Multiple Monitors Window Management in Ubuntu</h3>
<h4>Moving your applications from one monitor to the next with hotkeys</h4>
<p>I&#8217;ve been using multiple monitors for a while now, Starting with a 17&#8243; CRT with a 19&#8243; CRT and moving up to two 19&#8243; LCD, then 3, then temporarily one wide screen and back to 2.  Something I always loved having as a utility in <a href="http://www.realtimesoft.com/ultramon/" title="Ultramon - multiple monitors in Windows" target="_blank">ultramon</a> that I couldn&#8217;t find in Ubuntu (Gnome) or any window manager for that matter, was the ability to move applications from monitor to monitor.  I had assumed the search futile until I was searching about some questions I had concerning <a ref="http://compiz-fusion.org/" title="Compiz-fusion - Window Effects in Linux" target="_blank">Compiz-fusion</a> with dual monitors and I came about <a href="http://ubuntuforums.org/showthread.php?t=815925" title="Multiple monitor window handling in Linux">this thread on Ubuntu forums</a> which brightened up my day. A fellow named gfixler posted a bash script that utilizes command line applications to move the windows.</p>
<p>For you multi-monitor users seeking salvation from removing your hand from the keyboard to move your application from one monitor to another, here&#8217;s the skinny on getting it setup using compiz-fusion, aka Advanced Desktop Effects, to set my keybinds.</p>
<p>1. Open a terminal and setup your prerequisites with apt-get:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> wmctrl xprop xwininfo</pre></div></div>

<p>If you get errors about x11-utils, just ignore them, this package will handle your needs.</p>
<p>2. Next, lets put the script somewhere you can call it, say &#8220;<b>~/scripts</b>&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="kw2">mkdir</span> ~<span class="sy0">/</span>scripts <span class="sy0">&amp;&amp;</span> <span class="kw3">cd</span> ~<span class="sy0">/</span>scripts <span class="sy0">&amp;&amp;</span> <span class="kw2">touch</span> movewin.sh <span class="sy0">&amp;&amp;</span> <span class="kw2">chmod</span> +x movewin.sh <span class="sy0">&amp;&amp;</span> gedit movewin.sh</pre></div></div>

<p>2. Paste the following code, find the first function &#8220;<b>getNumberOfMonitors</b>&#8221; and configure it to the number of monitors you have (default 2).</p>
<div style="height:300px;overflow:auto;padding:2px;">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="co0">#!/bin/bash</span>
<span class="co0"># swap_monitor.sh (original version)</span>
<span class="co0"># Moves the active window to the other screen of a dual-screen Xinerama setup.</span>
<span class="co0">#</span>
<span class="co0"># movewin.sh (modified version)</span>
<span class="co0"># allows movement of windows left and right between multiple monitors</span>
<span class="co0">#</span>
<span class="co0"># Requires: wmctrl, xprop, xwininfo</span>
<span class="co0">#</span>
<span class="co0"># Original Author: Raphael Wimmer</span>
<span class="co0"># raphman@gmx.de</span>
<span class="co0">#</span>
<span class="co0"># Modified by: Gary Fixler</span>
<span class="co0"># gfixler+bash@gmail.com</span>
&nbsp;
<span class="kw1">function</span> getNumberOfMonitors
<span class="br0">&#123;</span>
    <span class="co0"># simply must be hardcoded</span>
    <span class="co0"># e.g. MatroxTripleHead2Go can service 3 screens,</span>
    <span class="co0"># but appears as only one monitor to the computer</span>
&nbsp;
    <span class="co0"># change to your number of monitors</span>
    <span class="kw3">echo</span> <span class="nu0">2</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> getMonitorWidth
<span class="br0">&#123;</span>
    <span class="re2">numberOfMonitors</span>=$<span class="br0">&#40;</span>getNumberOfMonitors<span class="br0">&#41;</span>
    <span class="re2">monitorLine</span>=$<span class="br0">&#40;</span>xwininfo <span class="re5">-root</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;Width&quot;</span><span class="br0">&#41;</span>
    <span class="re2">monitorWidth</span>=$<span class="br0">&#40;</span><span class="br0">&#40;</span><span class="co1">${monitorLine:8}</span><span class="sy0">/</span><span class="re1">$numberOfMonitors</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>
    <span class="kw3">echo</span> <span class="re1">$monitorWidth</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> getActiveWindowID
<span class="br0">&#123;</span>
    <span class="re2">activeWinLine</span>=$<span class="br0">&#40;</span>xprop <span class="re5">-root</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;_NET_ACTIVE_WINDOW(WINDOW)&quot;</span><span class="br0">&#41;</span>
    <span class="re2">activeWinID</span>=<span class="st0">&quot;<span class="es3">${activeWinLine:40}</span>&quot;</span>
    <span class="kw3">echo</span> <span class="re1">$activeWinID</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> getActiveWindowHorizontalPosition
<span class="br0">&#123;</span>
    <span class="re2">activeWinID</span>=$<span class="br0">&#40;</span>getActiveWindowID<span class="br0">&#41;</span>
    <span class="re2">xPosLine</span>=$<span class="br0">&#40;</span>xwininfo <span class="re5">-id</span> <span class="re1">$activeWinID</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;Absolute upper-left X&quot;</span><span class="br0">&#41;</span>
    <span class="re2">xPos</span>=<span class="co1">${xPosLine:25}</span>
    <span class="kw3">echo</span> <span class="re1">$xPos</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> getActiveWindowWidth
<span class="br0">&#123;</span>
    <span class="re2">activeWinID</span>=$<span class="br0">&#40;</span>getActiveWindowID<span class="br0">&#41;</span>
    <span class="re2">xWidthLine</span>=$<span class="br0">&#40;</span>xwininfo <span class="re5">-id</span> <span class="re1">$activeWinID</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;Width&quot;</span><span class="br0">&#41;</span>
    <span class="re2">xWidth</span>=<span class="co1">${xWidthLine:8}</span>
    <span class="kw3">echo</span> <span class="re1">$xWidth</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> getActiveWindowCurrentMonitor
<span class="br0">&#123;</span>
    <span class="re2">numberOfMonitors</span>=$<span class="br0">&#40;</span>getNumberOfMonitors<span class="br0">&#41;</span>
    <span class="re2">monitorWidth</span>=$<span class="br0">&#40;</span>getMonitorWidth<span class="br0">&#41;</span>
    <span class="re2">activeWinID</span>=$<span class="br0">&#40;</span>getActiveWindowID<span class="br0">&#41;</span>
    <span class="re2">xPos</span>=$<span class="br0">&#40;</span>getActiveWindowHorizontalPosition<span class="br0">&#41;</span>
    <span class="re2">i</span>=<span class="st0">&quot;0&quot;</span>
    <span class="kw1">while</span> <span class="br0">&#91;</span> <span class="re1">$xPos</span> <span class="re5">-gt</span> <span class="re1">$monitorWidth</span> <span class="br0">&#93;</span>
    <span class="kw1">do</span>
        <span class="re2">xPos</span>=$<span class="br0">&#91;</span><span class="re1">$xPos</span>-<span class="re1">$monitorWidth</span><span class="br0">&#93;</span>
        <span class="re2">i</span>=$<span class="br0">&#91;</span><span class="re1">$i</span>+<span class="nu0">1</span><span class="br0">&#93;</span>
    <span class="kw1">done</span>
    <span class="kw3">echo</span> <span class="re1">$i</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> getActiveWindowPositionOneMonitorToTheLeft
<span class="br0">&#123;</span>
    <span class="re2">monitorWidth</span>=$<span class="br0">&#40;</span>getMonitorWidth<span class="br0">&#41;</span>
    <span class="re2">currentMonitor</span>=$<span class="br0">&#40;</span>getActiveWindowCurrentMonitor<span class="br0">&#41;</span>
    <span class="re2">activeWinID</span>=$<span class="br0">&#40;</span>getActiveWindowID<span class="br0">&#41;</span>
    <span class="re2">xPos</span>=$<span class="br0">&#40;</span>getActiveWindowHorizontalPosition<span class="br0">&#41;</span>
    <span class="re2">xPos</span>=$<span class="br0">&#91;</span><span class="re1">$xPos</span>-<span class="re1">$monitorWidth</span><span class="br0">&#93;</span>
    <span class="kw3">echo</span> <span class="re1">$xPos</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> getActiveWindowPositionOneMonitorToTheRight
<span class="br0">&#123;</span>
    <span class="re2">monitorWidth</span>=$<span class="br0">&#40;</span>getMonitorWidth<span class="br0">&#41;</span>
    <span class="re2">numberOfMonitors</span>=$<span class="br0">&#40;</span>getNumberOfMonitors<span class="br0">&#41;</span>
    <span class="re2">currentMonitor</span>=$<span class="br0">&#40;</span>getActiveWindowCurrentMonitor<span class="br0">&#41;</span>
    <span class="re2">activeWinID</span>=$<span class="br0">&#40;</span>getActiveWindowID<span class="br0">&#41;</span>
    <span class="re2">xPos</span>=$<span class="br0">&#40;</span>getActiveWindowHorizontalPosition<span class="br0">&#41;</span>
    <span class="re2">xPos</span>=$<span class="br0">&#91;</span><span class="re1">$xPos</span>+<span class="re1">$monitorWidth</span><span class="br0">&#93;</span>
    <span class="kw3">echo</span> <span class="re1">$xPos</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> changeActiveWindowMonitor
<span class="br0">&#123;</span>
    <span class="re2">activeWinID</span>=$<span class="br0">&#40;</span>getActiveWindowID<span class="br0">&#41;</span>
    <span class="kw1">if</span> <span class="br0">&#91;</span> $<span class="nu0">1</span> <span class="re5">-eq</span> <span class="st0">&quot;0&quot;</span> <span class="br0">&#93;</span>
    <span class="kw1">then</span>
        <span class="re2">newXPos</span>=$<span class="br0">&#40;</span>getActiveWindowPositionOneMonitorToTheLeft<span class="br0">&#41;</span>
        <span class="re2">newXPos</span>=$<span class="br0">&#91;</span><span class="re1">$newXPos</span>-<span class="nu0">5</span><span class="br0">&#93;</span>
    <span class="kw1">else</span>
        <span class="re2">newXPos</span>=$<span class="br0">&#40;</span>getActiveWindowPositionOneMonitorToTheRight<span class="br0">&#41;</span>
        <span class="re2">newXPos</span>=$<span class="br0">&#91;</span><span class="re1">$newXPos</span>-<span class="nu0">5</span><span class="br0">&#93;</span>
    <span class="kw1">fi</span>
&nbsp;
    <span class="re2">winState</span>=$<span class="br0">&#40;</span>xprop <span class="re5">-id</span> <span class="co1">${activeWinID}</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;_NET_WM_STATE(ATOM)&quot;</span> <span class="br0">&#41;</span>
&nbsp;
    <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">`</span><span class="kw3">echo</span> <span class="co1">${winState}</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;_NET_WM_STATE_MAXIMIZED_HORZ&quot;</span><span class="sy0">`</span> <span class="sy0">!</span>= <span class="st0">&quot;&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>
        <span class="kw1">then</span>
        <span class="re2">maxH</span>=<span class="nu0">1</span>
        wmctrl <span class="re5">-i</span> <span class="re5">-r</span> <span class="co1">${activeWinID}</span> <span class="re5">-b</span> remove,maximized_horz
    <span class="kw1">fi</span>
&nbsp;
    <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">`</span><span class="kw3">echo</span> <span class="co1">${winState}</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;_NET_WM_STATE_MAXIMIZED_VERT&quot;</span><span class="sy0">`</span> <span class="sy0">!</span>= <span class="st0">&quot;&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>
        <span class="kw1">then</span>
        <span class="re2">maxV</span>=<span class="nu0">1</span>
        wmctrl <span class="re5">-i</span> <span class="re5">-r</span> <span class="co1">${activeWinID}</span> <span class="re5">-b</span> remove,maximized_vert
    <span class="kw1">fi</span>
&nbsp;
    <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">`</span><span class="kw3">echo</span> <span class="co1">${winState}</span> <span class="sy0">|</span> <span class="kw2">grep</span> <span class="st0">&quot;_NET_WM_STATE_FULLSCREEN&quot;</span><span class="sy0">`</span> <span class="sy0">!</span>= <span class="st0">&quot;&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>
        <span class="kw1">then</span>
        <span class="re2">fulls</span>=<span class="nu0">1</span>
        wmctrl <span class="re5">-i</span> <span class="re5">-r</span> <span class="co1">${activeWinID}</span> <span class="re5">-b</span> remove,fullscreen
    <span class="kw1">fi</span>
&nbsp;
    <span class="co0"># move window (finally)</span>
    wmctrl <span class="re5">-i</span> <span class="re5">-r</span> <span class="co1">${activeWinID}</span> <span class="re5">-e</span> <span class="nu0">0</span>,<span class="co1">${newXPos}</span>,-<span class="nu0">1</span>,-<span class="nu0">1</span>,-<span class="nu0">1</span>
&nbsp;
    <span class="co0"># restore maximization</span>
    <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="co1">${maxV}</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> wmctrl <span class="re5">-i</span> <span class="re5">-r</span> <span class="co1">${activeWinID}</span> <span class="re5">-b</span> add,maximized_vert
    <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="co1">${maxH}</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> wmctrl <span class="re5">-i</span> <span class="re5">-r</span> <span class="co1">${activeWinID}</span> <span class="re5">-b</span> add,maximized_horz
    <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="co1">${fulls}</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> wmctrl <span class="re5">-i</span> <span class="re5">-r</span> <span class="co1">${activeWinID}</span> <span class="re5">-b</span> add,fullscreen
&nbsp;
    <span class="co0"># raise window (seems to be necessary sometimes)</span>
    wmctrl <span class="re5">-i</span> <span class="re5">-a</span> <span class="co1">${activeWinID}</span>
&nbsp;
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> moveActiveWindowOneMonitorToTheLeft
<span class="br0">&#123;</span>
    changeActiveWindowMonitor <span class="nu0">0</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">function</span> moveActiveWindowOneMonitorToTheRight
<span class="br0">&#123;</span>
    changeActiveWindowMonitor <span class="nu0">1</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="st0">&quot;$1&quot;</span>
&nbsp;
<span class="kw3">exit</span> <span class="nu0">0</span></pre></div></div>

</div>
<p>3. Setup your hot keys with compiz-fusion.  Go to System >> Preferences >> Advanced Desktop Effects.  Inside &#8220;<b>General Options</b>&#8220;, click on the command tab (I apologize for my heinous blue links).</p>
<p><a href='http://www.doknowevil.net/wp-content/uploads/2008/11/2008-11-25-205445_833x464_scrot.png' rel='shadowbox[post-247];player=img;' title='Compiz-fusion Hotkeys 1'><img src='http://www.doknowevil.net/wp-content/uploads/2008/11/2008-11-25-205445_833x464_scrot.png' alt='Compiz-fusion Hotkeys 1' /></a></p>
<p><a href='http://www.doknowevil.net/wp-content/uploads/2008/11/2008-11-25-210327_900x435_scrot.png' title='2008-11-25-210327_900x435_scrot.png' rel='shadowbox[post-247];player=img;'><img src='http://www.doknowevil.net/wp-content/uploads/2008/11/2008-11-25-210327_900x435_scrot.png' alt='2008-11-25-210327_900x435_scrot.png' /></a></p>
<p>Use</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">scripts<span class="sy0">/</span>.<span class="sy0">/</span>movewin.sh moveActiveWindowOneMonitorToTheRight</pre></div></div>

<p>and</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">scripts<span class="sy0">/</span>.<span class="sy0">/</span>movewin.sh moveActiveWindowOneMonitorToTheLeft</pre></div></div>

<p>respectively</p>
<h3>Per Application Window Effects in Ubuntu</h3>
<h4>Bring character and tickle your soul with per application window effects</h4>
<p>Another cool feature Compiz-fusion has is window animations.  My friend <a href="http://www.realhumanmoments" title="James Lindsay" target="_blank">James Lindsay</a> recently reminded me about Window Effects&#8230; which when I first install Ubuntu on my laptop, I experimented my butt off&#8230; but being a laptop&#8230; I just used simple ones I&#8217;d turn off half the time anyway.  He asked me why I don&#8217;t use them on my desktop and I didn&#8217;t have a good reason.  Well, now I have 2 good reasons to keep using compiz.</p>
<p><a href='http://www.doknowevil.net/wp-content/uploads/2008/11/2008-11-25-210749_900x591_scrot.png' title='2008-11-25-210749_900x591_scrot.png' rel='shadowbox[post-247];player=img;'><img src='http://www.doknowevil.net/wp-content/uploads/2008/11/2008-11-25-210749_900x591_scrot.png' alt='2008-11-25-210749_900x591_scrot.png' /></a></p>
<p>I made my Thunderbird use the airplane effect so when I send emails, it flys away and for <a href="http://www.geany.org" title="Geany - My Linux Text Editor of Choice" target="_blank">Geany</a>, I used the magic lamp for open, close, maximize and minimize (different speeds).  It&#8217;s a fun little effect that breaks up the stiffness of the desktop.</p>
<h3>Default File Associations in Ubuntu</h3>
<h4>geany > gedit</h4>
<p>I was tired of gedit popping up when geany&#8217;s just as lightweight but more affective.  So found a command and altered it a bit to make my default editor geany.</p>
<p>1. Open the terminal and create\open the following file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">gedit ~<span class="sy0">/</span>.local<span class="sy0">/</span>share<span class="sy0">/</span>applications<span class="sy0">/</span>defaults.list</pre></div></div>

<p>If it&#8217;s blank, add &#8220;<b>[Default Applications]</b>&#8220;.  If it&#8217;s not, find &#8220;<b>[Default Applications]</b>&#8220;.</p>
<p>2. Then, back to the terminal, grep the default files associations and replace gedit with your editor of choice</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="kw2">grep</span> gedit <span class="sy0">/</span>usr<span class="sy0">/</span>share<span class="sy0">/</span>applications<span class="sy0">/</span>defaults.list <span class="sy0">|</span> <span class="kw2">sed</span> s<span class="sy0">/</span>gedit<span class="sy0">/</span>geany<span class="sy0">/</span>g</pre></div></div>

<p>Copy (ctrl+shift+c) and paste the output into gedit, below the &#8220;<b>[Default Applications]</b>&#8221; header.</p>
<p>3. Restart nautilus to load the changes (will close all your file managers that are open and blink/freeze your desktop for a second)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">pkill nautilus</pre></div></div>

<p>Good luck, have fun and happy coding <img src='http://www.doknowevil.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2008/11/25/ubuntu-window-management-with-multiple-monitors-window-effects-and-default-file-associations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Back!</title>
		<link>http://www.doknowevil.net/2007/07/04/im-back/</link>
		<comments>http://www.doknowevil.net/2007/07/04/im-back/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 14:18:36 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[Wallpapers]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/2007/07/04/im-back/</guid>
		<description><![CDATA[Sorry guys, I was out of town for a few days. I don&#8217;t have any tips for you today but I have a wallpaper I made yesterday. Here ya go:]]></description>
			<content:encoded><![CDATA[<p>Sorry guys, I was out of town for a few days.  I don&#8217;t have any tips for you today but I have a wallpaper I made yesterday.</p>
<p>Here ya go:</p>
<p><a href='http://www.doknowevil.net/wp-content/uploads/2007/07/systemetrical_detrition-5b.jpg' title='systemetrical_detrition-5b.jpg' rel='shadowbox[post-71];player=img;'><img src='http://www.doknowevil.net/wp-content/uploads/2007/07/systemetrical_detrition-5b.thumbnail.jpg' alt='systemetrical_detrition-5b.jpg' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2007/07/04/im-back/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Which Widget Didya Get?</title>
		<link>http://www.doknowevil.net/2007/06/23/which-widget-didya-get/</link>
		<comments>http://www.doknowevil.net/2007/06/23/which-widget-didya-get/#comments</comments>
		<pubDate>Sat, 23 Jun 2007 20:42:53 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[Freeware]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/2007/06/23/which-widget-didya-get/</guid>
		<description><![CDATA[I tried Konfabulator a while ago (emphasis on the while) and I wasn&#8217;t too pleased. It seemed laggy, buggy and more trouble than it was worth. However, recently I was on the lookout for a good desktop todo list, nothing too fancy but it seemed to achieve this, I would have to put my qualms]]></description>
			<content:encoded><![CDATA[<p>I tried Konfabulator a while ago (emphasis on the while) and I wasn&#8217;t too pleased.  It seemed laggy, buggy and more trouble than it was worth.  However, recently I was on the lookout for a good desktop todo list, nothing too fancy but it seemed to achieve this, I would have to put my qualms aside and get some sort of widget program.</p>
<p>I decided to give Konfabulator another shot (now know as <a href="http://widgets.yahoo.com/">Yahoo Widgets</a>.  And I must say, I&#8217;m quite pleased!  Everything runs smoothly, it integrates well with the OS and I haven&#8217;t had any crashes.</p>
<p>So if you haven&#8217;t tried out Yahoo Widgets, I definitely recommend it.</p>
<p>By the way, <a href="http://widgets.yahoo.com/gallery/view.php?widget=41857">here is the todo list</a> that I&#8217;m using.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2007/06/23/which-widget-didya-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sexy Up Your Desktop With These Dual Wallpapers</title>
		<link>http://www.doknowevil.net/2007/06/14/sexy-up-your-desktop-with-these-dual-wallpapers/</link>
		<comments>http://www.doknowevil.net/2007/06/14/sexy-up-your-desktop-with-these-dual-wallpapers/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 20:51:18 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[Wallpapers]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/2007/06/14/sexy-up-your-desktop-with-these-dual-wallpapers/</guid>
		<description><![CDATA[Whether you realize it or not, your desktop wallpaper has a very significant impact on your life. Your eyes, your mood and your creativity are all affected by it. This is why I believe it&#8217;s important to have a good one&#8230; which isn&#8217;t always an easy task for someone with dual monitors. Over the years,]]></description>
			<content:encoded><![CDATA[<p>Whether you realize it or not, your desktop wallpaper has a very significant impact on your life.  Your eyes, your mood and your creativity are all affected by it.  This is why I believe it&#8217;s important to have a good one&#8230; which isn&#8217;t always an easy task for someone with dual monitors.  Over the years, I&#8217;ve collected many many wallpapers and today, I wish to share with your other people rocking dual monitors, some I&#8217;ve hand picked from my collection.</p>
<p>I didn&#8217;t realize wordpress&#8217;s support for uploading multiple images was so weak&#8230; so here are a few examples of what you&#8217;ll be getting when you download: <a href="http://www.doknowevil.net/great_duals.zip">this zip</a></p>
<p><b>EDIT</b>: Link fixed!</p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/abstractiongarden07thumbnail.gif' alt='abstractiongarden07thumbnail.gif' /></p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/clusterthumbnail.gif' alt='clusterthumbnail.gif' /></p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/face_it_by_aerosolfunthumbnail.gif' alt='face_it_by_aerosolfunthumbnail.gif' /></p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/windinthegarden-daymixthumbnail.gif' alt='windinthegarden-daymixthumbnail.gif' /></p>
<p>And the one I&#8217;m currently using&#8230;</p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/coldburnthumbnail.gif' alt='coldburnthumbnail.gif' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2007/06/14/sexy-up-your-desktop-with-these-dual-wallpapers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
