Sunflower – A small, highly configurable file manager

Practical Sunflower

As with other file managers, switches at the bottom of the main window apply frequently used file operations, such as copy or move, to the current selection. To display or hide this bar as required, click View | Show command bar. Selecting Silent mode when you Copy of Move items makes lengthy file operations convenient by displaying error messages collectively at the end of all processes (Figure 3).

Figure 3: For file operations, the Sunflower file manager has special options, such as "Quiet mode".

To add bookmarks to important and frequently used directories, use the bookmark button in the header bar of the panel; Sunflower lets you to use intuitive names. Selecting Edit | Preferences | Bookmarks (or pressing Ctrl+B) calls the bookmark manager, where you can manage and rearrange your bookmarks. To access saved bookmarks directly, press Alt+<n> to go to bookmark n.

One of my favorite features is the ability to select all the files that match the file type of the currently selected file by pressing Alt+Num++ in the numeric keypad. For example, you can copy all RAW files from the memory card of a digital camera with just a few keystrokes. Pressing Alt+Num+- inverts this operation and excludes the file type of the currently selected file from the selection. You can monitor the progress of longer file operations under Operations without the file manager blocking further actions.

A relatively new feature in Sunflower is the way the file manager manages the directories you visited in a history. Ctrl+Backspace opens the corresponding history window (Figure 4) and supports certain actions with the existing entries. Pressing Ctrl+L opens a specific directory, as in some other file managers. The command is linked to directories that you can access directly.

Figure 4: Previously used commands are stored in a history.

Sunflower offers different methods of sorting the file list: the file manager usually sorts enumerated files (e.g., 1.png, 10.png, 2.png, 21.png) alphabetically, but you can go to Edit | Preferences | Item List | Operation | Number sensitive item sorting to change to a numeric sort order. Now you'll see the files sorted correctly as 1.png, 2.png, 10.png, 21.png (Figure  5).

Figure 5: Adjusting how numeric directory entries are sorted.

In the same dialog, you will also find the settings for a quick search. To select a specific directory, just type its name. Sunflower then jumps letter by letter to the desired destination, and you do not even have to start with the first letter of the file name; for example, to find the file IMG4711.jpg, you can simply enter 47. If do not like the quick search live, you can enable after an additional switch is pressed (i.e., Ctrl, Alt, or Shift).

A very powerful plugin is enabled by default in the file manager for batch renaming of larger selections of files. Clicking Tools | Advanced rename (Figure 6) automatically applies the tool to previously selected files. In the template, you specify the name; pressing N or, say, N0-3 accepts the old name, or only parts of it; pressing E lets you add the appropriate file extension, and C adds a counter to the new file name.

Figure 6: Especially when renaming multiple files, Sunflower offers many useful options.

Expandable

One of Sunflower's strengths is its extensibility through plugins. The Sunflower wiki on Google Code [5] describes the structure of the plugins and also presents a simple example. Users with Python skills will not find it difficult to develop their own extensions or supplement existing ones. On the project page [6], you will also find more extensive Sunflower extensions, such as image manipulation (which no longer needs an up-to-date python2 library), archive management, and a SQLite viewer.

To install the plugins, unpack the downloaded archive to ~/.config/sunflower/user_plugins/<pluginname> in your home directory. After you restart the file manager, the plugins are available in the form of new menu items and functions.

Commands

One particular strength of Sunflower is that you can integrate arbitrary terminal commands seamlessly via the Commands menu. You thus have the option of adding your own custom commands (e.g., mogrify-format jpg "%S" to convert images to JPG format) and applying them to selected files or directories. Clicking Commands | Edit commands opens the corresponding dialog box (Figure 7).

Figure 7: Functions can be extended to include your own commands.

Sunflower supports three variants in terms of arguments for the commands: %l represents the selected files in the left panel, %r the files in the right panel, and %s those in the current (active) window, with lowercase and uppercase options in each case.

Uppercase tells Sunflower to pass the absolute path to the command. But, watch out: As in the terminal, you need to pay attention to spaces in the paths (i.e., you need to quote the arguments, as in "%S"). If you terminate the line with an ampersand (&), the programs run asynchronously, as in the shell.

An underscore in a command name, such as _resize, lets you define keyboard shortcuts and thus quickly call your own commands. This function was not fully implemented in the current version 0.1a when this issue went to press; however, the developer assured a fix in a timely manner.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Sunflower

    Following in the footsteps of Norton Commander and its clones, the Sunflower twin-panel file manager takes a giant leap forward with a switch to Python 3 and GTK3.

  • File Managers

    Working with files and folders is a typical daily task on any computer. We tested four lesser known file managers that significantly simplify handling content on mass storage media.

  • Ranger

    Ranger offers a wealth of commands – many with alternatives – and less reliance on a mouse.

  • 4Pane 2.0

    4Pane provides additional confidence in file management in the form of a clever undo function. Advanced users can install supplemental scripts in an instant.

  • CLI File Manager

    If you're a Linux lover, you'll know the command line is the slickest and most efficient way to interact with the system. Free yourself from point-and-click with the nnn command-line file manager.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News