SpaceFM: How And Why?
First, spacefm 0.5.1 is available. This corrects a few bugs that affected some installations as detailed in News.
Second, a bit on dependencies compared to its predecessor pcmanfm-mod: spacefm drops dependency on hal. It now supports udisks, but udisks is NOT a build or package dependency – spacefm interfaces with it the old fashioned way: text streams. In this way spacefm should be more resilient to changes in the udisks API, and users who don’t have udisks installed can still use spacefm (the udisks device manager will just be empty). Also, if you do still use hal, you can build spacefm with ––enable-hal, which will cause the old device manager code to be used. And there currently are deb packages available for the hal build. The hal device manager is the same one from pcmanfm – very primitive so I do recommend udisks. spacefm is devmon and then some.
The dependency on fam|gamin has also been removed, replaced with inotify kernel support. So spacefm has fewer dependencies than pcmanfm-mod, yet with greater functionality. I don’t like dependencies – they are sources of endless trouble because the APIs and libraries keep changing – a real problem in Linux. Plus spacefm, like pcmanfm-mod, is somewhat retro, so I have no intention of making it dependent on gvfs.
Third, here’s a start for those interested in the background…
spacefm is NOT pcmanfm or pcmanfm-mod, so don’t expect it to be. It’s quite a different beast, but its design is certainly inspired by pcmanfm, and it still uses some of the pcmanfm code, most of it modified, plus lots of new code. That’s why it’s being released under a new name and as a test version – there is a lot of new code that needs time to mature.
I was considering writing a new fm in gtk3 to try out some ideas I’ve had, but I don’t like using the latest toolkits as they’re always changing, which makes for bugs (it’s not easy developing stable software when everything its based on is changing, as is too much the case in Linux). And who wants a file manager that doesn’t WORK? Plus I didn’t feel at the time that I knew gtk well enough (I do now!) Plus a fm is a massive project to start from scratch.
This got me rethinking pcmanfm-mod. I’ve spent some time debugging its built-in vfs the last couple of years, and I found it very fast and stable. It uses core C and glib I/O functions, so it doesn’t crash with every change to some library, and I can modify or correct parts of it to do whatever I need. It is because pcmanfm-mod ran so solid and had few dependencies (eg no gvfs) that I decided to use it as a base for developing spacefm. I didn’t know if I would succeed in what I wanted to do, but I figured it was a good target for experimentation.
spacefm is experimental, especially in the UI department. This is not your typical file manager, at least in some ways. There are enough of those that work well, so I wanted to get more creative with it. I always hear from users how they want things their way, and I do too! So I wanted a UI that was very flexible, and also had a good memory for remembering and allowing user options and settings. To give you an idea, pcmanfm remembers about 20 settings or so in its config file. A typical spacefm config file remembers about 1000 settings, and that number only gets higher as you add custom commands and customize parts of the program. spacefm remembers just about everything in terms of preferred dialog sizes, program options, menu options, fonts, icons, etc. (If it forgets something you want it to remember, let me know – this is one of the key design aspects.) This design blurs the line between development and use – in using spacefm you are the developer of your own version of it, and you can make it look and work quite uniquely. As you use it, it begins to change and conform to your uses, sort of like a baseball glove that breaks in with use. It’s up to you to decide if I achieved this, but that was the idea. It can seem a little unusual at first though, like a new baseball glove, so give it a chance to break in.
Another aspect of this design is that it’s supposed to be always changing. The ‘space’ in spacefm is much like a room. If you move a chair or a couch in a room of your home, you expect it to be in the same place the next time you walk into the room – it doesn’t magically pop back to its original location. For the most part, everytime you start spacefm it’s exactly as you left it. It’s a space that you’re always changing gradually as you use it.
The other big design priority was easy integration with bash. Having to modify C code everytime I want my fm to do something is a pain. Yet fm UI’s are easier than bash for dealing with lots of folders, long filenames, etc. – click and copy. I wanted it to work like a word processor, where I can create a quick macro to do something repetitive or intelligent. And I may keep some macros long term, while other macros I’ll delete after a few uses – they served their purpose. It’s much easer to whip up a bash script than compile C code.
And I’ve missed multiple panels since I gave up using KDE and Krusader. Tabs are great, but sometimes it’s so handy to have folders next to each other for comparison, without trying to manage multiple windows. Yet pcmanfm was never designed for multiple panels, and the author has even stated it will never have them.
One other thing – I and some users of pcmanfm-mod didn’t like the handling of popup dialogs and errors. So I designed a task manager that provides flexibility in this area, and also allows custom commands to be integrated into the task management – you can add your own popup dialogs for your commands, with error detection and more.
About 4-5 months ago I began tearing apart all the source code of pcmanfm-mod thinking, “How will I EVER get all of this back together again and working?” spacefm is pcmanfm-mod after major Frankenstein surgery, with large sections of new code grafted into it, and old code used in ways it wasn’t originally designed for. I added support for up to four panels, which allows a combination of side-by-side and vertical (plus tabs too). And I added a custom data set for giving it a practically infinite memory for settings, custom commands, etc., and this memory is automatically saved with your session. This makes it very easy to add additional user options, etc (unlike having to code each one independently in pcmanfm-mod). Plus the new Design Mode, a tricky and unique use of gtk’s menus, allows the user to change the menus, keys, icons, etc. (On this topic, Design Mode currently doesn’t work without a mouse, or the ability to ctrl- or middle-click, so if you need a keyboard mode please let me know. I tried once at that and failed, but I plan to revisit it. If I know it’s a priority for you I’ll move it higher on my list.)
It’s not easy designing a multiple-panel file manager with all of this flexibility while still retaining pcmanfm’s simple, clear interface. Yet I didn’t want a program that looked like the control panel of the space shuttle. I wanted it to be as simple as possible, and as direct as possible. A setting for anything should be directly accessible from that object (in a context menu for example), rather than having to hunt it down in a list of options. To me this makes use much easier.
I think I did pretty well with this, but I’ve been looking at every detail of it for so long it’s hard to tell. I’m still getting to know spacefm myself – I haven’t actually had a chance to use it much yet. I’ve been using daily builds of it on my HTPC for a few months with great results – I love being able to customize the panels and columns, plus the large fonts on the tv. It can create some unique views. As for the custom commands, I’m just starting to use those seriously myself.
Anyway I hope you enjoy spacefm, or at least give it a try when you’re comfortable with its stability level. I’m somewhat burned out after working on it intensely for several months. I’d like to use it a bit to get an idea of how it works in practice, plus get the existing features as stable as Linux allows. As a free software author I don’t make any promises or deadlines, but I can certainly see myself working on this more from time to time. And in the design I left a lot of space to accomodate ideas that I knew I might want later, so I think it has a lot of potential for growth despite being (deliberately) retro.