You are not logged in.

#1 2009-01-26 03:09:25

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

pyfmii - nine panel wmii/mc-like file manager

pyfmii - git repository

AUR: http://aur.archlinux.org/packages.php?ID=25148
Git Source: git clone git://github.com/Procyon2/pyfmii.git

A file manager with nine panels with the looks of wmii and behavior of mc

Dependencies: python

Screenshots:

scrot20090125174315td5.th.png

Features:
- Nine panels
- Colorize by extension
- Command box that runs everything in a shell
- Tab-completion in command box
- While command box is up browse around and add items with alt+enter
- Command box pops up as soon as you start typing
- Customizable with ini-like rc file: ~/.pyfmiirc
- Multi session history (alt+p, alt+n): ~/.pyfmii_history

Usage:
./pyfmii -h
./pyfmii [ACTIVEPAD [OPENPADS]] [DIRECTORIES]
Default: ./pyfmii 1 . ~ ~ ~ ~ ~ ~ ~ ~
e.g.: ./pyfmii 2 1 9 /usr/bin ~/bin
will have panels 1 2 9 open with 2 active and 1 = /usr/bin, 2 = ~/bin, 3 = ~, 4 = ~ etc

Keybindings are on the git site

Bugs:
- ?

Recently/probably fixed bug:
- Restoring keypad mode in command win after resizing
- Files with macros work
- Opening vim in pyfmii and resizing gives an EINTR that will now be ignored.
- Resizing to a really small window caused a crash/infinite loop

Different behavior/features that I won't change:
- if with tab-completion you have a full match and there are more matches it will behave as if there was just a full match
- e.g.: dirs: "aa, aab" type: "aa<TAB>" -> "aa/"
- F2 advanced menu is not context sensitive like mc's
- you can't browse search results from '/'
- no bookmarks, ^\ will quit python actually
- F2-@ doesn't put the cursor at the start, F7/mkdir doesn't add a space so you can't begin typing right away
- mark all items marks directories too
- cd'ing to symlinks is like cd'ing to the actual file, unlike in bash/mc. I don't think this can be fixed in python

Last edited by Procyon (2009-04-06 20:07:33)

Offline

#2 2009-01-26 05:39:49

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: pyfmii - nine panel wmii/mc-like file manager

I have tried it only for a few minutes but it looks great. Will give more feedback after trying it for some time.
Why dont you post the code on github or some other free code hosting site.


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#3 2009-01-26 13:29:56

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: pyfmii - nine panel wmii/mc-like file manager

u_no_hu wrote:

I have tried it only for a few minutes but it looks great. Will give more feedback after trying it for some time.
Why dont you post the code on github or some other free code hosting site.

Thanks. And thanks for making a news post on your site.

I looked into github, it looks a bit scary, but I'll give it a try. I should probably comment the source a lot first right?


New version: 0.7

Changelog: 0.6 -> 0.7
Key conflict: mark all items. Put it on + (and added it to F1 help)
Catch KEY_RESIZE in command window
Fixed pattern unselecting not working
Added new bugs
Added "cd -" go to previous directory
Changed the config. Just trying out cd'ing not hardcoded.
- to update the config change "hardcoded" to "cd %f"
- this will help debugging tab-completion and other command box things
Fixed backslash stuff (although I doubt anyone has backslashes in filenames)

Offline

#4 2009-01-26 16:02:23

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,852
Website

Re: pyfmii - nine panel wmii/mc-like file manager

doesnt work at all here...

130 carnager@freebox ~ % python pyfm.py -h
  File "pyfm.py", line 53
    elif c == '
              ^
SyntaxError: EOL while scanning string literal


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#5 2009-01-26 16:16:46

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: pyfmii - nine panel wmii/mc-like file manager

Rasi wrote:

doesnt work at all here...

130 carnager@freebox ~ % python pyfm.py -h
  File "pyfm.py", line 53
    elif c == '
              ^
SyntaxError: EOL while scanning string literal

There is a ^K there. I think it can give problems with copy pasting the source. I'll put it up in a better site next time. For now try to download the file with the browser.

Offline

#6 2009-01-26 17:27:47

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: pyfmii - nine panel wmii/mc-like file manager

I put it on github, I wonder how that will work (first time I'm using git too). Link/instructions at the top.

I noticed and fixed a pretty big bug in macro expansion (I changed a lot of internal workings and didn't test properly).

Also try out bashrc aliases and setting attributes in the config (attr = reverse) in the lastest version.

Offline

#7 2009-01-26 17:41:48

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: pyfmii - nine panel wmii/mc-like file manager

New error

/bin/sh: hardcoded: command not found press enter to continue

And a small intro/usage  in the README would also be nice smile


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#8 2009-01-26 17:49:11

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: pyfmii - nine panel wmii/mc-like file manager

u_no_hu wrote:

New error

/bin/sh: hardcoded: command not found press enter to continue

And a small intro/usage  in the README would also be nice smile

Yes, I changed it to no longer be hardcoded so you have to specify the command now, which is "cd %f"

It is in the default config now. So if you have not made any changes to ~/.pyfmiirc, you can remove it and it will reload.

I put some more stuff in README.

github is saving me a lot of copy-pasting so thanks for the recommendation.

Offline

#9 2009-01-27 16:03:57

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: pyfmii - nine panel wmii/mc-like file manager

I just realized that alt+1-9 is commonly used in WMs, am I right? And the same for Alt+F1-F9

CTRL+1-9 doesn't seem possible because CTRL+1 = 1 and CTRL+4=^\ which, as I said before, immediately quits python.

CTRL+F1-F9 is possible. I had previously bound ^F5-^F8 to a no-confirm version.

Shift+F1-F9 is also possible
EDIT:
There is a mismatch:
Xterm Shift+F1 = F13
URxvt Shift+F1 = F11
/EDIT

EDIT: that leaves CTRL+F1-F9. I will remove all no-confirm keys. I have also put the command of F5-F8 in the configuration file so having two versions is not necessary (this will be in the next git push)

BTW Alt+1-9 (and now CTRL+F1-9) is used for setting the selected dir in the panel of the number (or cwd if a file), and it is also used in the command box to change panels (like regular 1-9) (after all you want "1-9" and "!-(" for commands)

And I noticed that the unicode space does not just not work on VC but also any non-unicode term like aterm. A normal space does work in all except in screen where it will cut off. If you go to the next window and back the bar restores, but any movement will cut it off again. Maybe there's a setting in screen that can control it. For now I removed all hardcoded unicode.

EDIT:
Screen behaves differently with "bce on" and "bce off",
off -> the long selector line is not drawn at all
on -> the long selector line is only drawn after refresh, and disappears when changing selection
/EDIT

aterm also seems to not work with curs_set(2) but it does with 1 and that is the same for everything (maybe not VC, haven't tried).


EDIT:

Config changed
If you made no changes you can remove it to let pyfmii autogenerate one, or add the following to ~/.pyfmiirc:

[basic]
#F5
copy = :cp -R -v -i -- %t %D
#F6
move = :mv -v -i -- %u %D
#F7
mkdir = :mkdir -p -v 
#F8
remove = :rm -R -v -I -- %u

EDIT:

Besides Ctrl-F1-F9, I have also made F1-F9 have the same behavior in the command box.

Last edited by Procyon (2009-01-29 13:58:50)

Offline

#10 2009-03-13 16:11:41

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: pyfmii - nine panel wmii/mc-like file manager

I put in some (questionable) experimental features. Especially about the dashes, if you have a better idea, let me know.

1. Adding dashes after the title of each panel. It makes it look more ordered and at a glance you can see about which panel you are in. But it doesn't look very good at all.

2. Adding sessions (storing all directories) in ~/.pyfmiilast
What I did before was using an alias, but this is ungainly to update.
If you liked it starting in the cwd, you now have to explicitly run it as "pyfmii ."

There is also a bug related to vim. I have no idea how it happened, but it happened a few times to me, where both pyfmii and vim were in the foreground. When I figure that out and the macro bug I will prepare it for AUR.

Offline

#11 2009-03-31 17:52:17

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: pyfmii - nine panel wmii/mc-like file manager

Good news. I finally found out how to fix the EINTR problem that showed up when you resized the window while you were running a program in it like vim. What used to happen was that both programs would get control of the screen causing quick crashing, but now vim (or whatever) will be the only one in control till you quit it.

I also fixed the macro bug. Any macro that expands to something with a macro will have a slash inserted so it will work.
So pressing F3/F4/Enter on a file called "100%fake" will work.
If you want to do that in the command window, you type "cat 100%\fake"
bash reads the \, so don't put it in " '
So only find -printf %\f\\n will work, for example.

BTW, the macro characters are t,u,f,d,T,U,F,D

I added it to AUR. http://aur.archlinux.org/packages.php?ID=25148

Last edited by Procyon (2009-03-31 20:10:25)

Offline

Board footer

Powered by FluxBB