<?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>Sat, 16 Jul 2011 01:25:35 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.5</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"><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><pre class="brush:python">
#!/usr/bin/env python
#
# Title: scp-notifications
# Author: Tyler Mulligan (tyler@detrition.net)
# Date: 06/26/2010
# Version: 0.6
# Description:
# Used in combination with an event, such as an action or cronjob, this script
# will scp the latest file from a folder to your server.
#
# Optionally, it can copy the url to your clipboard and/or show a popup with a
# link to the file after succesfully uploading
#
# Orginally developed to be piped to from compiz screenshot tool
# http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv
#
# The MIT License
#
# Copyright (c) 2010 Tyler Mulligan
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the &quot;Software&quot;), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE
#

import pygtk
pygtk.require(&#039;2.0&#039;)
import pynotify
import gtk
import sys
import os
import subprocess

# Set Variables
#####################################
user = &quot;user&quot;
host = &quot;server.com&quot;
# All should have trailing slashes
lfolder = &quot;/home/user/screenshots/&quot;
hfolder = &quot;/home/remote_user/screenshots/&quot;
httplink = &quot;http://&quot;+host+&quot;/screenshots/&quot;

# Display
#####################################
t1 = 5000 # timeout for screenshot upload dialog
t2 = 3000 # timeout for screenshot preview
t3 = 7000 # timeout for link dialog

screenshot_preview = 1 # If using with the compiz screenshot plugin, you may want this
popup_link = 1 # another popup
copy_to_clipboard = 0 # automatically copy text to keyboard

# Position
#####################################

# Get screensize &lt; &lt; used for relative positioning
display = gtk.gdk.display_get_default()
screen = display.get_default_screen()
x = screen.get_width() - 1
y = screen.get_height() - 1

# 0 for Automatic Placement
&quot;&quot;&quot;
x1 = 0
y1 = 0
x2 = 0
y2 = 0
x3 = 0
y3 = 0
&quot;&quot;&quot;
# Define Relative Position (assuming top-right)
x1 = x-1
y1 = 12
x2 = x1
y2 = y1 + 100
x3 = x-1
y3 = 12
# Define Static (1920 puts it on my second monitor)
&quot;&quot;&quot;
x1 = 1919
y1 = 12
x2 = x1
y2 = y1 + 100
x3 = 1920
y3 = 12
&quot;&quot;&quot;
#####################################

def upload_cb(n, action):
    assert action == &quot;upload&quot;

    subprocess.call([&quot;scp&quot;, os.path.join(lfolder, f), &#039;%s@%s:%s&#039; % (user, host, hfolder)])

    # setup URL in
    if copy_to_clipboard:
        clipboard = gtk.clipboard_get()
        clipboard.set_text(httplink + f)
        # make our data available to other applications
        clipboard.store()

    # Notification: Link for the clicking
    if popup_link:
        n3 = pynotify.Notification(&quot;Here is your link&quot;,&quot;&lt;a href=&#039;&quot; + httplink + f + &quot;&#039;&gt;&quot; + httplink + f + &quot;&quot;)

        helper = gtk.Button()
        icon = helper.render_icon(gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_DIALOG)
        n3.set_icon_from_pixbuf(icon)

        n3.set_urgency(pynotify.URGENCY_NORMAL)
        if x3:
            n3.set_hint(&quot;x&quot;, x3)
        if y3:
            n3.set_hint(&quot;y&quot;, y3)
        n3.set_timeout(t3)
        n3.connect(&quot;closed&quot;,closen3_cb)

        if not n3.show():
            print &quot;Failed to send notification&quot;
            sys.exit(1)

        closen1_cb(n1)
        closen2_cb(n2)

    gtk.main_quit()
    sys.exit(1)

# Notification 1 was closed
def closen1_cb(n):
    n1.close()
    if screenshot_preview:
        n2.close()
    gtk.main_quit()

# Notification 2 was closed
def closen2_cb(n):
    n2.close()
    gtk.main_quit()

# Notification 2 was closed
def closen3_cb(n):
    n3.close()
    gtk.main_quit()

# The Ignore button was clicked
def ignore_cb(n, action):
    assert action == &quot;ignore&quot;

    closen1_cb(n1)
    closen2_cb(n2)
    gtk.main_quit()

# Main
def main():
    gtk.main()

# Init
if __name__ == &#039;__main__&#039;:
    if not pynotify.init(&quot;Notifier &#039;scp&#039; Option&quot;):
        sys.exit(1)

    # Get latest file and build uri
    start = os.path.abspath(lfolder)
    f = max([(os.path.getmtime(os.path.join(start,p)),p)
         for p in os.listdir(start)])[1]
    uri = lfolder + f

    # Notification: Upload to Server
    n1 = pynotify.Notification(&quot;Upload to Server?&quot;,&quot;Copy the file &#039;&quot; + f + &quot;&#039; to the server?&quot;)

    helper = gtk.Button()
    icon = helper.render_icon(gtk.STOCK_DIALOG_QUESTION, gtk.ICON_SIZE_DIALOG)
    n1.set_icon_from_pixbuf(icon)

    n1.set_urgency(pynotify.URGENCY_NORMAL)
    if x1:
        n1.set_hint(&quot;x&quot;, x1)
    if y1:
        n1.set_hint(&quot;y&quot;, y1)
    n1.set_timeout(t1)
    n1.add_action(&quot;upload&quot;, &quot;Yes, Upload&quot;, upload_cb)
    n1.add_action(&quot;ignore&quot;, &quot;Ignore&quot;, ignore_cb)
    n1.connect(&quot;closed&quot;,closen1_cb)

    if not n1.show():
        print &quot;Failed to send notification&quot;
        sys.exit(1)

    # Notification: Screenshot Preview
    if screenshot_preview:
        n2 = pynotify.Notification(&quot;Screenshot Preview&quot;, &quot;&quot;, uri)
        n2.set_urgency(pynotify.URGENCY_LOW)
        if x2:
            n2.set_hint(&quot;x&quot;, x2)
        if y2:
            n2.set_hint(&quot;y&quot;, y2)
        n2.set_timeout(t2)
        n2.connect(&quot;closed&quot;,closen2_cb)

        if not n2.show():
            print &quot;Failed to send notification&quot;
            sys.exit(1)

    main()
</pre><p>.</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 &#039;start menu&#039; 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><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="attachment wp-att-354"><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="attachment wp-att-355"><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="attachment wp-att-356"><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><pre class="brush:bash">sudo apt-get install wmctrl xprop xwininfo</pre><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><pre class="brush:bash">mkdir ~/scripts &amp;&amp; cd ~/scripts &amp;&amp; touch movewin.sh &amp;&amp; chmod +x movewin.sh &amp;&amp; gedit movewin.sh</pre><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;"><pre class="brush:bash">
#!/bin/bash
# swap_monitor.sh (original version)
# Moves the active window to the other screen of a dual-screen Xinerama setup.
#
# movewin.sh (modified version)
# allows movement of windows left and right between multiple monitors
#
# Requires: wmctrl, xprop, xwininfo
#
# Original Author: Raphael Wimmer
# raphman@gmx.de
#
# Modified by: Gary Fixler
# gfixler+bash@gmail.com

function getNumberOfMonitors
{
    # simply must be hardcoded
    # e.g. MatroxTripleHead2Go can service 3 screens,
    # but appears as only one monitor to the computer

    # change to your number of monitors
    echo 2
}

function getMonitorWidth
{
    numberOfMonitors=$(getNumberOfMonitors)
    monitorLine=$(xwininfo -root | grep &quot;Width&quot;)
    monitorWidth=$((${monitorLine:8}/$numberOfMonitors ))
    echo $monitorWidth
}

function getActiveWindowID
{
    activeWinLine=$(xprop -root | grep &quot;_NET_ACTIVE_WINDOW(WINDOW)&quot;)
    activeWinID=&quot;${activeWinLine:40}&quot;
    echo $activeWinID
}

function getActiveWindowHorizontalPosition
{
    activeWinID=$(getActiveWindowID)
    xPosLine=$(xwininfo -id $activeWinID | grep &quot;Absolute upper-left X&quot;)
    xPos=${xPosLine:25}
    echo $xPos
}

function getActiveWindowWidth
{
    activeWinID=$(getActiveWindowID)
    xWidthLine=$(xwininfo -id $activeWinID | grep &quot;Width&quot;)
    xWidth=${xWidthLine:8}
    echo $xWidth
}

function getActiveWindowCurrentMonitor
{
    numberOfMonitors=$(getNumberOfMonitors)
    monitorWidth=$(getMonitorWidth)
    activeWinID=$(getActiveWindowID)
    xPos=$(getActiveWindowHorizontalPosition)
    i=&quot;0&quot;
    while [ $xPos -gt $monitorWidth ]
    do
        xPos=$[$xPos-$monitorWidth]
        i=$[$i+1]
    done
    echo $i
}

function getActiveWindowPositionOneMonitorToTheLeft
{
    monitorWidth=$(getMonitorWidth)
    currentMonitor=$(getActiveWindowCurrentMonitor)
    activeWinID=$(getActiveWindowID)
    xPos=$(getActiveWindowHorizontalPosition)
    xPos=$[$xPos-$monitorWidth]
    echo $xPos
}

function getActiveWindowPositionOneMonitorToTheRight
{
    monitorWidth=$(getMonitorWidth)
    numberOfMonitors=$(getNumberOfMonitors)
    currentMonitor=$(getActiveWindowCurrentMonitor)
    activeWinID=$(getActiveWindowID)
    xPos=$(getActiveWindowHorizontalPosition)
    xPos=$[$xPos+$monitorWidth]
    echo $xPos
}

function changeActiveWindowMonitor
{
    activeWinID=$(getActiveWindowID)
    if [ $1 -eq &quot;0&quot; ]
    then
        newXPos=$(getActiveWindowPositionOneMonitorToTheLeft)
        newXPos=$[$newXPos-5]
    else
        newXPos=$(getActiveWindowPositionOneMonitorToTheRight)
        newXPos=$[$newXPos-5]
    fi

    winState=$(xprop -id ${activeWinID} | grep &quot;_NET_WM_STATE(ATOM)&quot; )

    if [[ `echo ${winState} | grep &quot;_NET_WM_STATE_MAXIMIZED_HORZ&quot;` != &quot;&quot; ]]
        then
        maxH=1
        wmctrl -i -r ${activeWinID} -b remove,maximized_horz
    fi

    if [[ `echo ${winState} | grep &quot;_NET_WM_STATE_MAXIMIZED_VERT&quot;` != &quot;&quot; ]]
        then
        maxV=1
        wmctrl -i -r ${activeWinID} -b remove,maximized_vert
    fi

    if [[ `echo ${winState} | grep &quot;_NET_WM_STATE_FULLSCREEN&quot;` != &quot;&quot; ]]
        then
        fulls=1
        wmctrl -i -r ${activeWinID} -b remove,fullscreen
    fi

    # move window (finally)
    wmctrl -i -r ${activeWinID} -e 0,${newXPos},-1,-1,-1

    # restore maximization
    ((${maxV})) &amp;&amp; wmctrl -i -r ${activeWinID} -b add,maximized_vert
    ((${maxH})) &amp;&amp; wmctrl -i -r ${activeWinID} -b add,maximized_horz
    ((${fulls})) &amp;&amp; wmctrl -i -r ${activeWinID} -b add,fullscreen

    # raise window (seems to be necessary sometimes)
    wmctrl -i -a ${activeWinID}

}

function moveActiveWindowOneMonitorToTheLeft
{
    changeActiveWindowMonitor 0
}

function moveActiveWindowOneMonitorToTheRight
{
    changeActiveWindowMonitor 1
}

&quot;$1&quot;

exit 0
</pre></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' 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'><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><pre class="brush:bash">scripts/./movewin.sh moveActiveWindowOneMonitorToTheRight</pre><p>and</p><pre class="brush:bash">scripts/./movewin.sh moveActiveWindowOneMonitorToTheLeft</pre><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'><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><pre class="brush:bash">gedit ~/.local/share/applications/defaults.list</pre><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><pre class="brush:bash">grep gedit /usr/share/applications/defaults.list | sed s/gedit/geany/g</pre><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><pre class="brush:bash">pkill nautilus</pre><p>Good luck, have fun and happy coding :)</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>2</slash:comments> </item> <item><title>I&#039;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'><img src='http://www.doknowevil.net/wp-content/uploads/2007/07/systemetrical_detrition-5b-150x150.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>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Object Caching 698/733 objects using disk

Served from: www.doknowevil.net @ 2012-02-04 03:57:48 -->
