Nautilus-actions: Future plans part II (conditions)
Following my last blog post about the future plans for Nautilus actions, I would like to share with you once again some of my ideas about the next major 2.x version.
This time, it is about the future conditions that will be available in the options of each actions config. Indeed, as the main benefits of Nautilus actions, towards its concurrent the Nautilus-scripts, is the fact that the actions are displayed only when it's contextually needed, to me it is important that the possibilities to achieve this should be the best possible.
So I plan to add as much options as possible and as long as it makes sense of course, to reach this goal.
Here is the current list of conditions I plan to make available for the next 2.x releases :
- Filename pattern (basic and regexp) + case sensitiveness option
- It will consist of two options : the basic one which represents the current option available with simple joker (* and ?) and the regexp one which will be used for regular expression matching.
- Folder name pattern (basic and regexp) + case sensitiveness option
- Same as above, but for matching the folder in which the selected elements are. (eg, if you select /home/foobar/file.txt, it will match the /home/foobar part)
- Mime types pattern (basic and regexp)
- Same as above but for mime types matching (image/jpeg, video/mpeg, text/plain, etc.)
- Element type (folder, file, link, etc...)
- This will be a "probably" extended condition based of the current "Appears if selection contains" which will provide more kind of file types like symlinks for example. But I have to see if it make sense or not...
- Number of selected elements (1, 2, 3, unlimited) (Bug #325523)
- This one is an extended version of "Appears if selection has multiple files or folders" option. It will be useful for actions like "diff" which need exactly 2 files for example.
- Schemes of the selected elements (file, sftp, smb, dav, etc...)
- No change here, it is the one already available since the beginning.
- Content of the selected folders (hold music files, hold a .svn folder, etc.)
- This one is about checking the files available in a selected folder. For example, if you want to define a SVN set of actions, you will search for a folder with a .svn folder in it, or if you want to enqueue a full folder of music file, you will search for audio files. This options must be tested to see if it doesn't reduce the performance of Nautilus too much.
- Condition script (run a script which return true if conditions are ok) (Bug #330610)
- This one is a possibility to set a script/program that would be launched and activate the defined action if it returns TRUE. The performance counterparts have to be tested too.
All these conditions have to be tested to know if they really have an acceptable performance/added value ratio. Now, I would really appreciate if you could give me your thoughts about all this and if you have any awesome ideas which are not in this list to reach the goal given above !