Re: Zsh + GUI
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 07/07/05
- Previous message: Bill Seivert: "Re: CSH Question - Hiding Job Control"
- In reply to: William Park: "Re: Zsh + GUI"
- Next in thread: adrian_at_satisoft.com: "Re: Zsh + GUI"
- Reply: adrian_at_satisoft.com: "Re: Zsh + GUI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 7 Jul 2005 00:54:30 -0400
On 2005-07-06, William Park wrote:
> adrian@satisoft.com <adrian@satisoft.com> wrote:
>> Maybe not quite what you are looking for (I'm not sure what you would
>> consider to be "marketable"), but you may want to have a look at
>> SATSHELL (www.satisoft.com/satshell). This is a utility to create GUI
>> interfaces for shell scripts (ksh, bash etc.).
>>
>> I'll be releasing a new version shortly which has some small
>> enhancements, such as automatically repeating actions and the option to
>> associate an action with a picklist selection.
>
> Thanks Adrian. It's not what I'm looking for, but it got me
> re-thinking. Both TKsh and SATSHELL are killing the shell script
> writers with details. I'm leaning towards some sort of interface to
> GTK+, at the moment. Ultimate goal is to eliminate external programs
> (web server, browser, dialog, Xdialog, etc.) and interact directly with
> the user.
The last thing I want in a GUI shell interface is widgets, with the
possible exception of a string entry widget.
What I need is the ability to open a window, draw lines,
rectangles, etc., set a font and write text (including an interface
to the XTextWidth function), receive keypresses and mouse clicks
(with co-ordinates).
One of the uses I have is for creating crossword puzzles. The grids
normally contain 225 squares; I sure as hell don't want to create
225 widgets to do something that I can do with a few lines of code.
If I have the mouse co-ordinates, I can easily calculate which
square was clicked, with vastly less overhead than with a widget. I
do it already, using the mouse in an xterm window.
In my article at UnixReview.com, I present a shell script which
prints buttons on the screen and performs actions when one is
pressed. Adding a button and associating an action with it requires
an added label as argument to a function call and a single line of
script to perform the action.
The article ends with the instructions to add another button to the
script, and clear the screen when it is pressed. All it involves
is:
Change:
print_buttons "$mv_str" "Exit"
to:
print_buttons "$mv_str" "Clear" "Exit"
and:
2) break ;;
to:
2) clear ;;
3) break ;;
No widget interface is going to be that simple.
The article is at:
<http://www.unixreview.com/documents/s=9823/ur0507a/ur0507a.html>
and the script at:
<http://www.unixreview.com/documents/s=9823/ur0507a/ur0507a_l1.html>
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
==================================================================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/cfaj/ssr.html>
- Previous message: Bill Seivert: "Re: CSH Question - Hiding Job Control"
- In reply to: William Park: "Re: Zsh + GUI"
- Next in thread: adrian_at_satisoft.com: "Re: Zsh + GUI"
- Reply: adrian_at_satisoft.com: "Re: Zsh + GUI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|