Re: [dev] wmii: dash, bash and tests in wmiirc

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Mon, 19 Jul 2010 18:35:48 -0400

On Mon, Jul 19, 2010 at 03:21:43PM -0700, Suraj Kurapati wrote:
>On Mon, Jul 19, 2010 at 11:46 AM, LuX <lux.onthenet_AT_free.fr> wrote:
>> I wanted to add to wmii some basic ability to deal with USB pens:
>>
>> - mount and open them automatically when plugged in;
>
>I use ConsoleKit (by way of the Thunar file manager) for this, but I
>don't know how it works internally. I would imagine that there is a
>ck-* executable which emits USB device discovery/(un)mounting events
>to STDOUT and you can read and react to that output accordingly.

consolekit just defines permissions for hal. The deep magic is
all in nasty XML files in HAL that define DBus objects. It's
really quite evil when it comes down to it. But Thunar's magic
is the same as the halmount script I posted. Since I don't
regularly use a file manager, using one to manage my mounts is
inconvenient.

>Here's the relevant snippet from my .xinitrc:
>
> # the ck-launch-session is for proper automounting of USB drives
> # see http://bbs.archlinux.org/viewtopic.php?id=84635&p=3
> ck-launch-session wmii
>
>> - show them as buttons in the right bar, with focus or normal colors
>>  depending on whether their file system is mounted or unmounted;
>> - unmount/remount them by simple clicks on their buttons.
>
>If you can tap into the ConsoleKit event stream, these seem possible to do.

lshal -m | grep ': volume_' does the trick. But, again, it's
HAL, not consolekit.

-- 
Kris Maglione
I think conventional languages are for the birds.  They're just
extensions of the von Neumann computer, and they keep our noses in the
dirt of dealing with individual words and computing addresses, and
doing all kinds of silly things like that, things that we've picked up
from programming for computers; we've built them into programming
languages; we've built them into Fortran; we've built them in PL/1;
we've built them into almost every language.
	--John Backus
Received on Tue Jul 20 2010 - 00:35:48 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 20 2010 - 00:48:02 CEST