You are not logged in.

#1 2010-05-23 17:07:44

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

qtFM - Small, fast, light Qt filemanager

Hey all,

I have been working on my own filemanager and thought I would share it here if anyone's interested.  Its small and fast and does the basic things I need from a file manager without the bloat.

Only dependency is Qt.

qtFM is in [community], grab it with pacman and try it out!

fmthumb1.jpg fmthumb2.jpg fmthumb3.jpg

Hopefully someone may find it useful.

Cheers,
Wittfella

Last edited by Wittfella (2010-12-24 01:13:53)

Offline

#2 2010-05-23 17:10:40

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: qtFM - Small, fast, light Qt filemanager

Wow nice. It doesn't affect me since I'm just using coreutils but is there a gtk-version in planning?

Last edited by orschiro (2010-05-23 18:41:59)

Offline

#3 2010-05-23 18:37:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: qtFM - Small, fast, light Qt filemanager

> Only dependency is Qt.
Damn small it is ;-)

Offline

#4 2010-05-23 18:41:50

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: qtFM - Small, fast, light Qt filemanager

Nice! I have bin looking for a lightweight filemanger which uses QT for a while now. This is pretty much exactly what I have been looking for.
Thanks, for sharing it! smile

<edit>
Playing around with it and there is one thing that I am missing and that is that it always starts at my home directory. It would be nice if it opened the directory that I am entering as an argument.

For example if I type: filemanager /mnt
Then it would be nice if it opened the /mnt directory.

Anyway, beside that it pretty much covers all my need for a filemanager so thanks again!
</edit>

Last edited by PJ (2010-05-23 18:57:46)

Offline

#5 2010-05-23 20:47:33

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: qtFM - Small, fast, light Qt filemanager

I suggest you give it another name to distiguish it from other filemanagers. Maybe slimfm, if that does not exist already.

Offline

#6 2010-05-23 22:07:47

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: qtFM - Small, fast, light Qt filemanager

Nice.

Found a bug, it cannot open files with a space in their names:

xdg-open: file '/media/WD6400AAKS/Series/TBBT/Season%203/the.big.bang.theory.s03e07.hdtv.xvid-fqm.avi' does not exist

Offline

#7 2010-05-23 22:36:38

Yannick_LM
Member
Registered: 2008-12-22
Posts: 142

Re: qtFM - Small, fast, light Qt filemanager

Good work !

I really like the fact it just does the minimum.

Just a small patch , for the "runTerminal" to be able to run an other terminal emulator

EDIT: better patch:

diff -urB ../filemanager-1.0/src/mainwindow.cpp ./src/mainwindow.cpp
--- ../filemanager-1.0/src/mainwindow.cpp    2010-05-23 18:12:37.000000000 +0200
+++ ./src/mainwindow.cpp    2010-05-24 01:04:23.000000000 +0200
@@ -245,8 +248,7 @@
 void MainWindow::terminalRun()
 {
     QProcess *myProcess = new QProcess(this);
-    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
-    myProcess->startDetached(env.value("TERM","urxvt"),QStringList(),pathEdit->itemText(0));
+    myProcess->startDetached(term,QStringList(),pathEdit->itemText(0));

 }

@@ -500,6 +502,17 @@
     foreach(QString key,settings.childKeys())
         addBookmark(settings.value(key).toString(),style()->standardIcon(QStyle::SP_DirIcon));
     settings.endGroup();
+
+    if (settings.contains("prefs/terminal"))
+    {
+        term = settings.value("prefs/terminal").toString();
+    }
+    else
+    {
+        QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+        term = env.value("TERM","urxvt");
+        settings.setValue("prefs/terminal", term);
+    }
 }

 //---------------------------------------------------------------------------
diff -urB ../filemanager-1.0/src/mainwindow.h ./src/mainwindow.h
--- ../filemanager-1.0/src/mainwindow.h    2010-05-23 16:18:04.000000000 +0200
+++ ./src/mainwindow.h    2010-05-24 01:01:21.000000000 +0200
@@ -131,6 +131,9 @@
     QAction *pasteAct;
     QAction *terminalAct;
     QAction *executeAct;
+
+    /* name of the term to run */
+    QString term;
 };

 #endif

Just edit  ~/.config/Wittfella/FileManager.conf

so that it looks like:

[prefs]
terminal=sakura

Last edited by Yannick_LM (2010-05-23 23:08:53)

Offline

#8 2010-05-23 23:31:52

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: qtFM - Small, fast, light Qt filemanager

Stefan Husmann wrote:

I suggest you give it another name to distiguish it from other filemanagers. Maybe slimfm, if that does not exist already.

CuteFM

(Qt FM) tongue

Offline

#9 2010-05-23 23:38:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: qtFM - Small, fast, light Qt filemanager

@flamelab
Wow, that's one fitting name :-)
Have you ever thought to become a copywriter?

Offline

#10 2010-05-24 15:02:00

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: qtFM - Small, fast, light Qt filemanager

Hey all,

Thanks for the feedback, updates below.

@flamelab
That would have been a great name!  I did a quick google search and a CuteFM filemanager came up however, so better not use that.
I just went with qtFM for now, unless anyone severely objects.

@Yannick_LM
I understand the patch ok, but I'm not sure why you want that exactly.  It should run the default terminal you have in your $TERM environment setting.  Are you saying that you want to run a 'different' terminal than you usually use whilst using the filemanager?  Did it not work for you, did you check your $TERM variable?

@karabaja4
Fixed the 'spaces in name' problem, should be good now.

@PJ
Added your request, will now start at the directory specified on command line if provided.

@orschiro
No gtk from me I'm afraid sad

@karol
Well...you have to a gui framework installed to run a gui filemanager, so dependency is effectively zero smile

PKGBUILD : qtfm.tar.gz
AUR: qtfm-1.1

Cheers,
Wittfella

Offline

#11 2010-05-24 16:54:46

yngwin
Member
Registered: 2009-05-08
Posts: 67

Re: qtFM - Small, fast, light Qt filemanager

Thank you, this looks very promising!

Note that the md5sum in the pkgbuild in aur is incorrect, so this needs to be updated.

Offline

#12 2010-05-24 17:37:00

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: qtFM - Small, fast, light Qt filemanager

Wittfella wrote:

@karabaja4
Fixed the 'spaces in name' problem, should be good now.

Still can't run it.

It runs the whole string after space, thus opening the wrong file. For example, running:

/something/Season 3/example.avi

runs

3/example.avi

P.S. Maybe you could add some rudimentary filetype icons? wink

Offline

#13 2010-05-24 18:21:12

Yannick_LM
Member
Registered: 2008-12-22
Posts: 142

Re: qtFM - Small, fast, light Qt filemanager

I understand the patch ok, but I'm not sure why you want that exactly.  It should run the default terminal you have in your $TERM environment setting.  Are you saying that you want to run a 'different' terminal than you usually use whilst using the filemanager?  Did it not work for you, did you check your $TERM variable?

Well, I'm using sakura, and if I set TERM to sakura I got:

TERM=sakura zsh
zsh: can't find terminal definition for sakura

Besides, from this page:

TERM
    This specifies the kind of terminal that is receiving program output. Some programs can make use of this information to take advantage of special escape sequences or terminal modes supported by particular kinds of terminals. Many programs which use the termcap library (see Find) use the TERM environment variable, for example.

So using $TERM to know the name of the terminal to run does not sound like a good idea.

So read the default term from the settings seemed the good thing to do....

(my default terminal is set somewhere in the configuration files of WMII ...)

Offline

#14 2010-05-24 20:55:00

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: qtFM - Small, fast, light Qt filemanager

Wittfella wrote:

@PJ
Added your request, will now start at the directory specified on command line if provided.

Nice! smile

I was just missing one thing and that was that qtFM didn't work with firefox so I wrote some code, not really that great code but it works. smile
Firefox (and probably other browsers) add a file:// before the path so that thing needs to be removed if it is supposed to work with firefox.

Not sure if you want the code but here are the changes that I did:

*** mainwindow.cpp.orig 2010-05-24 17:46:34.000000000 +0200
--- mainwindow.cpp      2010-05-25 20:20:01.000000000 +0200
***************
*** 26,33 ****

  MainWindow::MainWindow()
  {
!     if(QApplication::arguments().count() > 1)
!       startPath = QApplication::arguments().at(1);
      else startPath = QDir::currentPath();

      splitter = new QSplitter;
--- 26,37 ----

  MainWindow::MainWindow()
  {
!     if(QApplication::arguments().count() > 1) {
!         QString prefix = "file://";
!         startPath = QApplication::arguments().at(1);
!         if (startPath.indexOf(prefix, 0, Qt::CaseInsensitive) == 0)
!             startPath.remove(0, 7);
!     }
      else startPath = QDir::currentPath();

      splitter = new QSplitter;

Last edited by PJ (2010-05-24 21:08:10)

Offline

#15 2010-05-25 02:35:27

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: qtFM - Small, fast, light Qt filemanager

@karabaja4
Oh man! I'm not sure what the deal is here.  I use generic xdg-open on my system and it works ok with my files.  What 'DE' are you using?  Anyway I tried something else, I tokenised the argument name replacing space with "\ ".  Can your grab the source again and give it a try.

@Yannick_LM
I see now, I didn't account for the possibility that $TERM might have multiple entries.  Can you also try again now please.

Cheers,
Wittfella

Offline

#16 2010-05-25 03:35:54

moslem.b
Member
Registered: 2010-05-03
Posts: 3

Re: qtFM - Small, fast, light Qt filemanager

very nice ...

Offline

#17 2010-05-25 09:46:45

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: qtFM - Small, fast, light Qt filemanager

Wittfella wrote:

@karabaja4
Oh man! I'm not sure what the deal is here.  I use generic xdg-open on my system and it works ok with my files.  What 'DE' are you using?  Anyway I tried something else, I tokenised the argument name replacing space with "\ ".  Can your grab the source again and give it a try.

Still can't open, seems "\ " didn't help.

It happens on two separate computers on two different WM's (no DE) - one is Compiz, other is Openbox.

Please try to reproduce the bug like this:

Create folder named "Season 3" anywhere, put some avi file inside and open it with VLC - detailed error report should pop up.

Offline

#18 2010-05-25 14:23:34

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: qtFM - Small, fast, light Qt filemanager

Ok, that was annoying!  I have been mucking around with this for hours trying to figure out why passing arguments with spaces is not working and I eventually found that the problem is in xdg-open (for us generic, no DE people).  I found a bug report here:

http://bugs.archlinux.org/task/19305

The comment at the bottom with the two patches has the fix.  Its basically just adding some quotes around a parameter, takes 2 seconds.

@karabaja4
Can you try the above fix on your xdg-open and give it a go.  Its working fine for me. I also changed the source again and removed the tokenising we tried earlier if you want to download again.

[rant]
I hate xdg-open so much, it has been a complete cluster for years for non-DE systems.  Recently it actually became useful if you installed perl-file-mimeinfo, but its still got bugs dammit!  Why do we even have to install perl to fix it anyway when it can be done with half dozen lines of bash script.  It just drives me nuts...
[/rant]
sorry

Last edited by Wittfella (2010-05-25 14:26:54)

Offline

#19 2010-05-28 09:13:43

ApotheoZ
Member
Registered: 2009-08-10
Posts: 40

Re: qtFM - Small, fast, light Qt filemanager

filetype icons would be great.
Anyway, it's just what I was looking for.
Thank you !

Offline

#20 2010-05-31 20:54:47

tzervo
Member
From: Athens
Registered: 2009-04-03
Posts: 86

Re: qtFM - Small, fast, light Qt filemanager

I think the correct variable for the purpose of choosing the default terminal is $TERMINAL, not $TERM. Maybe you should consider using that instead
smile

EDIT: for opening mime types, there is also mimeo, take a look at it, I found it infinitely more useful than xdg-open for DE-agnostic environments

Last edited by tzervo (2010-05-31 21:01:45)

Offline

#21 2010-06-02 03:08:27

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: qtFM - Small, fast, light Qt filemanager

Hello, I have added some stuff including file icons.

File icons are a bit of a pain because pure Qt doesn't seem to support full mime type file icons.  It has some basic support for using your current theme icons for common items that appear on toolbars etc.  Also its theme detection only really works if you are using one of the major DE's.  So I have added some code to detect the current icon theme properly for non-DE environments so the menu/toolbar icons should now fit in with the rest of your programs.  I have also added filetype icons using the mime information.

Also added a small gui to change the xdg/mime default program file associations easily.

tzervo wrote:

I think the correct variable for the purpose of choosing the default terminal is $TERMINAL, not $TERM.

I wasn't sure about $TERMINAL, I don't have that set in my env.  Anyway this auto-detect thing seems problematic so I changed it to a user setting.  The first time you click terminal command it will ask you what you want to use.

Cheers,
Wittfella

Offline

#22 2010-06-03 16:39:50

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: qtFM - Small, fast, light Qt filemanager

Updated v1.3

CHANGELOG wrote:

1.3    3-June-2010
- added size indication to statusbar when selecting files.
- fixed bug in Qt DragDrop system not working on folders.
- fixed bug in Qt 'QFileSystemModel::remove' function when trying to delete hidden files.
- fixed issue when trying to delete symbolic links.
- fixed issue if non-existant path is entered into the path editbox.

Offline

#23 2010-06-03 20:30:10

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: qtFM - Small, fast, light Qt filemanager

Nicely done.

I have a few problems with icon scales tho:

qtfm_iconproblems_thumb.png

Marked red are icons hugely off the scale. It's similar in the other menus, too.

Marked blue are the small icons, but as far as I can tell, you used the big ones and then resized them afterwards to correct size. This doesn't look so hot (antialiasing sucks), as you can see in the screenshot. Would it be possible to use correct size icons direcly from the icon pack?

Really nice job so far, keep up the good work smile

Offline

#24 2010-06-03 22:56:46

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: qtFM - Small, fast, light Qt filemanager

Few more bug reports/suggestions:

- If you try to delete an empty folder, first it gets deleted, and then warns you that folder is not empty and if you click yes qtfm segfaults, if you click no it still gets deleted lol
- Perhaps drag and drop files should be move instead of copy (more practical)?
- It would be nice if qtfm could remember column sizes.
- It would also be nice if we could hide the extra buttons/menus smile

Offline

#25 2010-06-03 23:56:51

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: qtFM - Small, fast, light Qt filemanager

Hello,

I can't see the pic you posted about the icons.  What icon theme have you got set so I can try it?  I have tried a bunch of themes and they look fine.  I don't explicitly set any size, the Qt function somehow figures out the best size to use and everything looks good for the themes I tried.

I left the DragDrop copy only for now because it wasn't working properly for folders, I will look at making it 'move'.

I don't understand the delete problem.  Are you sure the folder is empty...it should only ask for confirmation if its not empty.  Is there anything else different, like is it the local filesystem or a mounted ntfs filesystem etc.  I changed the if statements around a bit, can you try it again also.

Last edited by Wittfella (2010-06-04 00:11:21)

Offline

Board footer

Powered by FluxBB