On Mon, Jul 19, 2010 at 11:46 AM, LuX <lux.onthe...@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. 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. Cheers.