iMessage
iPAQ (and GTK+) specific xmessage replacement
iMessage 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).
Usage
iMessage 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.
Examples
Invocation: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
Evaluation:
#!/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
Versions
version 0.1- first (not public) release
- thoughts about comaptibility with old xmessage - rejected
- gtk_dialog_new() and gtk_label_new() used, sometimes ugly on iPAQ :-(
version 0.2
- 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()
Download
Source code: iMessage.cBinary package: imessage_0.2_arm.ipk
Screenshots
![]() simple message (iMessage "just a message") |
![]() more complicated message (ls -1p | iMessage - More buttons possible too) |
Links
Familiar Linux (Linux distribution for iPAQ handhelds)created: April 13, 2002, last modification: April 13, 2002







