Joachim Breitner's Homepage
Created gaim-thinklight
Because of Gnome 2.10's metacity focus stealing prevention feature, I would not notice new messaes in open gaim conversation windows. Since I have an IBM Thinkpad with a Thinklight attached to it (little LED on the top border of the display), I thought I'd use that to tell me about new messages.
Sitting here at the entropia again, I finished my gaim plugin hacking. Since the light is controlled via /proc, I had to write a suid program just to let the user control that file. That's not a nice solution, I wish /proc would be like /dev, where you just use chgrp
et al to let the user control the devices. If any one is interested, I have (not very clean) debian packages.
Update: I have put okayish packages on http://people.debian.org/~nomeata/gaim-thinklight/. Comments are welcome. If there are enough comments, I'll consider putting it in debian, but only then, as it is quite specific.
Comments
If I have some free time I'll try and find a fix.
It would be nice too if it could periodically blink the light at a longer interval if you have unread messages.
I thought about the race condition. I might fix it by setting the timer for the turn-off-light from within the turn-on-function.
I am also thinking (nothing more :-)) about making the blink sequence configurational, and have it blink differnetly for different events.
I don't know if you can make it blink while unread messages wait when the messages was actually shown but the window stays hidden (the reason I created the plugin in the first case). I'm not sure gaim knows whether the messages was not read...
Comments and patches welcome.
I added a note on http://www.thinkwiki.org/wiki/Ibm-acpi
One suggestion for development would be to be able to configure it to keep the light on until the message window gained focus, was typed in, etc. (like Message Notification plugin), in case you left the room or something and wanted to easily check whether any new messages had been received.
Also, being able to configure other options for how it blinks for different events would be fantastic.
Not sure if I'll get around to do any of this soon, but patches are welcome.
The program 'gaim' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadGC (invalid GC parameter)'.
(Details: serial 4610 error_code 13 request_code 60 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Chris Lamb has announced his gaim plugin “gaim-lightthink” both on his blog and on the thinkpad-linux mailing list. His plugin does basically the same thing as my gaim-thinklight plugin. I was a bit surprised to read that his plugin is supo
Very cool feature. Here's hoping it works with the newest verison!
thx,
wolfgang
that idea makes sense, but I don't know enough about the internals of gaim, and I am currently too lazy to find out. If you or someone how ever can point me to the appropriate docs that tell me how to code that, I can certainly do that.
I'm completely clueless on this topic - but there is a routine in the regular preferences for the sound ("sounds when conversation has focus" yes/no) perhaps one can salvage something there?
danke für die antwort,
wolfgang
Short question: will there ever be an update to make it work on gaim v2?
thx!
...and last but not least:
Great plugin! I love it :)
Glad you like it!
"deb http://people.ubuntu.com/~seb128/deb ./" (unofficial repo from the official ubuntu gaim maintainer). It did not work because the debian gaim is named 2.0 and the ubuntu one 1.99. So I recompiled the gaim-thinklight package from the official repos with gaim-dev 1.99. And now it works :) If you want, I can send you the .deb I made.
greets
fabio
Well, excellent plugin I must say, though I second the opinion of fechter that the blink should only occur in out of focus windows. I haven't found a way to do that yet, but I'm looking into it (no idea where to start!).
Secondly, how is this installed on a non-Debian system? I'm sure the source must be extractable somehow, but I'm unfamiliar with .debs.
Thanks
If anyone wants to fix this by fixing all that ugly autoconf stuff, I'll happily accept patches.
Keep up the good work, I've always known thinkpad is the best ;)
It isn't pretty, but it works.
44a45
> #define LIGHT_STATUS "/tmp/ibm_light_status"
70a73
> char status_cmd[256];
71a75
> char write_cmd[256];
72a77
> char cmd2[1024] = "{ ";
73a79,95
> // Find the status of the light.
> sprintf(
> status_cmd,
> "cat %s | grep status | sed 's/.*\\\(o.*\\\)/\\1/' > %s ; ",
> LIGHT_FILE,
> LIGHT_STATUS
> );
>
> // Reset status of light
> sprintf(
> write_cmd,
> "cat %s > %s ; ",
> LIGHT_STATUS,
> LIGHT_FILE
> );
>
>
85a108
> strcat(cmd, status_cmd);
89a113
> strcat(cmd, write_cmd);
Also, it's always nicer to get patches in the "unified" format ("-u"), and by mail.
1. Successfully Compiled from source on Fedora Core 6 with Gaim 2.0.0-0.26.beta5.fc6.
2. Enabled plugin, gaim crashed.
3. Restarted Gaim, enabled plugin, gaim stayed running with weird gui problems.
4. Gaim crashed.
5. restarted gaim, gaim crashed.
6. removed plugin files from /usr/lib/gaim/...restarted gaim.
Done.
it's late...i'm going to bed.
Could you, Bryan, try to produce a backtrace with gdb? Are you also on FC6?
Are there any plans to release a new vesion for Pidgin (Gaim's successor)?
So far I think this is the best plugin ever if you have a Thinkpad!
I’ll also probably name it “pidgin-blinklight”, because it now supports ASUS laptops (or so I’ve heard, I coudn’t test that code of mine :-))
If I haven’t done it next week tuesday, feel free to bug me by mail, ICQ or Jabber . And thanks for the praise!
ansonsten: gute arbeit,
wolfgang
http://people.debian.org/~nomeata/gaim-thinklight/
I once wrote a plugin gaim called gaim-thinklight, which simply blinks your ThinkPad’s ThinkLight when you get a new messge. Very recently, gaim was renamed to pidgin, so gaim-thinklight is now called pidgin-blinklight. I changed the second part not bec
Wouldn't it be possible to adapt that for a thunderbird addon/plugin ?
Thanks, Dirk
Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.
Thanks!