Re: [SLUG] Crazy stuff with osd and procmail
On Sun, 2002-01-13 at 07:01, Jeff Waugh wrote: [...snipped...] XOSD - pointed out to me my Jacques Wilkinson of This Very List - is a cool little utility that prints up an onscreen display in X. Very nifty for music players and the like. The procmail snippet pipes the subject (sucked out of the headers by matching it) to xosd's osd_cat command, which pops it up on your screen to alert you. You can do anything with osd_cat, and you can also use the osd library to bring crazy osd fun to your own software. An Evolution filter hack would be pretty cool. ;) Fun and games with xosd. Well I grabbed the source from http://www.ignavus.net/software.html , upsized the display to five lines and added the ability in xosd for a scrolling display. Then fiddled with osd_cat to use the scrolling (and the shadowing which isn't in the default?). I fiddled some more to add aging to the scrolling. I quite like doing: tail -f /var/log/syslog | osd_cat -t -o 35 -d 5 -s 2 -a 30 The aging effect means if the syslog is quiet, you only get one or two lines pop up, if things are really busy you get up to the last 5 lines scrolling on screen. I made a patch for those interested in playing. Cheers, Malcolm Valentine. xosd-mv-patch.tar.gz Description: GNU Zip compressed data msg19657/pgp0.pgp Description: PGP signature
Re: [SLUG] Crazy stuff with osd and procmail
On Sun 13 Jan, Jeff Waugh made the following spurious claims: ONSCREEN=osd_cat --color=#ffe000 --offset=-70 --delay=2 --shadow=2 --font=-urw-eurostile-bold-r-normal-*-*-480-*-*-p-*-iso8859-1 :0 ich * ^Subject:.*\/.* | echo $MATCH | $ONSCREEN You also need a DISPLAY=:0 (or similar) in there for it to know where to stick the text. I use -b and -o 53 to get it just above KDE's bottom-bar thingy. Now Jeff, how would I get it to also put up the From address? -- Rev Simon Rumble [EMAIL PROTECTED] www.rumble.net Think: In which world is speech most free: 1) A world where you can send single personal messages to anyone, but can't send multiple copies of the same message to people who haven't authorized you spending their resources that way. 2) A world where you only can send messages to people who have explicitly authorized you to do so. If we win the fight against spammers, we get world 1. If we lose, we get world 2. - Per Abrahamsen on slashdot -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] Crazy stuff with osd and procmail
quote who=Rev Simon Rumble You also need a DISPLAY=:0 (or similar) in there for it to know where to stick the text. And a few other bits... Such as pointing it to .Xauthority. See my .procmailrc here for the rest: http://perkypants.org/dotfiles/ [ As if I had to explain that bit! ;) ] Now Jeff, how would I get it to also put up the From address? *grmph* Always doing people's dirty work for them... *grmph* I was doing this in my head early this morning anyway... ;) You use a procmail block to grab the two matches, then you echo them out. Example: :0 c * ^Subject:.*\/.* { SUBJECT=$MATCH :0 ih * ^From: .*\/[^]* | echo $SUBJECT from $MATCH | $ONSCREEN } Note: I would have done echo -e $SUBJECT\n$MATCH, but this requires support from osd_cat in the way of \n processing. It doesn't currently do it, so you know what to do. ;) - Jeff -- It's actually my new bandwidth conservation technique: compresion of al double leters. - Telsa Gwynne -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
[SLUG] Crazy stuff with osd and procmail
Heyhey crazy kids, Here's another damn fool stunt to pull with procmail: ONSCREEN=osd_cat --color=#ffe000 --offset=-70 --delay=2 --shadow=2 --font=-urw-eurostile-bold-r-normal-*-*-480-*-*-p-*-iso8859-1 :0 ich * ^Subject:.*\/.* | echo $MATCH | $ONSCREEN What does this do? XOSD - pointed out to me my Jacques Wilkinson of This Very List - is a cool little utility that prints up an onscreen display in X. Very nifty for music players and the like. The procmail snippet pipes the subject (sucked out of the headers by matching it) to xosd's osd_cat command, which pops it up on your screen to alert you. You can do anything with osd_cat, and you can also use the osd library to bring crazy osd fun to your own software. An Evolution filter hack would be pretty cool. ;) On Debian, you can get it (and the associated xmms plugin) with: apt-get install xmms-osd-plugin xosd-bin Crazy Crack! Go get some! Run, don't waltz! - Jeff -- 2.4.1ac17 is full of innovations and should be used with caution. - Linux Weekly News -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug