129 lines
5.9 KiB
HTML
129 lines
5.9 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<title>SFM: A New GTK-Based Application LG #30</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
|
ALINK="#FF0000">
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H1><font color="maroon">SFM: A New GTK-Based Application</font></H1>
|
|
<h4>By <a href="mailto: layers@marktwain.net">Larry Ayers</a></h4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<center><h3>Introduction</h3></center>
|
|
|
|
<p>As the GTK GUI programming toolkit matures more developers have been
|
|
inspired to use it for the visual presentation of their programs. Pascal
|
|
Rigaux, a French programmer, has come up with a small file-manager he calls
|
|
sfm. Sfm isn't quite as simple as the name and initial appearance imply; it
|
|
has a remarkably full feature-set for such a small program.
|
|
|
|
<p>There has been a long succession of X Windows file-managers which use
|
|
various icons to represent different types of files. This approach can be
|
|
useful for people accustomed to a Macintosh or Windows environment, where this
|
|
type of file-manager is common. These icons do have drawbacks, though, as
|
|
fewer files will fit into a single display window which results in much more
|
|
scrolling to find a particular file. The impact on system resources is
|
|
considerable as well, as the X server is called upon to constantly update the
|
|
display, and memory usage is much greater than what is needed by a text-based
|
|
manager. In the end it's just a matter of preference.
|
|
|
|
<p>Sfm is unusual in that it is an X-only file-manager which is also
|
|
text-based (FileRunner is another). It also goes against the general trend
|
|
towards mouse-based applications in that the keyboard interface is
|
|
well-developed.
|
|
|
|
<center><h3>Appearance and Features</h3></center>
|
|
|
|
<p>The default window size is rather small; my first impression was that this
|
|
was a trivial application, probably a first GTK programming exercise without
|
|
much utility. As I explored further (and actually read the README file!) I
|
|
found that sfm's uncluttered appearance conceals an interesting and useful
|
|
approach to the perpetual effort to contrive a useful interface to the
|
|
<b>ls</b> utility. In the screenshot below I've enlarged the default window
|
|
by about one-third:<br>
|
|
|
|
<p><img alt="sfm window" src="./gx/ayers/sfm1.gif">
|
|
|
|
<p>The above window is rather plain. The interesting part is the
|
|
right-mouse-button menu which offers a plethora of actions which can be
|
|
performed upon the highlighted file, along with a submenu offering less-used
|
|
possibilities. I wanted a screenshot showing the basic sfm window with both
|
|
menus fanned out from it. I don't know whether it is an idiosyncrasy of sfm,
|
|
GTK, or xv (which I used for the screenshots), but while I was able to get
|
|
shots of either menu by itself, I couldn't get them all in one screenshot. So
|
|
here are the main menu and its submenu; try to imagine them connected to the
|
|
first screenshot above:<br>
|
|
|
|
<p><img alt="first sfm menu" src="./gx/ayers/sfm2.gif">
|
|
|
|
<p>This is the submenu stemming from the "more" item:
|
|
|
|
<p><img alt="sfm sub-menu" src="./gx/ayers/sfm3.gif">
|
|
|
|
<p>As you can see, the keyboard shortcuts for all of the various menu-items
|
|
are shown to the right of the action menu-entries. This is a great help in
|
|
learning the key-bindings, which are designed to be intuitive and similar to
|
|
those of many other programs. I especially like the Lynx-style left-and-right
|
|
arrow-key directory navigation (the mc file-manager offers this as an option).
|
|
|
|
<p>Multiple sfm windows can be opened at once and files can be easily copied
|
|
or moved between them.
|
|
|
|
<p>Sfm uses a configuration dot-file (<i>~/.sfm</i>) in order to determine the
|
|
action to take upon a highlighted file when either the enter key, the
|
|
right-arrow-key, or a single left-mouse-button click is received.
|
|
Surprisingly, this is one dot-file you won't have to edit, as it is
|
|
auto-generated. The first time you select, as an example, a text file, a
|
|
dialog box pops up asking what action you'd like to take, such as editing it
|
|
with your favorite editor. That preference is then recorded in the
|
|
<i>~/.sfm</i> file; the next time a text file is selected it will be loaded
|
|
into your editor. Sfm uses the standard Linux <b>file</b> utility to
|
|
determine file-types. This is quite a nice feature, especially for new Linux
|
|
users who have enough to do just becoming comfortable with the system without
|
|
constantly needing to chase down and edit config files.
|
|
|
|
<p>Sfm is still in its early days, but judging by the intelligent design of
|
|
the current version, it's likely that further improvements are in the offing.
|
|
The current version (1.4 as I write this) is available from the
|
|
<a href="ftp://sunsite.unc.edu/pub/Linux/utils/file/managers">Sunsite</a>
|
|
archive; an alternate site is
|
|
<a href="http://www.geocities.com /SiliconValley/Horizon/8726">here</a>.
|
|
|
|
<hr>
|
|
|
|
<!-- hhmts start -->
|
|
Last modified: Sun 28 Jun 1998
|
|
<!-- hhmts end -->
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<center><H5>Copyright © 1998, Larry Ayers <BR>
|
|
Published in Issue 30 of <i>Linux Gazette</i>, July 1998</H5></center>
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="./ayers3.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./starkey.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
<!--startcut ==========================================================-->
|
|
</BODY>
|
|
</HTML>
|
|
<!--endcut ============================================================-->
|