DesktopFolders

Author: Iñigo Serna, inigoserna AT gmail DOT com
Version: 1.0, Oct 9th. 2011
Home page:https://inigo.katxi.org/devel/DesktopFolders/ or http://www.terra.es/personal7/inigoserna/DesktopFolders/
License:

(C) 2011, Iñigo Serna

This software has been released under the GPL License version 3 or later, read the COPYING file that comes with this package for more information.

There is NO WARRANTY.

Last update:Sun Oct 9 15:52:29 2011

Table of Contents

Introduction

DesktopFolders is a FolderView-like application for the desktop.

The basic idea is that you have one or more interactive areas in your desktop background showing the contents of the configured folders. These areas are views of the real directories. Everything you do in these areas are also done in the attached folders, they are like small file browser windows.

I think the original idea comes from KDE 4, but I only run FolderView screenlet for a few days while coding this program so some ideas and look are taken from it.

Although I wrote DesktopFolders to be used on a GNOME 3 desktop, it could be run on any other environment too, but gtk+ based desktops (GNOME, XFCE, LXDE...) are probably where it would fit best.

Note it depends on gtk+ v3.x so it requires a pretty modern environment.

Some screenshots:

df-1.jpeg df-2.jpeg
A DesktopFolder Contextual menu

Using DesktopFolders

First time you run DesktopFolders it will show a window with the contents of your HOME folder at position (100, 100) on screen.

Right-button click with the mouse and open the preferences dialog, where you can configure the folder, filter attributes to show or hide files, and finally some interface settings.

The show only and exclude lists could contain terms separated by a comma. They are normal case-sensitive (parts of) filenames, not regular expressions or globs. For example, to select your family photos, type something like this:

Show only list: png,jpeg,raw,xcf
Exclude list  : porn,xxx

Instructions

All of these actions must be performed with mouse pointer inside the DesktopFolder window:

* move window: alt+button1 and move pointer
* resize window: alt+button2 and move pointer
* close window: alt+button3 then close, or from contextual menu
* fit window size: button2 on free background or from contextual menu
* open containing folder: button1 on header or from contextual menu
* open file/folder: button1 on item
* select or unselect item: ctrl+buttton1 or button2 on item
* copy file(s): button1 and drag & drop
* move file(s): shift+button1 and drag & drop
* link file(s): ctrl+shift+button1 and drag & drop
* contextual menu: button 3:
  - open containing folder, open item with
  - toggle select item, select all, unselect all
  - move item to trash, move selected items to trash, rename item,
    create new folder
  - create new DesktopFolder, remove this DesktopFolder, fit window dimensions,
    preferences, about

Button1 means mouse left button click, Button2 middle and Button3 right.

Note that a DesktopFolder can be the source and/or the target of drag & drop operations, so you can copy/move/link files or folders between different DesktopFolders or even to/from nautilus or any other file browser application supporting drag & drop.

Configuration

Configuration file can be found in ~/.config/DesktopFolders/config.ini. You should not edit this file by hand.

The settings are saved when creating or deleting a DesktopFolder, when closing preferences dialog, and every 60 minutes. This is needed to preserve windows position and size, as saving everytime we move or resize windows would lead to excessive file system writing operations. If you want to force a configuration saving, open and close the preferences dialog.

Random notes

. A DesktopFolder can show local or remote URIs. But currently you can't
  select a remote URI from folder selection dialog in the preferences.
  A workaround is to edit the configuration file by hand
. Remove item(s) uses trash first, but if it doesn't work (f.e. for remote
  files) it will fallback to delete

Download, Code, Building, Installing

DesktopFolders is written in vala language.

To build it you need: vala (tested with 0.14.0), libgee (tested with 0.7.1) and gtk+ 3.x (with its dependencies: glib, cairo, pango...).

Download sources from DesktopFolders-1.0.tar.gz.

To compile:

$ valac --pkg gtk+-3.0 --pkg cairo --pkg gee-1.0  -X -O3  DesktopFolders.vala -o DesktopFolders

DesktopFolders is a standalone self-contained application. You can copy the binary to any directory in the PATH or run it from the directory where you built it.

For example, to install in /usr/local, type as root:

# cp DesktopFolders /usr/local/bin
# cp DesktopFolders.desktop /usr/local/share/applications

Then run DesktopFolders from a terminal or from a "Run application dialog" (Alt+F2 in GNOME).

If you want to make DesktopFolders start automatically with your session, run gnome-session-properties and add a new entry to the Startup Programs list or copy DesktopFolders.desktop file to ~/.config/autostart directory.

Wishlist, Limitations, and Bugs

Next there is a list with some limitations of the program:

. Move file(s) to trash: GLib.File.delete() doesn't handle folders,
                         GLib.File.trash() does, so this won't be a
                         problem for local files
. DnD as target: GLib.File.copy() does not recurse into directories
. If DnD failed -> don't clear selection
. DnD: does not show thumb as drag source icon
. Preferences: folder selection button does not allow remote URIs
. Monitor path: how to launch thumbnailer on new items?
  Gnome.ThumbnailFactory only on GNOME v2?