View Single Post
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#16
Script:
Code:
#!/bin/sh
pages=3
page=0
pagestem=/home/user/.menuizer/page
if [ "x$1" != x ] ; then
  page=`expr "$1" % $pages`
fi
while true ; do
  response=`gxmessage -center -borderless -nofocus -print -buttons "$(cat $pagestem$page)"',\\\\/,/\\\\' ""`
  case "$response" in
    '\/')
      page=`expr \( $page + 1 \) % $pages`
      ;;
    '/\')
      page=`expr \( $page + $pages - 1 \) % $pages`
      ;;
    *)
      break
      ;;
  esac
done
#echo $response
xte "str $response"
Make files of the form $pagestem$page, where page ranges from 0 to $pages - 1. Each one looks like
Code:
string1,string2,string3
with as many strings as will fit on the screen (experiment).
This can also be converted to use a list, but then you'd have to select an entry and then click OK. I thought this was better.

As I said before, the trouble is launching it; since I can't make it always-on-top (and since it's huge), I can't just make it respawn itself; powerlaunch is going to be the quickest, most generally available way of launching it, but that's not very friendly. All the other obvious solutions rely on not having the foreground window fullscreened.

Edit: it is always-on-top... Attempt at reducing screen footprint and looping coming right up.

Last edited by Benson; 2008-04-24 at 15:54.