iPAQ (and GTK+) specific xmessage replacementiMessage program displays a window containing a message from a command line or standard input. On the bottom of the window is row of command line defined buttons. Clicking on any of these buttons will cause iMessage to exit. Which button was pressed is both returned in exit status and printed to standard output.
Returned value is 0 for first button, 1 for second button and so on... Window close button is equivalent to most right button (usually "Cancel" button).
UsageiMessage message [button1] [button2] ...
if 'message' is '-', stdin is used
Note: With Matchbox window manager, you need Matchbox v0.2 or higher for no fullscreen window.
iMessage "just a message"
iMessage "Are you sure?" Yes No "I don't know"
ls -1p | iMessage -
lsmod | grep "ir" | iMessage -
cat foo.txt | iMessage - Yes No
#!/bin/bash iMessage "Delete foo.txt?" Yes No Rename RETVAL=$? case "$RETVAL" in 0) rm -f foo.txt ;; 2) mv -f foo.txt foo.txt.old ;; esac #end
iMessage "Would you like to do it?" Yes No | other_script_that_reads_from_stdin
iMessage "Would you like to do it?" Yes No > any_file
- first (not public) release
- thoughts about comaptibility with old xmessage - rejected
- gtk_dialog_new() and gtk_label_new() used, sometimes ugly on iPAQ :-(
- first public release
- major rewrite of interface
- gtk_window_new(GTK_WINDOW_DIALOG) now used instead of gtk_dialog_new()
- gtk_scrolled_window_new() now used instead of gtk_label_new()
DownloadSource code: iMessage.c
Binary package: imessage_0.2_arm.ipk
(iMessage "just a message")
more complicated message
(ls -1p | iMessage - More buttons possible too)
LinksFamiliar Linux (Linux distribution for iPAQ handhelds)
created: April 13, 2002, last modification: April 13, 2002