Inane - It's Not ANother Editor... ================================== "And when they invented the wheel for the third time, they decided that this time they would do it properly, and use spokes." (Me, pissed, late at night, April 2001 sometime) Inane is an integrated file browser editor for GTK. Inane stands for Yet Another File Browser Editor, and there was almost certainly no reason whatsoever to write it. There are plenty of good file browsers out there, and squads of better editors. However, I was bored this Easter, and since I really haven't found a file browser I like, I thought I'd try and knock one up. The idea is to have a small, lightweight and robust file-browser that happens to have a built-in editor for quick, small changes to config files and so on, without cluttering up the screen with icons, demanding to connect to external sites to automatically do stuff, or in any other way attempting to take control of your computer. That's the idea. A few of the goals have been achieved, others not yet... Inane Features (as of v0.1.12): The current feature list is a bit thin, as you might expect, but I am already finding Inane to be reasonably useful. Then again I am just hooked on the tree/list paradigm, being an escapee from Windoze. YMMV. You can: - Add bookmarks to directories. You can't remove them yet though, unless you edit the bookmarks file manually. - Read ASCII formatted manpages without having to type 'man' before and ' | col -bx' after. - Browse directories and files with tree/list paradigm - Show or hide files beginning with '.' - Use globbing to filter lists of files - Autodetect text files with system similar to Perl -T operator - Edit multiple text files in the dodgy GTK text widget (designed to make you not want to do too much editing in one go :) ) - Set text font and colour - Toggle multiple and single file selection modes with SHIFT or ALT (set multiple mode), and ESC (set single mode) - Open arbitrary files in arbitrary apps - for now mp3s and wavs in xmms and gifs and jpgs in gqview are the default; adding more requires editing the config file by hand for the moment - Capture output from an associated app if the flag is set in the config file (so unzip -l, tar tvfz, etc can be made useful) - Associate more than one possible action with a filetype, so, eg, a .zip file in your ~/xmame directory can be passed to xmame, while other .zip files can be passed to unzip -l - Have a different icon for files that different apps will run, so you can see what will happen - Execute arbitrary executables by double clicking on them - Execute arbitrary shell commands by entering them in shell execute bar (with 'rm' and 'cd' disabled - edit shellbar.c to change these) Caveat: Inane is, as a quick shufty at the code will tell you, a bit of a programming exercise for me. Much of the code was originally typed in from Eric Harlow's excellent 'Developing Linux Applications with GTK+' book (New Riders Publishing, 1999, ISBN: 0-7357-0021-4), though I've changed the naming convention from Eric's by now, and bits of the rest of it were lifted from the very useful GTK+ faq and the GTK tutorial, both of which are available from http://www.gtk.org/. I really ought to have looked at the code for ls at some point, but haven't yet... :( Installation: Installation is the normal ./configure, make, make install routine. If not, please let me know. So far, Inane is known to compile on Linux 2.2 with GTK 1.2.7, if you successfully compile it under anything else, again, do let me know. The configure script tests for GTK 1.2.7 or better, but this is only because this is the version that I happened to be using. If you manage to get Inane to run under an earlier version of GTK (or know what the earliest version of GTK that should run it is), again, please let me know. As of 0.1.10, I found out about the existence of autoscan, and after using it, I have tried to include some measure of portability via the configure script. However, not currently having access to much beyond Linux, I am dependent on feedback in order to know what Inane will and won't compile on. It does seem to compile fine on Solaris, though, albeit with a couple of complaints that I haven't fixed yet. NB #1 - If you use evilwm, you should know that Ciaran has now fixed the bug, and the NOT_EVIL_WM define is now pointless, should be ignored, and will be removed. (If you don't know evilwm, imagine the most minimal window manager ever, then remove most of the remaining features. You either love it or hate it...) NB #2 - Some of the #ifdef's are probably fairly nonsensical for now, since they don't provide alternatives for machines other than Linux where standard C library functions are provided elsewhere than where my box puts them. Yep. I'm a bit of a novice. Meanwhile, I'd like to make this a reasonably portable Unix app, so do get in touch if you know what I've done wrong. As of today there's a bunch of stuff about sys/dir.h, sys/ndir.h and ndir.h which I've never heard of, and which probably ought to be defined under certain circumstances. Please tell me what those circumstances are, if you know. NB #3 - To associate zipfiles with xmame, you need to set the extra flags for xmame to 6 in order to strip the path and the file extension. Otherwise xmame doesn't know what to do with the full path to the zipfile containing the ROM images (for my version at least, which is 0.37 BETA 7) Other than that, if Inane doesn't do what you want it to do, please make it do it and send me the patch. Or, alternatively, use something else, as you see fit. Midnight Commander is getting better and better, the more I work on this, for example... :) Enjoy. Wayne Myers 5th August, 2001