<?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>BigSmoke &#187; X</title>
	<atom:link href="http://blog.bigsmoke.us/tag/x/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bigsmoke.us</link>
	<description>Smokes your problems, coughs fresh air.</description>
	<lastBuildDate>Sat, 04 Feb 2012 18:03:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gentoo auto-login and startx</title>
		<link>http://blog.bigsmoke.us/2010/06/20/auto-login-startx</link>
		<comments>http://blog.bigsmoke.us/2010/06/20/auto-login-startx#comments</comments>
		<pubDate>Sat, 19 Jun 2010 22:32:09 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[auto-login]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[GRUB]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[XDM]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1440</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t believe in system passwords if they&#8217;re not backup by some type of disk encryption. It&#8217;s simply too easy to circumvent by changing a few boot parameters or by inserting a good boot disk. For performance reasons, I&#8217;ve decided against using full-disk encryption for my laptop and even against encryption for my home folder. This makes typing in a password to login a mere annoyance.  Admittedly, my laptop features a fingerprint reader, but at the time I couldn&#8217;t get it to work and it still requires me to type in my username, which I find just as superfluous. Also, fingerprints aren&#8217;t that secure either.</p>

<p>For ages now, I&#8217;ve just wanted to be automatically logged in and greeted by an X session when I boot, especially since my xdm died after some upgrade about a year ago or so ago. For how much time I spend with this machine, I&#8217;m amazed how long it takes me before deciding that logging in in the console and typing <tt>startx</tt> might be not such a good idea.</p>

<p>(It probably has everything to do with “conditionality”. I tell myself, for example, that before ditching xdm (which is one of the few X login managers which <em>doesn&#8217;t</em> support auto login), I first need to get it to work again to make a screenshot of my “cute” configuration. Can&#8217;t kill my darlings; never could.)</p>

<p>So fuck all that. I&#8217;m too lazy to resurrect my darling, no matter how cute, so I took a look <a href="http://www.gentoo-wiki.info/TIP_Passwordless_Login">at this</a> and added to following to <tt>/etc/conf.d/local.start</tt>:</p>

<pre class="bash"><span style="color: #808080; font-style: italic;"># Start X as user if tty7 is free</span>
<span style="color: #b1b100;">if</span> ! fuser /dev/tty7 &gt;&amp; /dev/null; <span style="color: #b1b100;">then</span>
    su - bigsmoke -l -c <span style="color: #ff0000;">'exec startx -- vt7 &gt;&amp; ~/.xsession-errors'</span> &amp;
<span style="color: #b1b100;">fi</span></pre>

<p>Done. Maybe I&#8217;ll also decide to make all my console sessions auto-login, if I can be arsed, that is.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/06/20/auto-login-startx/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Awesome window manager</title>
		<link>http://blog.bigsmoke.us/2010/05/02/awesome-window-manager</link>
		<comments>http://blog.bigsmoke.us/2010/05/02/awesome-window-manager#comments</comments>
		<pubDate>Sun, 02 May 2010 19:48:48 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Awesome]]></category>
		<category><![CDATA[window manager]]></category>
		<category><![CDATA[WM]]></category>
		<category><![CDATA[X]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1377</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m officially a convert. I finally went from a floating-only window manager to a tiling window manager. And it does floating too! <a href="http://awesome.naquadah.org/">Awesome</a> seems to be everything that <a href="http://www.windowmaker.info/">Window Maker</a> just couldn&#8217;t be for me.</p>

<p>For a very long time I&#8217;ve <a href="http://blog.bigsmoke.us/2009/03/30/wmaker">known</a> that a tiling WM would probably be nicer for me, but there were quite a few to choose from. After looking at the likes of Ion, I ended up looking at Ratpoison when I noticed that the successor to Ratpoison, StumpWM, was based on LISP. Since I never could get the hang of Emacs, this looked like another excellent opportunity to learn LISP.</p>

<p>Sadly, StumpWM is quite a piece of crap with only a very limited feature set and some initial stumbling blocks I just couldn&#8217;t get over. My first enthusiasm was tempered by some random errors and my inability to configure it in such a way that I could use my Windows key (Mod4) instead of the GNU Screen like <kbd>Ctrl-f</kbd> prefix. It turned out that I <em>could</em use the Mod4 modifier but not <em>just</em> the Mod4 modifier. StumpWM seemed to insist on me using a kind of prefix made of any number of modifiers combined with a regular key.</p>

<p>Luckily, I came across <a href="http://awesome.naquadah.org/">Awesome</a>, which, until now, really seems <em>awesome</em>.</p>

<p>The default configuration comes with a lot of niceness right away.</p>

<p>One thing I particularly like are its default key bindings, mostly because they all use some combination of the Windows/Mod4 key. Some defaults are even exactly the same as I had configured them in Window Maker, such as <kbd>Mod4-r</kbd> to type the name of a program to execute and <kbd>Mod-1</kbd> through <kbd>Mod-9</kbd> to switch between Workspaces called tags in Awesome. For as far as the key bindings are different, I actually like them more than what I&#8217;ve used before. Most of the key bindings, however, are of course new because they simply weren&#8217;t available in Window Maker (or other tiling window managers), often much to my chagrin.</p>

<p>I thought that when switching to a tiling window manager, I&#8217;d probably have to get something like Gkrellm for my system monitors and system tray and such, but Awesome actually sports many of these. The Gentoo default configuration even has the system tray already enabled in the statusbar. This is particularly nice because of the <a href="http://blog.bigsmoke.us/2009/04/08/wmsystray">crappyness of the available systray DockApps for Window Maker</a> that I had gotten used to.</p>

<p>I&#8217;m not yet done playing with Awesome. I like that I probably will never stop tuning it to my preferences and the Lua configuration format means I don&#8217;t have to. It&#8217;s a modern window manager which supports the latest FreeDesktop standards and it is infinitely lean, mean and flexible. What&#8217;s not to like? I&#8217;ll comment when I find out. <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/05/02/awesome-window-manager/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XSel, for command-line operations on X selections</title>
		<link>http://blog.bigsmoke.us/2010/01/31/xsel</link>
		<comments>http://blog.bigsmoke.us/2010/01/31/xsel#comments</comments>
		<pubDate>Sun, 31 Jan 2010 21:44:56 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[CLIPBOARD]]></category>
		<category><![CDATA[PRIMARY]]></category>
		<category><![CDATA[VIM]]></category>
		<category><![CDATA[wxcopy]]></category>
		<category><![CDATA[wxpaste]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[XSel]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1135</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Since I first learned that Windowmaker installs two command-line tools,
<a href="http://linux.die.net/man/1/wxcopy"><tt>wxcopy</tt></a> and <a href="http://linux.die.net/man/1/wxpaste"><tt>wxpaste</tt></a>, to play around with X selections, I have wanted to be able to make and use X selections from my Bash shell. <tt>wxcopy</tt> and <tt>wxpaste</tt> never did what I expected them to do, so I gave up until recently I learned about all the different X selections.</p>

<p>By default, <tt>wxcopy</tt> and <tt>wxpaste</tt> operate on the <tt>CUT_BUFFER[n]</tt> selections. These are deprecated. That&#8217;s why I could never make it work, because modern applications use only CLIPBOARD and SELECTION. So, <tt>wxcopy</tt> is pretty useless (unless its used to copy something to paste with wxpaste). With this knowledge <tt>wxcopy</tt> <em>does</em> seem useful thanks to its <tt>-selection [selection-name]</tt> flag, but this doesn&#8217;t seem to work; I only get the contents of CUT_BUFFER. This is not how the feature is advertised:</p>

<blockquote><dl><dt><strong><tt>-selection [selection-name]</tt></strong></dt>
<dd>The data will be copied from the named selection. If cutting from the selection fails, the cutbuffer will be used. The default value for the selection name is PRIMARY.</dd></blockquote>

<h2>Enter XSel</h2>

<p>Fortunately, there&#8217;s <a href="http://www.vergenet.net/~conrad/software/xsel/">XSel</a> by <a href="http://www.kfish.org/">Conrad Parker</a>, a program which made him passionately <a href="http://lists.slug.org.au/archives/slug-chat/2001/July/msg00054.html">hate</a> the ICCCM.</p>

<p>XSel does exactly what it advertises. I&#8217;m actually surprised that I never heard of it before. It&#8217;s available in <a href="http://packages.gentoo.org/package/x11-misc/xsel">Gentoo</a>, <a href="http://packages.debian.org/xsel">Debian</a> and <a href="http://packages.ubuntu.com/xsel">Ubuntu</a>, so it&#8217;s a breeze to install.</p>

<p>Among its features are: <strong><tt>--append</tt></strong>, <strong><tt>--follow</tt></strong>, <strong><tt>--clear</tt></strong>, <strong><tt>--delete</tt></strong> (very weird, but logical if you understand X IPC), <strong><tt>--primary</tt></strong>, <strong><tt>--secondary</tt></strong>, <strong><tt>--clipboard</tt></strong>, <strong><tt>--keep</tt></strong>, and <strong><tt>--exchange</tt></strong>. Read the man page for more. It&#8217;s an excellent read.</p>

<p>One of the places where I&#8217;m going to use this tool is when copy-pasting to and from VIM. I really like how this compares to using <tt>:insert</tt> or <tt>:r!cat</dev/tty</tt> and then using the pointer to paste (or <kbd>(Shift+)Insert</kbd> with <a href="http://blog.bigsmoke.us/2010/01/31/xterm-clipboard-selection">my custom XTerm config</a>). Now, to paste something in VIM, I can simply type:</p>

<pre>
:r!xsel
</pre>

<p id="vim-copy">I use the following to copy any amount of text from VIM. This works much better than fooling around with the mouse:</p>

<pre>
:'>,'> !tee >(xsel -i)
</pre>

<p>The <q><tt>'>,'></tt></q> range is entered automatically if you press <kbd>:</kbd> while in visual (selection) mode. You could enter any range there, or even <tt>%</tt> to select the whole file. To copy to the CLIPBOARD instead of the PRIMARY, use <q><tt>xsel -i -b</tt></q> in the above example.</p>

<p>If someone know of a way to make VIM pipe something to a program without replacing the given range with that program's output, I could simplify this…</p>

]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/01/31/xsel/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Copy-pasting to and from XTerms</title>
		<link>http://blog.bigsmoke.us/2010/01/31/xterm-clipboard-selection</link>
		<comments>http://blog.bigsmoke.us/2010/01/31/xterm-clipboard-selection#comments</comments>
		<pubDate>Sun, 31 Jan 2010 18:17:42 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CLIPBOARD]]></category>
		<category><![CDATA[PRIMARY]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[XTerm]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=869</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>By default, XTerms only supports the PRIMARY selection for copy and paste. The PRIMARY selection is the one that is used by most ‘modern’ X application when you select text. This text can then usually be pasted by clicking the middle/second mouse button. Because this selection is set whenever you select, it&#8217;s easily overwritten, often accidentally. That&#8217;s why most newer X apps offer a parallel copy/paste mechanism where the selection is only explicitly set by choosing “Cut” or “Copy” from the application&#8217;s “Edit” menu or from its context menu (or with the <kbd>Control-X/C/V</kbd> keyboard shortcuts). In X, this selection is called CLIPBOARD, just like in Windows where it&#8217;s the only selection.</p>

<p>X also has these selections called Cut Buffers, but these are considered obsolete. Maybe that&#8217;s just too bad, because they appear to be the only selections with persistence; the other selections, PRIMARY and CLIPBOARD, disappear when the application is quit. Apparently, this is a <em>feature</em>, because it enables <em>content negotiation</em>.</p>

<p>Anyway, XTerm can be configured to do anything and I want it to be CLIPBOARD aware, for two reasons: one is that I often copy things from applications that can <em>only</em> set the CLIPBOARD selection; another is that I want to be able to really <strong>copy</strong> something <em>from</em> the XTerm, without losing it as soon as I select something else (especially if that something else is something I want to replace with the selection).</p>

<p>So, I added the following to my <tt>VT100.Translations</tt> <tt>#override</tt> in <tt>.Xdefaults.XTerm</tt>:</p>

<pre>
XTerm*VT100.Translations: #override \
    Shift<Key>Insert: insert-selection(CLIPBOARD) \n\
    <Key>Insert: insert-selection(PRIMARY) \n\
    Shift<Btn2Up>: insert-selection(CLIPBOARD) \n\
    Shift<Btn1Down>: select-start() \n\
    Shift<Btn1Motion>: select-extend() \n\
    Shift<Btn1Up>: select-end(CLIPBOARD)
</pre>

<p>What this does:</p>

<ul>
<li>This gives me an XTerm that pastes the content of the CLIPBOARD when I hold down <kbd>Shift</kbd> during my two-finger tab (I&#8217;m using a touchpad, so that works as a <tt>Btn2</tt>).</li>
<li>Because I don&#8217;t like moving my hands, I can do the same by pressing <kbd>Shift+Insert</kbd>.</li>
<li>I can use my <kbd>Insert</kbd> key without <kbd>Shift</kbd> to paste the PRIMARY selection.</li>
<li>To copy something to the clipboard, I hold down the <kbd>Shift</kbd> key while making the selection.</li>
</ul>

<p>That&#8217;s how you can make use of the CLIPBOARD from your XTerm.</p>

<h2>Sources</h2>

<p>If you want to learn more.</p>

<ul>
<li><a href="http://www.jwz.org/doc/x-cut-and-paste.html">X Selections, Cut Buffers, and Kill Rings</a> by Jamie Zawinski</li>
<li><a href="http://linux.seindal.dk/2005/06/16/xterm-and-the-clipboard/">Xterm and the clipboard</a> by René Seindal</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/01/31/xterm-clipboard-selection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Old Window Maker screenshot from April 2004</title>
		<link>http://blog.bigsmoke.us/2009/11/10/windowmaker-workspace-20040404</link>
		<comments>http://blog.bigsmoke.us/2009/11/10/windowmaker-workspace-20040404#comments</comments>
		<pubDate>Tue, 10 Nov 2009 11:23:41 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[wmaker]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=871</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>While cleaning up old images, I came across a screenshot of an old Window Maker configuration that I ran in 2004. It looks a bit different from my <a href="http://blog.bigsmoke.us/2009/03/30/wmaker">current configuration</a>, but not <em>that</em> different, which just goes to say how little Window Maker has changed in the last five years. The main difference I see in terms of Window Maker capabilities is that Window Maker now has font anti-aliasing support.</p>

<p>I notice that I was actually using VIM&#8217;s folding support at the time. Also, it&#8217;s funny to see that I was in the middle of the development of a (now stale, even more badly written) fork of phpBB.</p>

<div id="attachment_872" class="wp-caption alignnone" style="width: 1034px"><a href="http://blog.bigsmoke.us/uploads/2009/11/windowmaker-1280x960-20040404.png"><img src="http://blog.bigsmoke.us/wp-factory/../uploads/2009/11/windowmaker-1280x960-20040404-1024x768.png" alt="Window Maker Workspace (2004)" title="windowmaker-1280x960-20040404" width="1024" height="768" class="size-large wp-image-872" /></a><p class="wp-caption-text">Window Maker Workspace (2004)</p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/11/10/windowmaker-workspace-20040404/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring X input devices through HAL</title>
		<link>http://blog.bigsmoke.us/2009/09/20/x-input-hal</link>
		<comments>http://blog.bigsmoke.us/2009/09/20/x-input-hal#comments</comments>
		<pubDate>Sun, 20 Sep 2009 13:12:15 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[HAL]]></category>
		<category><![CDATA[Synaptics]]></category>
		<category><![CDATA[Touchpad]]></category>
		<category><![CDATA[X]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=734</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>When I went from X.org &lt; 7.3 to X.org &gt; 7.3, I had to make some changes to my X input configuration.</p>

<p>First of all, I had to replace <tt>x11-drivers/synaptics</tt> (<tt><a href="http://web.telia.com/~u89404340/touchpad/">http://web.telia.com/~u89404340/touchpad/</a></tt>) with the newer <tt>x11-drivers/xf86-input-synaptics</tt>, which is automatically installed if you set <tt>INPUT_DEVICES="${INPUT_DEVICES} synaptics"</tt> or if you add &#8220;<tt>x11-base/xorg-server input_devices_synaptics</tt>&#8221; to <tt>/etc/portage/package.use</tt>.

<p>Starting with X.org 7.3, you&#8217;re supposed to use HAL for all the X input configuration. All the <tt>"InputDevice"</tt> sections have to be removed from <tt>xorg.conf</tt> (and of course the references in <tt>"ServerLayout"</tt>). If you don&#8217;t want this, you can add the following options:</p>

<pre class="php">Section <span style="color: #ff0000;">&quot;ServerFlags&quot;</span>
  Option <span style="color: #ff0000;">&quot;AllowEmptyInput&quot;</span> <span style="color: #ff0000;">&quot;off&quot;</span>
  Option <span style="color: #ff0000;">&quot;AutoEnableDevices&quot;</span> <span style="color: #ff0000;">&quot;off&quot;</span>
EndSection</pre>

<p>I chose HAL. I wanted to replicate the following settings using HAL.</p>

<pre class="php">Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span>
    Identifier <span style="color: #ff0000;">&quot;Keyboard1&quot;</span>
    Driver     <span style="color: #ff0000;">&quot;kbd&quot;</span>
    Option <span style="color: #ff0000;">&quot;AutoRepeat&quot;</span> <span style="color: #ff0000;">&quot;500 30&quot;</span>
    Option <span style="color: #ff0000;">&quot;XkbRules&quot;</span>  <span style="color: #ff0000;">&quot;xorg&quot;</span>
    Option <span style="color: #ff0000;">&quot;XkbModel&quot;</span>  <span style="color: #ff0000;">&quot;thinkpadintl&quot;</span>
    Option <span style="color: #ff0000;">&quot;XkbLayout&quot;</span> <span style="color: #ff0000;">&quot;us&quot;</span>
    Option <span style="color: #ff0000;">&quot;XkbOptions&quot;</span>        <span style="color: #ff0000;">&quot;ctrl:nocaps,altwin:menu,compose:ralt,eurosign:e&quot;</span>
EndSection
&nbsp;
Section <span style="color: #ff0000;">&quot;InputDevice&quot;</span>
    Identifier <span style="color: #ff0000;">&quot;Synaptics Touchpad&quot;</span>
    Driver     <span style="color: #ff0000;">&quot;synaptics&quot;</span>
    Option <span style="color: #ff0000;">&quot;SendCoreEvents&quot;</span> <span style="color: #ff0000;">&quot;true&quot;</span>
    Option <span style="color: #ff0000;">&quot;Device&quot;</span> <span style="color: #ff0000;">&quot;/etc/psaux&quot;</span>
    Option <span style="color: #ff0000;">&quot;Protocol&quot;</span>    <span style="color: #ff0000;">&quot;auto-dev&quot;</span>    <span style="color: #808080; font-style: italic;"># Auto detect</span>
<span style="color: #808080; font-style: italic;">#    Option &quot;TouchpadOff&quot; &quot;1&quot; #Uncomment if you just want to disable the touchpad and use only the trackpoint</span>
<span style="color: #808080; font-style: italic;">#    Option &quot;HorizScrollDelta&quot; &quot;0&quot; #Why is this in here by default. By Gods, it kill horizontal scrolling!</span>
    Option <span style="color: #ff0000;">&quot;RightEdge&quot;</span> <span style="color: #ff0000;">&quot;5500&quot;</span> <span style="color: #808080; font-style: italic;">#This is a little bigger than the default narrowing the scroll region</span>
    Option <span style="color: #ff0000;">&quot;BottomEdge&quot;</span> <span style="color: #ff0000;">&quot;4500&quot;</span> <span style="color: #808080; font-style: italic;">#This is a little bigger than the default narrowing the scroll region</span>
    Option <span style="color: #ff0000;">&quot;RTCornerButton&quot;</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #808080; font-style: italic;">#disable Right Top corner &quot;button&quot; </span>
    Option <span style="color: #ff0000;">&quot;RBCornerButton&quot;</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #808080; font-style: italic;">#disable Right Top corner &quot;button&quot; </span>
    Option <span style="color: #ff0000;">&quot;SHMConfig&quot;</span> <span style="color: #ff0000;">&quot;on&quot;</span> <span style="color: #808080; font-style: italic;">#this allows configuration of the touchpad using qsynaptics, synclient, or what have you</span>
EndSection</pre>

<p>The keyboard part was easy. I copied <tt>/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi</tt> to <tt>/etc/hal/fdi/policy/99-keymap.fdi</tt> and made a few adjustments:</p>

<pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;ISO-8859-1&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span> <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- -*- SGML -*- --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;deviceinfo</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;0.2&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;device<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;match</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;info.capabilities&quot;</span> <span style="color: #000066;">contains</span>=<span style="color: #ff0000;">&quot;input.keymap&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;append</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;info.callouts.add&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;strlist&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>hal-setup-keymap<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/append<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/match<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;match</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;info.capabilities&quot;</span> <span style="color: #000066;">contains</span>=<span style="color: #ff0000;">&quot;input.keys&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.xkb.rules&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>xorg<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
      <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). --&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.xkb.model&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>thinkpadintl<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;match</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;/org/freedesktop/Hal/devices/computer:system.kernel.name&quot;</span>
             <span style="color: #000066;">string</span>=<span style="color: #ff0000;">&quot;Linux&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.xkb.model&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>evdev<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/match<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.xkb.layout&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>us<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.xkb.variant&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.xkb.autoRepeat&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>500 30<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.xkb.options&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>ctrl:nocaps,altwin:menu,compose:ralt,eurosign:e<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/match<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/device<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/deviceinfo<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre>

<p>The Touchpad configuration was a little more involving, because I added a few options which, before, I didn&#8217;t know the thing supported. <tt>99-x11-synaptics.fdi</tt>:</p>

<pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;ISO-8859-1&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;deviceinfo</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;0.2&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;device<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;match</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;info.capabilities&quot;</span> <span style="color: #000066;">contains</span>=<span style="color: #ff0000;">&quot;input.touchpad&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_driver&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>synaptics<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Arbitrary options can be passed to the driver using
         the input.x11_options property since xorg-server-1.5. --&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Switch on shared memory, enables the driver to be configured at runtime --&gt;</span></span>
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- This allows configuration of the touchpad using qsynaptics, synclient, or what have you --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.SHMConfig&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>on<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Enable vertical scrolling by dragging your finger along the right edge --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.VertEdgeScroll&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Enable horizontal scrolling by dragging your finger along the left edge --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.HorizEdgeScroll&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- This is a little bigger than the default narrowing the scroll region --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.RightEdge&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>5500<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- This is a little bigger than the default narrowing the scroll region --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.BottomEdge&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>4500<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- disable Right Top corner &quot;button&quot; --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.RTCornerButton&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>0<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- disable Right Bottom corner &quot;button&quot; --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.RBCornerButton&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>0<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Enable vertical scrolling when dragging with two fingers anywhere on the touchpad --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.VertTwoFingerScroll&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Enable horizontal scrolling when dragging with two fingers anywhere on the touchpad --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.HorizTwoFingerScroll&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Enable tapping to emulate mouse buttons --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.TapButton1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.TapButton2&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.TapButton3&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>3<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Maximum movement of the finger for detecting a tap --&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;merge</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;input.x11_options.MaxTapMove&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>221<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/merge<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- For other possible options, check CONFIGURATION DETAILS in synaptics man page --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/match<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/device<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/deviceinfo<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre>

<p>I&#8217;m still not completely satisfied with the Touchpad configuration (actually less so than before I started messing with HAL), so I wrote a little tool to be able to mess around with my configuration a little bit easier.</p>

<h2>Introducing <tt>synclient-sync</tt></h2>

<p>With <tt>SHMConfig on</tt>, you can use the <tt>synclient</tt> program to make changes to the touchpad configuration without having to restart X. I decided that it would be handy if I could utilize this to test out changes I made to the HAL config file without having to reload it, so I wrote a little script which detects the differences between the current (live) configuration and the configuration in the HAL <tt>.fdi</tt> file. The running configuration is then updated to reflect the changes in this file.
(Newer versions of the script can be found <a href="http://gist.github.com/169034">on GitHub</a>)</p>

<pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/bash</span>
 
<span style="color: #0000ff;">HAL_FILE=</span>/etc/hal/fdi/policy/<span style="color: #cc66cc;">99</span>-x11-synaptics.fdi
 
<span style="color: #0000ff;">VERBOSITY_LEVEL=</span><span style="color: #cc66cc;">2</span>
 
usage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    cat &lt;&lt;EOF
Usage: $<span style="color: #cc66cc;">0</span> options
 
OPTIONS:
--verbosity <span style="color: #66cc66;">&#91;</span>level<span style="color: #66cc66;">&#93;</span> Control the level of output processed by the script.
Level <span style="color: #cc66cc;">0</span>: No output at all
Level <span style="color: #cc66cc;">1</span>: Only output changed options
Level <span style="color: #cc66cc;">2</span>: Only output options <span style="color: #000066;">set</span> <span style="color: #b1b100;">in</span> the configuration file
Level <span style="color: #cc66cc;">3</span>: Output all options
--verbose Shortcut <span style="color: #b1b100;">for</span> verbosity level <span style="color: #cc66cc;">3</span>
--<span style="color: #000066;">help</span> Show this <span style="color: #000066;">help</span>
EOF
 
    <span style="color: #000066;">exit</span> <span style="color: #cc66cc;">1</span>
<span style="color: #66cc66;">&#125;</span>
 
options_from_hal_file<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0000ff;">HAL_SED_FILTER=</span><span style="color: #ff0000;">'s%^<span style="color: #000099; font-weight: bold;">\s</span>*&lt;merge<span style="color: #000099; font-weight: bold;">\s</span>*key=&quot;input<span style="color: #000099; font-weight: bold;">\.</span>x11_options<span style="color: #000099; font-weight: bold;">\.</span><span style="color: #000099; font-weight: bold;">\(</span>.*<span style="color: #000099; font-weight: bold;">\?</span><span style="color: #000099; font-weight: bold;">\)</span>&quot;<span style="color: #000099; font-weight: bold;">\s</span>*type=&quot;string&quot;&gt;<span style="color: #000099; font-weight: bold;">\(</span>.*<span style="color: #000099; font-weight: bold;">\)</span>&lt;/merge&gt;%<span style="color: #000099; font-weight: bold;">\1</span>=<span style="color: #000099; font-weight: bold;">\2</span>%'</span>
    cat <span style="color: #0000ff;">$HAL_FILE</span> \
        | grep <span style="color: #ff0000;">'&lt;merge key=&quot;input.x11_options.'</span> \
        | grep -v <span style="color: #ff0000;">'SHMConfig'</span> \
        | sed -e <span style="color: #0000ff;">$HAL_SED_FILTER</span>
<span style="color: #66cc66;">&#125;</span>
 
from<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
     synclient -l \
        | grep <span style="color: #ff0000;">'='</span> \
        | sed -e <span style="color: #ff0000;">'s/<span style="color: #000099; font-weight: bold;">\s</span>//g'</span> \
        | <span style="color: #b1b100;">while</span> <span style="color: #000066;">read</span> option; <span style="color: #b1b100;">do</span>
<span style="color: #0000ff;">key=</span>`<span style="color: #000066;">echo</span> <span style="color: #0000ff;">$option</span>|cut -f <span style="color: #cc66cc;">1</span> -d <span style="color: #ff0000;">'='</span>`
            <span style="color: #0000ff;">old_val=</span>`<span style="color: #000066;">echo</span> <span style="color: #0000ff;">$option</span>|cut -f <span style="color: #cc66cc;">2</span> -d <span style="color: #ff0000;">'='</span>`
            <span style="color: #0000ff;">new_val=</span>`options_from_hal_file|grep <span style="color: #0000ff;">$key</span>|cut -f <span style="color: #cc66cc;">2</span> -d <span style="color: #ff0000;">'='</span>`
 
            <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> -z <span style="color: #0000ff;">$new_val</span> <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
                <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$VERBOSITY_LEVEL</span> == <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">&#93;</span> &amp;&amp; <span style="color: #000066;">echo</span> -e <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\e</span>[1;30m$key = $old_val<span style="color: #000099; font-weight: bold;">\e</span>[0m&quot;</span>
            <span style="color: #b1b100;">elif</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$old_val</span> != <span style="color: #0000ff;">$new_val</span> <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
                <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$VERBOSITY_LEVEL</span> -ge <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> &amp;&amp; <span style="color: #000066;">echo</span> -e <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\e</span>[1m$key = <span style="color: #000099; font-weight: bold;">\e</span>[1;31m$old_val <span style="color: #000099; font-weight: bold;">\e</span>[1;4;32m$new_val<span style="color: #000099; font-weight: bold;">\e</span>[0m&quot;</span>
                synclient <span style="color: #ff0000;">&quot;$key=$new_val&quot;</span>
            <span style="color: #b1b100;">else</span> <span style="color: #808080; font-style: italic;"># The HAL file and the life configuration are in sync</span>
                <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$VERBOSITY_LEVEL</span> -ge <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> &amp;&amp; <span style="color: #000066;">echo</span> -e <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\e</span>[1m$key = <span style="color: #000099; font-weight: bold;">\e</span>[4m$new_val<span style="color: #000099; font-weight: bold;">\e</span>[0m&quot;</span>
            <span style="color: #b1b100;">fi</span>
<span style="color: #b1b100;">done</span>
<span style="color: #66cc66;">&#125;</span>
 
<span style="color: #0000ff;">do_from=</span><span style="color: #cc66cc;">0</span>
<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#91;</span> $<span style="color: #808080; font-style: italic;"># -gt 0 ]; do</span>
<span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #b1b100;">in</span>
        --from-hal<span style="color: #66cc66;">&#41;</span>
            <span style="color: #0000ff;">do_from=</span><span style="color: #cc66cc;">1</span>
            ;;
        --verbose<span style="color: #66cc66;">&#41;</span>
            <span style="color: #0000ff;">VERBOSITY_LEVEL=</span><span style="color: #cc66cc;">3</span>
            ;;
        --verbosity<span style="color: #66cc66;">&#41;</span>
            <span style="color: #0000ff;">VERBOSITY_LEVEL=</span>$<span style="color: #cc66cc;">2</span>
            <span style="color: #000066;">shift</span>
            ;;
        --<span style="color: #000066;">help</span><span style="color: #66cc66;">&#41;</span>
            usage
            ;;
    <span style="color: #b1b100;">esac</span>
<span style="color: #000066;">shift</span>
<span style="color: #b1b100;">done</span>
 
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$do_from</span> == <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
from
<span style="color: #b1b100;">else</span>
usage
<span style="color: #b1b100;">fi</span>
 
<span style="color: #808080; font-style: italic;"># vim: set shiftwidth=4 tabstop=4 expandtab: </span></pre>

<h2>References</h2>

<ul>
  <li><a href="http://en.gentoo-wiki.com/wiki/Synaptics_Touchpad/Xorg_7.3">en.gentoo-wiki.com/wiki/Synaptics_Touchpad/Xorg_7.3</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/09/20/x-input-hal/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XKB compose sequences</title>
		<link>http://blog.bigsmoke.us/2009/09/07/xkb-compose-sequences</link>
		<comments>http://blog.bigsmoke.us/2009/09/07/xkb-compose-sequences#comments</comments>
		<pubDate>Mon, 07 Sep 2009 11:06:23 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Unicode]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[XKB]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=773</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I just ended a <a href="http://blog.bigsmoke.us/2009/09/07/vim-tips-for-editing-prose">post</a> about inserting special characters in VIM with the remark that I should find out how to insert special punctuation marks using just XKB, so I set out to find out how to add these to the list of existing compose options for XKB. Turns out that I should have simply taken another look at the configuration file for Compose mode (<tt>/usr/X11R6/share/X11/locale/en_US.UTF-8/Compose</tt> on my system).</p>

<p>Now I learned how to easily type a bunch of characters that I find myself using so often that I know their Unicode numbers by heart. This going to save my a ton of time and annoyance, and there&#8217;s no longer any need to remember the VIM digraphs either, although these were equally easy to remember.</p>

<table>
<tr><th>Char.</th><th>XML</th><th>HTML</th><th>XKB compose</th></tr>

<tr><td>—</td><td><kbd>&amp;#8212;</kbd></td><td><kbd>&amp;mdash;</kbd></td><td><kbd>Compose - - -</kbd></td></tr>

<tr><td>–</td><td><kbd>&amp;#8211;</kbd></td><td><kbd>&amp;ndash;</kbd></td><td><kbd>Compose - - .</kbd></td></tr>

<tr><td>…</td><td><kbd>&amp;#8230;</kbd></td><td><kbd>&amp;hellip;</kbd></td><td><kbd>Compose . .</kbd></td></tr>

<tr><td>‘</td><td><kbd>&amp;#8216;</kbd></td><td><kbd>&amp;lsquo;</kbd></td><td><kbd>Compose &lt; '</kbd></td></tr>

<tr><td>’</td><td><kbd>&amp;#8217;</kbd></td><td><kbd>&amp;rsquo;</kbd></td><td><kbd>Compose &gt; '</kbd></td></tr>

<tr><td>“</td><td><kbd>&amp;#8220;</kbd></td><td><kbd>&amp;ldquo;</kbd></td><td><kbd>Compose &lt; "</kbd></td></tr>

<tr><td>”</td><td><kbd>&amp;#8221;</kbd></td><td><kbd>&amp;rdquo;</kbd></td><td><kbd>Compose &gt; "</kbd></td></tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/09/07/xkb-compose-sequences/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VIM tips for editing prose</title>
		<link>http://blog.bigsmoke.us/2009/09/07/vim-tips-for-editing-prose</link>
		<comments>http://blog.bigsmoke.us/2009/09/07/vim-tips-for-editing-prose#comments</comments>
		<pubDate>Mon, 07 Sep 2009 10:20:47 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[tex]]></category>
		<category><![CDATA[VIM]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[XKB]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=764</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I was transcribing a draft for a manuscript. Using VIM, of course. But, I found my VIM skills to be lacking somewhat, enough to become sufficiently annoyed to investigate the holes.</p>

<h2>Word wrapping</h2>

<p>The first thing that I wanted to learn to remember was how to control word wrapping and, especially, how to <em>rewrap</em> text.</p>

<p>I had noticed already that on my current machine, VIM enables word wrapping by default for <tt>.txt</tt> files. I liked this, except I had forgotten long ago (or never properly remembered) how to rewrap lines. This can be done with <kbd>gq</kdb>. <kbd>gq</kbd> operates on the current selection or on the argument (a number of words/characters/sentences/paragraphs/etc).</p>

<p>Soon, I decided to turn my <tt>.txt</tt> into a simple TeX file (to be able to add annotations using TeX comments). This disabled the word wrapping, so I had to find the setting to control this. There's actually two settings:</p>

<ul>
  <li><tt>wrapmargin</tt> defines how close the text may approach the right edge of the VIM window before it starts wrapping,</li>
  <li>whereas <tt>textwidth</tt> tells VIM to start wrapping when a fixed number of characters is approached.</li>
</ul>

<p>Because VIM doesn't do wrapping by default for <tt>.tex</tt> files, I added the following <a href="http://blog.bigsmoke.us/2008/08/21/per-file-vim-configuration-with-modeline">modeline</a> to the bottom of my draft:</p>

<pre class="php">% vim: set textwidth=<span style="color: #cc66cc;">80</span> spelllang=nl:</pre>

<p>Note that I find 80 characters way too small for most programming tasks, but very convenient as a width for reading prose from a screen. On occasion, I've even used <tt>width: 80ex;</tt> in the CSS of a website.</p>

<h2>Sentences and paragraphs</h2>

<p>A few movement commands that I've never used enough to remember well are <kbd>{</kbd>/<kbd>}</kbd> and <kbd>(</kbd>/<kbd>)</kbd>. <kbd>}</kbd> and <kbd>{</kbd> are used to move a paragraph forward or backward, respectively;<kbd>)</kbd> and </kbd>(</kbd> are used to move a whole sentence forward or backward. This is particularly useful while editing prose.</p>

<p>To quickly select a paragraph, for example, you can easily move to the beginning of the paragraph using <kbd>{</kbd>, press <kbd>v</kbd> to start a selection and go to the end of the paragraph with <kbd>}</kbd> (or type <kbd>2}</kbd> to also select the next).</p>

<p>If you want to delete a sentence, go to the start of the sentence (using either <kbd>(</kbd> or <kbd>)</kbd>) and type <kbd>d)</kbd>. It's as easy as that.</p>

<p>If deleting the sentence fucked up the formatting of your paragraph, reformat by going to the beginning of the paragraph and typing <kbd>gq}</kbd>.</p>

<h2>Proper punctuation and other special characters</h2>

<p>TeX offers a method to construct special characters using plain ASCII source files. In the past, in my inability to properly configure everything for UTF-8, I've often made use of this. In TeX, <tt>\'e</tt> will be turned into <tt>é</tt>, <tt>\"i</tt> into <tt>ï</tt>, etc. This can be convenient, but it's much more convenient to have an environment that's properly configured for UTF-8. To enter special characters on my US keyboard layout (standard in The Netherlands), I've added <tt>compose:ralt</tt> to my XKB options. Using this option I can press <kbd>Right Alt</kbd> followed by a punctuation character, followed by a character to combine it with.</p>

<p>Clearly, constructing special characters on the level of X holds many advantages over having to do this differently for each and every application. This way I can also type in <kbd>ë</kbd> in this HTML <tt>&lt;textarea&gt;</tt> instead of having to type <kbd>&amp;euml;</kbd>. (In HTML, it's actually better to use a numeric character reference, such as <kbd>&amp;#235;</kbd> instead of <kbd>&amp;euml;</kbd>, because that doesn't require the loading of the DTD, but that's another rant altogether.)</p>

<p>If you don't have an accommodating XKB configuration, it's still possible to enter the characters directly at the VIM level. In VIM, <kbd>:help digraph</kbd> (see also the <a href="http://www.vim.org/htmldoc/digraph.html">on-line HTML version</a>) tells you everything about it. In short, use <kbd>Control+K</kbd> followed by a punctuation character, followed by a character to compose special characters in a way similar to X.</p>

<p>What's very nice about VIM's default setup is that it allows you to also easily create proper opening and closing single and double quotes. In TeX these are traditionally done using combinations of back-ticks (<kbd>`</kbd>) and apostrophes (<kbd>'</kbd>). TeX's default behavior can be <a href="http://randomdeterminism.wordpress.com/2009/05/15/quote-backtick-and-unicode-engine/">problematic</a>, a good reason to switch to Unicode.</p>

<table>
<tr><th>char.</th><th>VIM digraph</th><th>TeX</th></tr>
<tr><td><kbd>“</kbd></td><td><kbd>Ctrl+K, ", 6</kbd></td><td><kbd>``</kbd></td></tr>
<tr><td><kbd>”</kbd></td><td><kbd>Ctrl+K, ", 9</kbd></td><td><kbd>''</kbd></td></tr>
<tr><td><kbd>‘</kbd></td><td><kbd>Ctrl+K, ', 6</kbd></td><td><kbd>`</kbd></td></tr>
<tr><td><kbd>’</kbd></td><td><kbd>Ctrl+K, ', 9</kbd></td><td><kbd>'</kbd></td></tr>
</table>

<p>Something else that becomes very easy with VIM's digraphs is entering proper punctuation characters, such as em/en dashes. These are done by following <kbd>Ctrl+K</kbd> with a hyphen and a capital N or M. In TeX these could already be done by simply entering two or three hyphens, but if you prefer it that way, you're probably better of with the <a href="http://henry.precheur.org/2008/9/22/Unicycle,_a_Vim_plugin_for_typography_junkies.html">UniCycle plugin for VIM</a>, which I personally don't dig. Anyway, you're <a href="http://bemusement.org/diary/2007/January/15/em-dash">running out of excuses</a> to let <kbd>--</kbd> appear in your production documents.</p>

<table>
<tr><th>char.</th><th>VIM digraph</th><th>TeX</th></tr>
<tr><td>–</td><td><kbd>Ctrl+K, -, N</kbd></td><td><kbd>--</kbd></td></tr>
<tr><td>—</td><td><kbd>Ctrl+K, -, M</kbd></td><td><kbd>---</kbd></td></tr>
</table>

<p>I have to admit that I've waited an awful long time before finding this out. I'm ashamed to tell you that I've often gone to <a href="http://www.alanwood.net/unicode/">Alan Wood's Unicode resources</a> to look up a character and copy/paste it into an application. <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' />  Now, at least I don't have to further embarrass myself when I'm using VIM.</p>

<p>What remains is to configure XKB in such a way that I don't need to use VIM digraphs for punctuation. Then I will no longer need to use character references for punctuation at times like these, when I'm typing HTML/XML outside of VIM (or, worse, using copy/paste from VIM into this <tt>&lt;textarea&gt;</tt>, which I just did <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' /> ). Let's see if I can get XKB to compose these using the same combinations as VIM. That is <a href="http://madduck.net/docs/extending-xkb/">where</a> I'll continue my quest next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/09/07/vim-tips-for-editing-prose/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wmsystray, a notification area DockApp for WindowMaker</title>
		<link>http://blog.bigsmoke.us/2009/04/08/wmsystray</link>
		<comments>http://blog.bigsmoke.us/2009/04/08/wmsystray#comments</comments>
		<pubDate>Wed, 08 Apr 2009 20:05:10 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[DockApp]]></category>
		<category><![CDATA[WindowMaker]]></category>
		<category><![CDATA[wmsystray]]></category>
		<category><![CDATA[X]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=398</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Many X apps these days require a <a href="http://standards.freedesktop.org/systemtray-spec/systemtray-spec-0.2.html">system tray</a>. GNOME and KDE have system tray applets enabled in their panels by default. WindowMaker doesn&#8217;t have a panel. It supports <a href="http://dockapps.org/">DockApps</a>, which are, of course, much cooler. <img src='http://blog.bigsmoke.us/wp-factory/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>

<h2>wmsystray</h2>

<img src="http://blog.bigsmoke.us/uploads/2009/02/wmsystray-with-2-icons.png" alt="wmsystray 0.2.0 with 2 icons" title="wmsystray 0.2.0 with 2 icons" width="64" height="64" class="size-full wp-image-479 alignleft" />

<img src="http://blog.bigsmoke.us/uploads/2009/02/wmsystray-with-3-icons.png" alt="wmsystray 0.2.0 with 3 icons" title="wmsystray 0.2.0 with 3 icons" width="64" height="64" class="size-full wp-image-480 alignleft" />

<p>
<a href="http://kai.vm.bytemark.co.uk/~arashi/wmsystray/">wmsystray</a> (<a href="">homepage</a>) is a DockApp that supplies a notification area for Window Maker. The version that is <a href="http://gentoo-portage.com/x11-plugins/wmsystray">in Portage</a> (0.1.1) was maintained by Matthew Reppert. <em>Was</em>; I installed it almost a year ago and it crashed as soon as I started the first app which used the system tray. I went looking for a newer version than the one in Portage. I found it in a comment on its <a href="http://dockapps.org/file.php/id/252">dockapps.org page</a> by Vlad Dinulescu. He had fixed a few bugs and released a <a href="http://vlad.minisat.ro/~vlad2/dockapps/">new version</a> (0.2.0).
</p>

<p>Unfortunately, version 0.2.0 suffers some problems of its own: it crashes when I quit Skype and it sometimes &#8220;loses&#8221; the <a href="http://www.utorrent.com/">uTorrent</a> icon (usually when I have to restart the DockApp after quiting Skype).</p>

<h2>Why isn&#8217;t this built into Window Maker?</h2>

<p>I would much prefer it if Window Maker natively supported a notification area, preferably with the icons appearing within or replacing the App Icons. I&#8217;m not the first to have this wish. There exists a <a href="http://thread.gmane.org/gmane.comp.window-managers.windowmaker.devel/1244">patch</a> already, but the WM devs don&#8217;t like the idea.</p>

<h2>An alternative to wmsystray</h2>

<p>Something that I completely overlooked until I started writing this post is <em><a href="http://nixbit.com/cat/desktop-environment/tools/docker/">this</a></em>, which looks like a <a href="http://nixbit.com/cat/desktop-environment/tools/docker/">decent alternative to wmsystray</a>. I&#8217;ll have to try if that one works better than wmsystray. Some time&#8230;</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/04/08/wmsystray/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Window Maker &#8220;desktop&#8221; configuration</title>
		<link>http://blog.bigsmoke.us/2009/03/30/wmaker</link>
		<comments>http://blog.bigsmoke.us/2009/03/30/wmaker#comments</comments>
		<pubDate>Mon, 30 Mar 2009 11:36:20 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WindowMaker]]></category>
		<category><![CDATA[wmaker]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[X11]]></category>
		<category><![CDATA[XTerm]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=422</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>During the ten years of my love-hate relationship with X-Windows, I&#8217;ve often tried and enjoyed using full-fledged desktop environment (starting with KDE and later sometimes GNOME too), but, given time, I always gravitate back to <a href="http://www.windowmaker.info/">WindowMaker</a>.</p>

<h2>XTerm</h2>

<p>I&#8217;m not so big on the whole desktop metaphor thing. The longer I&#8217;ve been using Unix-like systems, the more dependent I&#8217;ve become on the command-line. My current Window Maker configuration is a testimony to this. If you look at my Main Window Maker Workspace, you&#8217;ll notice that I actually use an Xterm instead of a desktop. Also, I don&#8217;t have a wallpaper. No wallpaper, no icons: I just want my prompt, in a nice font.</p>

<p>I despise graphical file managers. It feels like having to type without fingers. I&#8217;m not advocating the use of a command-line shell for new users or anything but for somebody like me who is used to calling programs &#8220;by hand&#8221;, a GUI is pure torture. With a GUI, I end up having to find a specialized program for a lot of mundane tasks which can be accomplished in Bash with a simple loop and a few filters. Renaming a few hundred files springs to mind.</p>

<div id="attachment_450" class="wp-caption alignright" style="width: 310px"><a title="My Main Window Maker Workspace" rel="lightbox" href="http://blog.bigsmoke.us/uploads/2009/03/windowmaker-workspace-1.png"><img src="http://blog.bigsmoke.us/uploads/2009/03/windowmaker-workspace-1-300x187.png" alt="My Main Window Maker Workspace" title="My Main Window Maker Workspace" width="300" height="187" class="size-medium wp-image-450" /></a><p class="wp-caption-text">My Main Window Maker Workspace</p></div>

<p>GNU Screen provides for <a href="http://blog.bigsmoke.us/2008/12/04/gnu-screen-window-captions-as-xterm-tabs">&#8220;tabs&#8221; in my XTerms</a> and some other features I&#8217;ve come to depend on. That&#8217;s why, upon login, my Main Workspace appears with <q><tt>xterm -e screen</tt></q> already started. The <kbd>Windows Key + T</kbd> fires up another XTerm with a fresh screen session. If I want to attach to a previous Screen session, I use <kbd>Window+Shift+T</kbd>. This starts an XTerm without Screen.</p>

<h2>Starting applications</h2>

<p>I don&#8217;t like the applications menu, but I&#8217;ve added a few applications to it anyway to be able to bind short keys to them (<kbd>Win+F</kbd> for Firefox and <kbd>Win+T</kbd> for XTerm). When I want to start any other application, I use the run dialog (bound to <kbd>Win+R</kbd>) or I execute the app from an XTerm window. I don&#8217;t usually start applications by clicking their App Icon.</p>

<p>File viewers (such as Mplayer, Gliv, Okular, xlview, and wordview) are always started from an XTerm or from Firefox, because that&#8217;s where all my file arguments originate. These apps don&#8217;t need App Icons, especially because I don&#8217;t see them as belonging to any particular workspace.</p>

<h2>All keyboard shortcuts</h2>

<p>Instead of Alt, I use the Window key (Mod4) a lot for my keyboard shortcuts.</p>

<pre class="bash">cat /home/bigsmoke/GNUstep/Defaults/WindowMaker |grep -i key|sed -e <span style="color: #ff0000;">'s/^<span style="color: #000099; font-weight: bold;">\s</span>*//'</span>|sort</pre>

<pre class="ini"><span style="color: #000099;">CloseKey </span>= <span style="color: #933;">&quot;Mod4+Q&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">FocusNextKey </span>= <span style="color: #933;">&quot;Mod4+Tab&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">FocusPrevKey </span>= <span style="color: #933;">&quot;Shift+Mod4+Tab&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">HideKey </span>= <span style="color: #933;">&quot;Mod4+H&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">HideOthersKey </span>= <span style="color: #933;">&quot;Shift+Mod4+H&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">HMaximizeKey </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">LowerKey </span>= <span style="color: #933;">&quot;Mod4+Down&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">MaximizeKey </span>= <span style="color: #933;">&quot;Mod4+M&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">MiniaturizeKey </span>= <span style="color: #933;">&quot;Mod4+period&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">ModifierKey </span>=<span style="color: #660066;"> Mod4</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">MoveResizeKey </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">NextWorkspaceKey </span>= <span style="color: #933;">&quot;Shift+Mod4+Right&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">PrevWorkspaceKey </span>= <span style="color: #933;">&quot;Shift+Mod4+Left&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">RaiseKey </span>= <span style="color: #933;">&quot;Mod4+Up&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">RootMenuKey </span>= <span style="color: #933;">&quot;Mod4+A&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">ScreenSwitchKey </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">ShadeKey </span>= <span style="color: #933;">&quot;Mod4+minus&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">ToggleKbdModeKey </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowListKey </span>= <span style="color: #933;">&quot;Mod4+W&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowMenuKey </span>= <span style="color: #933;">&quot;Mod4+Escape&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut10Key </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut1Key </span>= <span style="color: #933;">&quot;Mod4+1&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut2Key </span>= <span style="color: #933;">&quot;Mod4+2&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut3Key </span>= <span style="color: #933;">&quot;Mod4+3&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut4Key </span>= <span style="color: #933;">&quot;Mod4+4&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut5Key </span>= <span style="color: #933;">&quot;Mod4+5&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut6Key </span>= <span style="color: #933;">&quot;Mod4+6&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut7Key </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut8Key </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">WindowShortcut9Key </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace10Key </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace1Key </span>= <span style="color: #933;">&quot;Mod4+F1&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace2Key </span>= <span style="color: #933;">&quot;Mod4+F2&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace3Key </span>= <span style="color: #933;">&quot;Mod4+F3&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace4Key </span>= <span style="color: #933;">&quot;Mod4+F4&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace5Key </span>= <span style="color: #933;">&quot;Mod4+F5&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace6Key </span>= <span style="color: #933;">&quot;Mod4+F6&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace7Key </span>= <span style="color: #933;">&quot;Mod4+F7&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace8Key </span>= <span style="color: #933;">&quot;Mod4+F8&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="color: #000099;">Workspace9Key </span>=<span style="color: #660066;"> None</span><span style="color: #666666; font-style: italic;">; </span></pre>

<p>One annoyance is that, when switching through the Windows in the current Workspace (in my case, with <kbd>Win+Tab</kbd> and <kbd>Win+Shift+Tab</kbd>), doesn&#8217;t disappear unless an additional key press is given (such as an extra <kbd>Tab</kbd>).</p>

<p>Another annoyance is in my configuration. My keyboard has some space after every 4 function keys. Also, like always, the function keys are a bit far removed from the home row on the keyboard. So, I should consider switching through workspaces with <kbd>Win+1</kbd> through <kbd>Win+7</kbd> instead of <kbd>Win+F1</kbd> through <kbd>Win+F7</kbd>. I&#8217;ve now bound the <kbd>Win+&lt;number&gt;</kbd> keys to a Window 1 to 10, but this seems to be terribly broken anyway in Window Maker (I can only switch to the first window in the first workspace this way). Also, I probably wouldn&#8217;t use it even if it did work, unless if they displayed the window numbers on the app icons or something and if they did the numbering on a workspace basis instead of globally. So, I&#8217;m probably going to change this soon.</p>

<div id="attachment_451" class="wp-caption alignright" style="width: 310px"><a title="My Window Maker Workspace for Audio" rel="lightbox" href="http://blog.bigsmoke.us/uploads/2009/03/wmaker-workspace-2.png"><img src="http://blog.bigsmoke.us/uploads/2009/03/wmaker-workspace-2-300x187.png" alt="My Window Maker Workspace for Audio" title="My Window Maker Workspace for Audio" width="300" height="187" class="size-medium wp-image-451" /></a><p class="wp-caption-text">My Window Maker Workspace for Audio</p></div>

<h2>Workspaces</h2>

<p>One of the things I&#8217;ve always like about X Window Managers is the support for multiple virtual desktops, called Workspaces in Window Maker. I use topical workspaces, one workspace per application category. It&#8217;s possible to configure app icons to always start the application in the correct workspace regardless of where it is started from. My Workspaces are called Main, Audio, Video, Down, w3dev and Image.</p>

<p>If I want to look at my downloads, I know that I just have to switch to Workspace 4 (Down) regardless of what I&#8217;m downloading. The same goes when I want to switch a song (be it in Mplayer (in an XTerm) or in the Last.fm Player): I press <kbd>Win+F2</kbd>.</p>

<p>Here&#8217;s a list of all the app icons divided over my different workspaces:</p>

<ol>
<li>Main: Window Maker Preferences, Google Earth, Skype, Filelight</li>
<li>Audio: Rosegarden, Audacity, Hydrogen, Last.fm, Grip, Ardour, ReZound, Gnaural</li>
<li>Video: Cinelerra</li>
<li>Down: BitTorrent, uTorrent, Transmission</li>
<li>w3dev: MSIE, Konqueror</li>
<li>Image: Krita, Inkscape, GIMP, Color Schemer Studio</li>
</ol>

<p>I have a widescreen laptop, so I display all these per-workspace icons (with the <em>Clip</em>) vertically at the top left. At the bottom left I display the &#8220;Icon List&#8221;. This is used by WindowMaker for icons that are not already in the Clip or in the Dock.</p>

<p>At the right I display the dock with the XTerm icon and the Firefox icon. There&#8217;s also an Emacs icon there from the time that I wanted to learn Emacs. (Sadly, I know VIM too well to change.)</p>

<p>Below that, also at the right, are the Dock Apps: <a href="http://vlad.minisat.ro/~vlad2/dockapps/">wmsystray</a>, <a href="http://dockapps.org/file.php/id/222">WMWiFi</a>, <a href="http://gentoo-portage.com/x11-plugins/wmmixer">wmmixer</a>, <a href="http://dockapps.org/file.php/id/22">WMitime</a>, <a href="http://kitenet.net/~joey/code/wmbattery/">wmbattery</a>, and of course <a href="http://dockapps.org/file.php/id/14">wmMoonClock</a>.</p>

<h2>Why Window Maker</h2>

<p>With all this reluctance to click on icons, you&#8217;d wonder if I wouldn&#8217;t be better of trying something more keyboard centric such as <a href="http://www.nongnu.org/stumpwm/">StumpWM</a> (the successor of Ratpoison).</p>

<p>If I will, I&#8217;ll let you know.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/03/30/wmaker/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

