<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>…for the adult in you &#187; Tools</title>
	<atom:link href="http://blogs.gnome.org/metacity/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/metacity</link>
	<description>"Many window managers are like Marshmallow Froot Loops; Metacity is like Cheerios."</description>
	<lastBuildDate>Wed, 04 Nov 2009 10:59:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>		<item>
		<title>Further thoughts on extending the window menu</title>
		<link>http://blogs.gnome.org/metacity/2009/07/16/further-thoughts-on-extending-the-window-menu/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/16/further-thoughts-on-extending-the-window-menu/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 01:06:49 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Thought experiments]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=620</guid>
		<description><![CDATA[The previous post about extending the window menu caused a great deal of discussion.  It would seem that our readers would be interested in an implementation.  Thomas is considering working on this after the window matching experiments are more stable.
Now, we can imagine that any package might want to add menu options when it [...]]]></description>
			<content:encoded><![CDATA[<p><a title="alpine strawberry by van swearingen, on Flickr" href="http://www.flickr.com/photos/vsny/152891728/"><img src="http://farm1.static.flickr.com/50/152891728_0674519ada.jpg" alt="alpine strawberry" width="500" height="333" align="right" /></a><a href="http://blogs.gnome.org/metacity/2009/07/13/the-window-menu/">The previous post about extending the window menu</a> caused a great deal of discussion.  It would seem that our readers would be interested in an implementation.  Thomas is considering working on this after the window matching experiments are more stable.</p>
<p>Now, we can imagine that any package might want to add menu options when it was installed, and delete them when it was removed.  Let us not concern ourselves for the moment with how a menu option and its effects are represented, other than assuming that it may be represented by an ASCII string. Rather, let us consider the ways in which a newly-installed application may wish to add menu options.  We are concerned with two kinds of menu option:</p>
<ul>
<li>∀: these appear on every window menu, for as long as the application is installed.  It need not be running.  For example, <em>Take screencast</em> should be available when <a href="http://live.gnome.org/Istanbul">Istanbul</a> is installed and removed when Istanbul is removed.</li>
<li>∃: these appear only on the menus of windows created by the application itself.  For example, <em>Play</em> should appear on <a href="http://projects.gnome.org/rhythmbox/">Rhythmbox</a>&#8217;s window menu, but not on other applications&#8217; menus, even if Rhythmbox is running.  (Otherwise, how would a user tell the difference between Rhythmbox&#8217;s <em>Play</em> and the <em>Play </em>of <a href="http://projects.gnome.org/totem/">Totem</a>?)</li>
</ul>
<p>Users should have the option of disabling any ∀ options which are currently installed; the full set of ∀ options would be available in some kind of settings dialogue where a decision could be made about which options belonged on the list.  It should be noted that <em>Minimize</em>, <em>Maximize</em>, <em>Close</em>, etc., are the ∀ of the window manager itself.</p>
<p>So, where should these settings be stored?</p>
<ul>
<li><strong>In X properties on windows:</strong> The ∀ options would be stored as properties on the root window, and the ∃ options as properties on the windows involved.  This would be the simplest to implement, but who has the responsibility to set the property on the root window, and where does the data come from?</li>
<li><strong>In GConf:</strong> This would only work for ∀ options.  It&#8217;s presumably a better plan than keeping them on the root window, though, and we could still use X properties for the ∃ options.</li>
<li><strong>In <a href="http://standards.freedesktop.org/desktop-entry-spec/latest/">/usr/share/applications/*.desktop</a>:</strong> This is the way which would integrate best with package management, but would cause rather a performance hit as all the .desktop files would need to be scanned when the WM started up, and then there would need to be some kind of particularly clever window matching to work out which .desktop file corresponded to which windows for ∃.</li>
</ul>
<p>Some kind of <strong>hybrid approach</strong> may be best: we could keep the ∀ menu options in .desktop files, and have a utility program that was run when any package was added or removed, to update GConf with the values.  Or perhaps this updating could be done in the control centre, when the user chose which subset of ∀ options they wanted.  Then we could keep ∃ options as properties on the windows, and rely on the toolkits to update them (perhaps even by <a href="http://library.gnome.org/devel/glib/stable/glib-Key-value-file-parser.html">parsing the application&#8217;s .desktop file</a>).</p>
<p><em>Photo © van swearingen, cc-by-nc-sa.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/16/further-thoughts-on-extending-the-window-menu/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Squib of the day: keys for windows</title>
		<link>http://blogs.gnome.org/metacity/2009/03/08/squib-of-the-day-keys-for-windows/</link>
		<comments>http://blogs.gnome.org/metacity/2009/03/08/squib-of-the-day-keys-for-windows/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:00:23 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[Switching]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=458</guid>
		<description><![CDATA[ GNOME bug 97725 raises the interesting idea of associating keys with windows.  Two differing approaches have been advocated:

Have a set of keys which work to &#8220;bookmark&#8221; windows, and a corresponding set of keys which mean &#8220;jump to bookmark n&#8220;.
Have a keystroke which means &#8220;bookmark this window using the key I&#8217;m about to press&#8221;, and [...]]]></description>
			<content:encoded><![CDATA[<p><a title="365 3/26: Going on a Key West adventure/bike ride by jpre86, on Flickr" href="http://www.flickr.com/photos/jennap/2374405247/"><img src="http://farm3.static.flickr.com/2074/2374405247_0b8463127f.jpg" alt="365 3/26: Going on a Key West adventure/bike ride" width="500" height="375" align="right" /></a> <a href='http://bugzilla.gnome.org/show_bug.cgi?id=97725' class='bug-link bug-link-gnome'>GNOME bug 97725</a> raises the interesting idea of associating keys with windows.  Two differing approaches have been advocated:</p>
<ol>
<li>Have a set of keys which work to &#8220;bookmark&#8221; windows, and a corresponding set of keys which mean &#8220;jump to bookmark <em>n</em>&#8220;.</li>
<li>Have a keystroke which means &#8220;bookmark this window using the key I&#8217;m about to press&#8221;, and allow users to press bookmark keystrokes in the <strong>alt+tab</strong> window.</li>
</ol>
<p>It is of course important that the bookmarks are associated with a given window indefinitely, otherwise they become a lot less useful.</p>
<p>As a step towards the second option, I&#8217;ve written a <em>very quick and hacky </em>script called <a href="http://bugzilla.gnome.org/attachment.cgi?id=130251"><strong>metacity-bookmark</strong></a>.  The name is a little misleading, because it should work with any EWMH window manager; it uses the window matching technique described in <a href="http://blogs.gnome.org/metacity/2008/11/02/window-matching/">this post</a>.  As usual, you&#8217;ll need <strong>X11::Protocol</strong> installed from CPAN (&#8221;<em>sudo cpan X11::Protocol</em>&#8220;).</p>
<p>Bind the program to some key or other, which we&#8217;ll call <strong>Bookmark</strong> from now on, and then you can do:</p>
<ul>
<li><strong>Bookmark + <em>key</em></strong> &#8212; jump to the window identified by <em>key</em></li>
<li><strong>Bookmark + Space + <em>key</em></strong> &#8212; identify the current window by <em>key</em></li>
</ul>
<p>Feel free to play with this and let me know what you think.  I&#8217;ve made little windows pop up to tell you the program was running, inspired by the &#8220;<a href="http://en.wikipedia.org/wiki/Compose_key">Compose</a>&#8221; indicator that used to appear onscreen on old DECs, if my memory serves.</p>
<p>One obvious limitation of the current script is that when it activates a window, it doesn&#8217;t switch to the workspace which the window&#8217;s on.  I may fix this another day when I fix all the other problems with this script, but if you fancy diving in and fixing it yourself, it shouldn&#8217;t be too hard.</p>
<p>As a possible extension to this, windows could also have bookmarks automatically associated with them from their creation, based on their name&#8211; for example, the first GIMP window could automatically be given &#8220;G&#8221;.  And either kind of bookmark could be displayed in the <strong>Alt+Tab</strong> switcher next to the associated window&#8217;s preview or icon.</p>
<p><em>Photo © jpre86, cc-by-nc-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/03/08/squib-of-the-day-keys-for-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Squib of the Day: Ctrl+Alt+Delete</title>
		<link>http://blogs.gnome.org/metacity/2009/03/05/squib-of-the-day-ctrl-alt-delete/</link>
		<comments>http://blogs.gnome.org/metacity/2009/03/05/squib-of-the-day-ctrl-alt-delete/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 00:00:33 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=410</guid>
		<description><![CDATA[ GNOME bug 130632 raises the idea of being able to put up the GNOME system monitor with a keystroke bound by default to Ctrl+Alt+Delete, as on Windows, so that users can kill applications and so on.  The usability people say this is fine as long as the system monitor gains a prominent logout button.  [...]]]></description>
			<content:encoded><![CDATA[<p><a title="CTRL+ALT+DEL Boat by Gone-Walkabout, on Flickr" href="http://www.flickr.com/photos/gone-walkabout/3054637347/"><img src="http://farm4.static.flickr.com/3284/3054637347_0bd0279f97.jpg" alt="CTRL+ALT+DEL Boat" width="375" height="500" align="right" /></a> <a href='http://bugzilla.gnome.org/show_bug.cgi?id=130632' class='bug-link bug-link-gnome'>GNOME bug 130632</a> raises the idea of being able to put up the <a href="http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-sysinfo-memory-usage.html">GNOME system monitor</a> with a keystroke bound by default to <strong>Ctrl+Alt+Delete</strong>, as on Windows, so that users can kill applications and so on.  The usability people say this is fine as long as the system monitor gains a prominent logout button.  This has been raised against the system monitor as  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=143235' class='bug-link bug-link-gnome'>GNOME bug 143235</a>.  Perhaps, gentle reader, we should add the keystroke anyway and not wait indefinitely for the system monitor maintainers to add the button.</p>
<p><em>Update:</em>  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=99335' class='bug-link bug-link-gnome'>GNOME bug 99335</a> is also asking for a keybinding to log out, and someone has suggested <strong>Ctrl+Alt+Delete</strong>.  Perhaps the two could be fixed at a stroke.</p>
<p><em>Update:</em>  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=131617' class='bug-link bug-link-gnome'>GNOME bug 131617</a> is asking for a keybinding to <a href="http://www.xfree86.org/current/xkill.1.html">xkill</a> or <a href="http://svn.gnome.org/viewvc/gnome-panel/trunk/gnome-panel/panel-force-quit.c?view=markup">its equivalent in the panel</a>, which could also be fixed by having a keybinding like the one discussed above.</p>
<p><em>Photo © Gone-Walkabout, cc-by-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/03/05/squib-of-the-day-ctrl-alt-delete/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Quick mention: a theme editor</title>
		<link>http://blogs.gnome.org/metacity/2009/02/23/quick-mention-a-theme-editor/</link>
		<comments>http://blogs.gnome.org/metacity/2009/02/23/quick-mention-a-theme-editor/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 12:20:29 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Themes]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=400</guid>
		<description><![CDATA[Someone is working on a Metacity theme editor called Metacity Themer.  It appears to take rather a different approach from Opacity; it&#8217;ll be interesting to see how this turns out.  I&#8217;m not sure whether I should abandon Opacity; I wasn&#8217;t working on it anyway much (though I had thought about it quite a [...]]]></description>
			<content:encoded><![CDATA[<p>Someone is <a href="http://ubuntuforums.org/showthread.php?t=1077875">working on</a> a Metacity theme editor called <a href="http://launchpad.net/mct">Metacity Themer</a>.  It appears to take rather a different approach from <a href="http://blogs.gnome.org/metacity/2009/01/12/half-finished-code-finishing-marathon-time/">Opacity</a>; it&#8217;ll be interesting to see how this turns out.  I&#8217;m not sure whether I should abandon Opacity; I wasn&#8217;t working on it anyway much (though I had thought about it quite a bit) and I don&#8217;t really have time to finish a theme editor anyway with the amount of work that Metacity needs, so Opacity would have been a while off prime time anyway.  Let us know what you think of Metacity Themer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/02/23/quick-mention-a-theme-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>another crazy idea</title>
		<link>http://blogs.gnome.org/metacity/2009/02/07/another-crazy-idea/</link>
		<comments>http://blogs.gnome.org/metacity/2009/02/07/another-crazy-idea/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 22:52:38 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Switching]]></category>
		<category><![CDATA[Thought experiments]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=383</guid>
		<description><![CDATA[Almost everything we bind keys to could be done with an external application via EWMH, and on my computer there&#8217;s no perceptible speed penalty.  (I&#8217;m sure there is on slower machines.)  Perhaps there should be a configure switch not to include the code to do everything except the things which pop up switchers (and another [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Tomy Switch Switch controls by Telstar Logistics, on Flickr" href="http://www.flickr.com/photos/telstar/2488859536/"><img src="http://farm4.static.flickr.com/3026/2488859536_1e14a9b349.jpg" alt="Tomy Switch Switch controls" width="500" height="386" align="right" /></a>Almost everything we bind keys to <em>could</em> be done with an external application via EWMH, and on my computer there&#8217;s no perceptible speed penalty.  (I&#8217;m sure there is on slower machines.)  Perhaps there should be a configure switch <em>not</em> to include the code to do everything except the things which pop up switchers (and another switch not to include those, in case you use superswitcher) and then we could supply a separate executable for people who&#8217;d turned them off, so that pressing the &#8220;move to workspace right&#8221; key actually did &#8220;metacity-move &#8211;right&#8221; or something.  Maybe it would reduce the memory footprint on faster machines.  Maybe on the other hand it wouldn&#8217;t be worth the trouble.</p>
<p><em>Photo © Telstar Logistics, cc-by-nc.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/02/07/another-crazy-idea/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Squib of the day: walk through workspaces</title>
		<link>http://blogs.gnome.org/metacity/2009/02/07/squib-of-the-day-walk-through-workspaces/</link>
		<comments>http://blogs.gnome.org/metacity/2009/02/07/squib-of-the-day-walk-through-workspaces/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 21:55:39 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[Switching]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=379</guid>
		<description><![CDATA[I don&#8217;t know why switching continues to be a source of squibs, but there it is.  In  GNOME bug 570817 someone is suggesting a way to walk through workspaces (presumably only populated ones, but that&#8217;s not clear) in the same way that hitting and immediately releasing alt-tab moves you to the next window without [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Lightswitch by HeatedGroundPhotography, on Flickr" href="http://www.flickr.com/photos/heatedground/1586903652/"><img src="http://farm3.static.flickr.com/2392/1586903652_bd3f16848a.jpg" alt="Lightswitch" width="500" height="334" align="right" /></a>I don&#8217;t know why switching continues to be a source of squibs, but there it is.  In  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=570817' class='bug-link bug-link-gnome'>GNOME bug 570817</a> someone is suggesting a way to walk through workspaces (presumably only populated ones, but that&#8217;s not clear) in the same way that hitting and immediately releasing alt-tab moves you to the next window without regard to where it is.</p>
<p>Of course again we could solve this simply with an external script, and I&#8217;m wondering whether there should be a Bugzilla status for <tt>RESOLVED CANFIXWITHASCRIPT</tt>.</p>
<p>More seriously, perhaps there should be a collection of these scripts and a master script which listed them all in a dialogue box and modified the user&#8217;s GConf settings according to which ones were turned on.  (I wonder whether the control-center people would object to having this in an &#8220;Advanced&#8221; button somewhere, or whether that&#8217;s too bells-and-whistly.)</p>
<p>Update: Since the script was so simple, <a href="http://bugzilla.gnome.org/attachment.cgi?id=128195&amp;action=view">I spent twenty minutes writing it</a> and closed the bug.  I think this demonstrates that we need a Perl module called <em>X11::Protocol::Extended</em> which knows about the EWMH, so these scripts are even easier to write.  Maybe I&#8217;ll write it.</p>
<p><em>Photo © Heated Ground Photography, cc-by-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/02/07/squib-of-the-day-walk-through-workspaces/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Some of the tools</title>
		<link>http://blogs.gnome.org/metacity/2009/02/03/some-of-the-tools/</link>
		<comments>http://blogs.gnome.org/metacity/2009/02/03/some-of-the-tools/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 23:00:27 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=348</guid>
		<description><![CDATA[Here are some of the tools that ship in the tools directory of Metacity:
announce-wrangler.py
is the script that produces release announcements in both text form (for gnome-announce-list) and HTML (for posts like this one).  It needs some polishing.
commit-wrangler.py
puts up an editor for a ChangeLog entry, then commits current changes.  It used to be far more complicated, [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Buttermere Star Trails by Horrgakx, on Flickr" href="http://www.flickr.com/photos/horrgakx/2981871735/"><img src="http://farm4.static.flickr.com/3202/2981871735_3f429444e3.jpg" alt="Buttermere Star Trails" width="333" height="500" align="right" /></a>Here are some of the tools that ship in the tools directory of Metacity:</p>
<p><strong><a href="http://svn.gnome.org/viewvc/metacity/trunk/tools/announce-wrangler.py?view=markup">announce-wrangler.py</a></strong><br />
is the script that produces release announcements in both text form (for gnome-announce-list) and HTML (for <a href="http://blogs.gnome.org/metacity/2009/02/01/2-25-144/">posts like this one</a>).  It needs some polishing.</p>
<p><strong><a href="http://svn.gnome.org/viewvc/metacity/trunk/tools/commit-wrangler.py?view=markup">commit-wrangler.py</a><br />
</strong>puts up an editor for a ChangeLog entry, then commits current changes.  It used to be far more complicated, but now it&#8217;s merely a wrapper around a couple of calls to <a href="http://thomas.apestaart.org/moap/trac">moap</a>.  Stable.</p>
<p><strong><a href="http://svn.gnome.org/viewvc/metacity/trunk/tools/patch-wrangler.py?view=markup">patch-wrangler.py</a><br />
</strong>given an attachment number on GNOME Bugzilla, checks out Metacity trunk, downloads the given patch, applies it, and compiles.  Stable, but it would be nice if it could pick up the author&#8217;s name and email address for the ChangeLog too.  That will probably have to wait for a scriptable GNOME Bugzilla.</p>
<p><strong><a href="http://svn.gnome.org/viewvc/metacity/trunk/tools/ppa-magic.py?view=markup">ppa-magic.py</a><br />
</strong>is supposed to build personal package archives for Launchpad with nightly builds in.  It doesn&#8217;t work at present.</p>
<p><strong><a href="http://svn.gnome.org/viewvc/metacity/trunk/tools/commit-wrangler.py?view=markup">release-wrangler.py</a></strong><br />
is our release script; it helps prepare the NEWS update from the ChangeLog, distchecks, builds, and uploads, but doesn&#8217;t actually run the update script on the server.  I did think of replacing this with <a href="http://search.cpan.org/dist/ShipIt/">ShipIt</a> at some point, but their model is too different from ours.  Stable.</p>
<p>There&#8217;s also <strong>blog-wrangler.py</strong> which isn&#8217;t shipped, and produces the <a href="http://blogs.gnome.org/metacity/category/journal/">Metacity Journal</a>, and is being gradually replaced by a more general version in Perl called ProjectJournal.  Also, the Perl module <a href="http://search.cpan.org/~marnanel/Flickr-Embed-0.01/">Flickr::Embed</a> grew out of the same project, though it isn&#8217;t yet in use.</p>
<p><em>Photo © Horrgakx, cc-by-nc-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/02/03/some-of-the-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You can switch in a direction!</title>
		<link>http://blogs.gnome.org/metacity/2009/01/30/you-can-switch-in-a-direction/</link>
		<comments>http://blogs.gnome.org/metacity/2009/01/30/you-can-switch-in-a-direction/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 01:17:15 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bugs and issues]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Switching]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=328</guid>
		<description><![CDATA[When I posted yesterday&#8217;s squib, I really didn&#8217;t expect six people to say they&#8217;d use it.  Someone plaintively left a message on the bug saying &#8220;Please make it possible for devilspie to add this feature!&#8221;  Well, it is possible for devilspie or any other addon to add this feature, and for that reason [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Bridge by tajasel, on Flickr" href="http://www.thisiskatie.co.uk"><img src="http://www.thisiskatie.co.uk/wp-content/uploads/2009/01/oxfordbridge.jpg" alt="Bridge" width="500" height="332" align="right" /></a>When I posted <a href="http://blogs.gnome.org/metacity/2009/01/28/squib-of-the-day-move-in-a-direction/">yesterday&#8217;s squib</a>, I really didn&#8217;t expect six people to say they&#8217;d use it.  Someone plaintively left a message on the bug saying &#8220;Please make it possible for devilspie to add this feature!&#8221;  Well, it <em>is</em> possible for devilspie or any other addon to add this feature, and for that reason it&#8217;s not a big difficulty to write it as an external script.  As an added bonus, it should work with Compiz or KWin or any other EWMH-aware window manager.</p>
<p>To play with the script:</p>
<ol>
<li>Download the current version from  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=152661' class='bug-link bug-link-gnome'>GNOME bug 152661</a>.</li>
<li>Put it in your path as <em>metacity-direction</em>.</li>
<li>Install X11::Protocol by typing:<br />
<em>sudo cpan X11::Protocol</em></li>
<li>Open gconf-editor and set /apps/metacity/keybinding_commands/command_<em>n</em>, where <em>n</em> is any set of four unused values, to:<br />
<em>metacity-direction e<br />
</em><em>metacity-direction s<br />
</em><em>metacity-direction w<br />
</em><em>metacity-direction n</em></li>
<li>Set /apps/metacity/global_keybindings/run_command_<em>n</em> to an appropriate set of values, like &#8220;&lt;Shift&gt;&lt;Alt&gt;Right&#8221;, etc.</li>
<li>Enjoy.</li>
</ol>
<p>The algorithm is supposed to be the same as fvwm&#8217;s, but if you have suggestions for tweaking it, let me know.  The program should also demonstrate how to do fun EWMH things from Perl.</p>
<p><em>Photo (c) Katie Sutton, cc-by-nc-sa.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/01/30/you-can-switch-in-a-direction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Half-finished code finishing marathon time</title>
		<link>http://blogs.gnome.org/metacity/2009/01/12/half-finished-code-finishing-marathon-time/</link>
		<comments>http://blogs.gnome.org/metacity/2009/01/12/half-finished-code-finishing-marathon-time/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 00:57:46 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bugs and issues]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Thought experiments]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=249</guid>
		<description><![CDATA[I have several half-finished bits of code lying around.  I think I&#8217;ll make an effort to merge them in, at least in test branches, to see what people think.  (When we get a DVCS, this will be easier.)

Veracity, a test suite.  This is about two-thirds done, but will require a bit of autotools magic to [...]]]></description>
			<content:encoded><![CDATA[<p>I have several half-finished bits of code lying around.  I think I&#8217;ll make an effort to merge them in, at least in test branches, to see what people think.  (When we get a DVCS, this will be easier.)</p>
<ol>
<li><strong>Veracity</strong>, a test suite.  This is about two-thirds done, but will require a bit of autotools magic to link into the main build process.  I may need some help with that.</li>
<li><strong>Window matching:</strong> something to <a href="http://blogs.gnome.org/metacity/2008/11/02/window-matching/">remember window positions across sessions</a>.  There&#8217;s been a few requests for it recently (most recently , <a href='https://launchpad.net/bugs/311615' class='bug-link bug-link-launchpad'>Launchpad bug 311615</a>).  We&#8217;ve always said we wouldn&#8217;t do this, but maybe there&#8217;s no harm done in trying it in a branch as an experiment.</li>
<li><strong>Opacity</strong>, a simple WYSIWYG theme editor.  About a quarter to a third of it is written.  Probably would be best to make this a separate project.<br />
<img src="http://www.gnome.org/~tthurman/pics/metacity/opacity-prealpha.png" alt="" /></li>
<li><strong>Actions</strong>.  The idea has often come up (e.g . <a href='http://bugzilla.gnome.org/show_bug.cgi?id=345233' class='bug-link bug-link-gnome'>GNOME bug 345233</a>) that if there&#8217;s something you can bind a keystroke to, you should be able to put it into the window menu or <a href="http://blogs.gnome.org/metacity/2008/12/22/extra-buttons/">make it a titlebar button</a> or whatever.  This may be over-configurable, but there may be advantages of a simplified architecture in making it possible at all.  There&#8217;s experimental code to do this, but it&#8217;s about half done.</li>
<li><strong>&#8220;Cringe&#8221;</strong>: how much can we avoid keeping in memory at once?  This is an answer to what I think is our oldest current bug , <a href='http://bugzilla.gnome.org/show_bug.cgi?id=144242' class='bug-link bug-link-gnome'>GNOME bug 144242</a>.  Saving a few bytes here and there per window can really add up.  I&#8217;ve done a small amount of playing around with this, but more is needed.  Having Veracity working will really make this easier because then we&#8217;ll just be able to run a stress test inside valgrind.</li>
</ol>
<p>Gentle reader, which should be moved out of Metacity Labs first?</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/01/12/half-finished-code-finishing-marathon-time/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Thought experiments: plugins</title>
		<link>http://blogs.gnome.org/metacity/2008/08/01/mostly-about-curry-in-fact/</link>
		<comments>http://blogs.gnome.org/metacity/2008/08/01/mostly-about-curry-in-fact/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 01:28:37 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/2008/08/01/mostly-about-curry-in-fact/</guid>
		<description><![CDATA[Recently, Markus Weißbacher raised  GNOME bug 545627 to ask for a new menu option which suspended a window&#8217;s owning process.  Now, it&#8217;s not particularly difficult to do this, and to some people (presumably Markus, at least) it&#8217;s useful, but there are hundreds of things we could put on the window menu, and if [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/77074420@N00/198347900/" title="Train'n'tunnel by lakesidey, on Flickr"><img src="http://farm1.static.flickr.com/73/198347900_b97212f1c2.jpg" alt="Train'n'tunnel" width="375" align="right" height="500" /></a>Recently, Markus Wei<span class="fn n">ß</span>bacher raised  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=545627' class='bug-link bug-link-gnome'>GNOME bug 545627</a> to ask for a new menu option which <a href="http://en.wikipedia.org/wiki/SIGTSTP">suspended</a> a window&#8217;s owning process.  Now, it&#8217;s not particularly difficult to do this, and to some people (presumably Markus, at least) it&#8217;s useful, but there are hundreds of things we <em>could</em> put on the window menu, and if we put them all on, it would end up looking like a restaurant menu with hundreds of choices (especially with sub-menus&#8211; you know, biryani linking to chicken biryani, prawn biryani, and so on, vindaloo to lamb vindaloo, and&#8230; sorry, I got kind of distracted there).  This is nice if you know what you&#8217;re doing, but it does rather terrify the users, and if you know you want one out of a small number of things every day it might be faster for you to pick from a cut-down lunch menu.  Do excuse me; I like this analogy, and there might be barfi at the end of it.</p>
<p>We could provide code for all the hundred-odd options, and then let the user choose between them in a vast gconf directory of doom, and that would solve the problem of having to show them all for everyone.  But Metacity is supposed to be a lightweight window manager, and including all that extra code will make us even less lightweight than we are.  For the same reason, the solution is <em>not</em> to embed <a href="http://www.gnu.org/software/guile/guile.html">a Scheme interpreter</a> so people can write plugins for all the menu options they want.  Nor are we going to have something like <a href="https://addons.mozilla.org/en-US/firefox/">Firefox&#8217;s plugin system</a> where the extensions handling each menu option would run in-process, rendering a previously stable window manager more brittle than a poppadom&#8230; sorry, distracted again.</p>
<p>So suppose we wanted to let users add options to the Metacity window menu in some kind of configuration file (ah! then we could let libwnck read the same file!), or a place in gconf, and to invoke something out of process when the user chose one of them.  I see three ways to proceed:</p>
<ul>
<li>Fork and exec something.  This is an extremely simple and nicely general solution, though the mechanics of figuring out what information is passed to the exec&#8217;d process needs some thought.  We already do something like this for certain keybindings, so perhaps we can just generalise that.</li>
<li>X messages to the root window which are then picked up by a daemon.  Not a bad idea, and in fact we do a lot of things this way already (many of them undocumented&#8211; ooh, an idea for a forthcoming post).  This does require either one daemon to be running all the time, which means if it crashes nothing will respond, or a bunch of them, which is a bit of a resource hog.</li>
<li><a href="http://www.freedesktop.org/wiki/Software/dbus">D-Bus.</a> This has the great advantage over X messages that if the handler isn&#8217;t running <a href="http://raphael.slinckx.net/blog/documents/dbus-tutorial">the bus will start it</a>, and the handler can do its work and then softly and silently vanish away without ever hanging around as a daemon.</li>
</ul>
<p>As well as adding new menu operations, this could be used to add new operations on <a href="http://www.google.com/search?q=%22that+annual+blister%22">that annual blister</a>, middle-click and double-click on the titlebar.  Perhaps the idea could even be used to add new button actions, although adding new <em>types of</em> buttons with the current theme version is generally impossible, because all themes must describe all types of buttons and all types of buttons must be described by all themes.</p>
<p>Translation work would need to be carefully coordinated with such a system, too, especially if we started moving existing actions (which are all already translated) out of the code and into the list.</p>
<p>So, anyway, this was my thought experiment for the day.  I&#8217;m not necessarily going to do anything about it, or at least not now, but I thought it might be a simple way for people to get what they wanted without the risk of messing up the world for everyone else.</p>
<p><em>Photo by Lakesidey. cc-by-nc-sa.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2008/08/01/mostly-about-curry-in-fact/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
