Michael Lesniak - 2004-10-08


I don't know if anyone else suggested it, but this is may (quickly hacked) way of handling file-types and doing choosable searches.

At first I've a script view
if [ `echo $1|grep "^http"` ]
  firefox "$*"
  # A file
  # Umm, could be irc, telnet, ...
  NAME=`echo $1|cut -d: -f2-`
  SUF=`basename $1|cut -d. -f2-`
  echo $SUF >>~/out
  case $SUF in
    sgf) /home/mic/bin/cgoban/cgoban.sh.in "$NAME" ;;
    sh)  exec "$NAME" ;;
which handles links by calling firefox and every other type by looking at the suffix and calling the specific program. You have to enter this script as your default browser in user.properties.

To search, I've got a script called google.sh, which can be linked to a normal node,
WORD=`zenity --title="Words?" --entry --text="Enter search terms"`
REPL=`echo $WORD|sed 's/ /%20/'`
if [ -n "$WORD" ]
firefox "http://www.google.de/search?hl=de&q=$REPL&btnG=Google-Suche&meta="
When clicked on a node, a window pops up, asking for a search term and calling firefox.

This is not the best, but I hope you get the point and customize this how you want to :)

Have a nice day, hope this things help someone,
  Michael Lesniak