GP2X A Unified File Manager For The Gp2x


SirDzstic

Member
Joined
Nov 14, 2005
Messages
187
Hi,

yesterday i wrote a little file manager. Unlike the interface
that's being shipped with the GP2X it can handle files with
arbitrary extensions in a user-defined way.
It uses a config file, in which the file extension and the
according interpreter is being stored one line at a time.
e.g.:
sh /bin/sh
txt /usr/bin/less

I didn't manage to link it agains my cross-sdl, but it
works just fine natively on my computer. I'd be very
happy if somebody compile it, and provide me the
binary, so I can upload it to my FTP space.

To compile, you must tell my configure script, for which
target it should be compiled. (Edit the Makefile.arm
according to your cross compiler)
TARGET=i386 ./configure
TARGET=arm ./configure

Then the usual make && make install. It will be
installed into ./inst, so root-privileges are not
necessary

ftp://ftp.berlios.de/pub/gb4gp2x/unify-0.0.3.tar.gz

I guess my english sucks ass, but maybe
somebody could understand me :>
 
I changed a few things to get it to link properly.

New Source tarball
Binary distribution

It'd be nice to get some feedback :>

Hello SirDzstic. It looks like a good start. I have a few suggestions:
  • L button goes back to the parent directory. That's good, but to be more consistent have R button go into the selected file/directory. Then we have a nice left/right action for file browsing.
  • The stick click should do that as well. Some people prefer stick clicks.
  • Holding the stick down or up should keep the cursor moving. The SDL documentation example 3-12 shows you how to do it.
 
Last edited by a moderator:
Also what about, popup-menus that allow multiple options for executing different scripts.
Depending on the filetype.

You could have a X_FILE.ZIP which could be anything. Some button combo could open a small menu that gives a choice of what script to run for '*.ZIP'
 
I did some more work on it.

The Buttons are now mapped as suggested by swf.
The possibility to keep the cursor moving by holding
up/down is implemented, but disabled, because the
cursor moved too fast this way. I'll correct that soon.

When putting a line like "gpe *" into the config, the
according file will be executed itself.

Source
Binary
 
Revision 0.0.7
New: Basic Theme support
The old Theme sucked major ass; now it can
more easily be customized by editing the theme.conf

IMAGE background image (bitmap format)
DRCOL Directory colour (R G B)
FNCOL File colour (R G B)
BGCOL Background color (R G B)
ARCOL Arrow color (R G B)
AGCOL Arrow background (R G B)
It won't be correctly interpreted if it's in any way
different from the format of the sample config,
so don't confuse unify with newlines or something
like that.
The first column is being ignored, though... it's
only there to aid in your confusion ;)

unify-0.0.7.png

Source
Binary

I got some very interesting suggestions, which I
hopefully will implement in the next revision, but
that shouldn't stop you from giving me new ones.

And don't forget to complain about what sucks about
unify, so I can fix it :>
 
Seems like you don't care about it anymore, but:
I guess the new changes justify an increase in the minor revision number,
as unify now actually manages files :>

New: Config file format beautified
theme default.utm
ext gpe {
icon exec.bmp
call *
}
ext gpu {
icon exec.bmp
call *
}
ext txt {
icon text.bmp
call /usr/gp2x/EBookViewer
}

New: Copy and move files
1. Select the file, by pressing "Select"
2. Switch to the destination directory
3. A to copy; B to move the file there.
New: Status bar
New: Beautiful theme by me :)
unify-0.1.0.png


Don't forget to complain about everything that sucks about the new revision.

As always:
Source
Binary

n.b.: My rechargeables said "goodbye" just as i wanted to test the new
binary. Maybe it works, though ;)
 
Another update for my one-man thread... Revision 0.1.1

Changed: Scrolling with Volume+/-
New: Themes get their own directory
New: Files get icons
New: "." and ".." hidden
New: The window finally has a name ("GP2X Executive")
New: Fun with deleting files(Select file, don't move the cursor, press X)

n.b. I assume the user knows what he wants, so no lame "are you sure?"
"yes" "are you really sure?" "yes" "are you really really sure?" "yes ffs!"
just plain deletion.

Screenshot:
unify-0.1.1.png


Source
Binary

Bad:
mplayer, shipped with the gp2x, segfaults when invoked, and is thus useless.
The viewers and players don't like command-line arguments.
Maybe I should have checked this before, but these facts reduce the
value of unify a lot, as I don't have time to write a movie player etc.
Any suggestions about that point would be very appreciated :/
 
n.b. I assume the user knows what he wants, so no lame "are you sure?"
"yes" "are you really sure?" "yes" "are you really really sure?" "yes ffs!"
just plain deletion.

are you sure? would be nice actually... if you press the wrong button and suddenly lose a file you wanted you're gonna be peeved... its annoying at times, but its a nice feature :) unless delete is somewhere hard to get to? (i've not actually tried this yet so I dunno)
 
Last edited by a moderator:
How about user settable colours for filetypes?
red for executables, white for text, green for scripts, ect...

what about a double-tap or R-top + A combo for more dangerous actions like move/delete?

If its a 'dangerous' action it should be harder to do.

And what about the multi-function popup menu?

what If I want to use 5 different text editors?? instead of one...? ;)
How do I pick the one I want?

Edit: OOps... did not see your updated icons... looking good. ^_^
 
what about a double-tap or R-top + A combo for more dangerous actions like move/delete?

If its a 'dangerous' action it should be harder to do.

And what about the multi-function popup menu?
You need to select the file first (press the select button) and then press the delete button with the
cursor pointing at the exact same file.

It's a bit harder to delete a file accidentally the way I implemented it, than just pressing the "delete"
button, as i think the user doesn't want to copy or move a file to the same directory (which will get
him an error message anyway).

I just wanted to point it out in case it wasn't clear in the first place. If this is in fact dangerous, I will
change it in the next release.Combos could be easily implemented, if requested.
what If I want to use 5 different text editors?? instead of one...? ;)
How do I pick the one I want?
By now you can't. This is indeed worth being implemented, but it needs time. I'll have to make some
big changes to the config parser for this.

Someone suggested that it should be possible to browse archives. I like the idea, but this will be
really hard to do, as there are many types of archives available; some even proprietary (e.g. rar
archives).
I doubt this feature will be implemented into the main interface. Maybe someone would like to write
a frontend for this, which uses the current theme of unify, and which could be called from there, so
the user wouldn't notice it's actually a different program.

I really need some frontends to make unify usable, as the Viewers shipped with the gp2x don't seem
to be accepting command line arguments, and I can't write a movie player in five minutes, to ship it
with the next revision :/

€:
Another feature request, which I really liked, was to parse the file names using regular expressions.
There are libs available, which I could link against unify.
I'm not quite sure though, whether it'd be a good idea to force anybody who "just wants to use" the
program to learn how to compose a regular expression matching his wishes.
Although it works quite well the way it is now, recognizing file types by their extension really sucks.
Using regular expressions might even obsolete the need for a special menu, in which the user has
to select the matching application, by using different regular expressions for each application.

What do my customers (;)) think about that idea?

€2:
I've just been told on IRC, that it's possible to use madplay as a frontend for audio playback.
 
Last edited by a moderator:
Regular expressions... I guess, but it might be a pain. You could try to match the regular expressions, then if none match, open it with the default one.

It sucks that mplayer can't be used from the command line (segfaults... Gah, I hate segfaults), but good luck in making our lives easier!
 
The Unix command line tool "file" would be a more robust (but slower) way of identifying file types.
 
Hi,

since yesterday, I have to visit the university again,
so I won't be able to do much work on unify for some
time.
Anyone's invited to take my source, and make their
visions come true, though ;)

SirDzstic
 
blleah, I know this is a really old thread. but I just wanted to reply to this.

Bad:
mplayer, shipped with the gp2x, segfaults when invoked, and is thus useless.
The viewers and players don't like command-line arguments.
Maybe I should have checked this before, but these facts reduce the
value of unify a lot, as I don't have time to write a movie player etc.
Any suggestions about that point would be very appreciated :/


FFplay does, I just tried it. using code like this..

Code:
ext (rm or rmvb or wmv or avi) {
	icon movie.bmp
	call /mnt/sd/FFPlay/ffplay
}

the files opened, I could tell because I could hear the garbled sound from one or two of the files I tested. (extensions I mentioned in the code being ones I'd tested) but there was just a black screen. the avi played fine, however. but that was one the gp2x supports anyway.

I would also like to mention that for some reason, the unify prog didn't like it's own background image (default.bmp) and didn't show it. resulting in a HOM-esque effect with the text.

unify works great! we should be getting on the backs of the guy who made ffplay! :D
 
Last edited by a moderator:
Back
Top