Contents
About
The Workbench plugin is an extension that makes it possible to manage multiple projects in geany. You can add geany projects to a workbench. From there you can add directories to the project to manage the files belonging to the project.
Usage
Enabling the plugin
The plugin can be enabled in the plugin manager. After enabling the plugin a new tab will be displayed in the Sidebar. There will also be a new entry in the "Tools" menu. Both are labeled "Workbench".
The new Workbench
A newly created Workbench is completely empty. In the Workbench tab of the sidebar you should see the hint "Add a project using the context menu". Anything which is dealing with projects and their Workbench related settings is done using the context menu on the sidebar. Some items in the context menu will only be active if you right click inside a project, directory or bookmark.
The Workbench settings
The following settings exist for a workbench:
- Rescan all projects on open
- If the option is activated (default), then all projects will be re-scanned on opening of a workbench.
- Enable live update
- If the option is activated (default), then the list of files and the sidebar will be updated automatically if a file or directory is created, removed or renamed. A manual re-scan is not required if the option is enabled. This feature is available since version 1.03 of the workbench plugin. If you open a workbench file which has been created with an older version of the workbench plugin then the option will be added with value "activated".
- Expand on hover
- If the option is activated, then a tree node in the sidebar will be expanded or collapsed by hovering over it with the mouse cursor.
- Enable tree lines
- If the option is activated, lines will be drawn between the nodes in the sidebar tree.
Live update
From version 1.03 on the workbench plugin supports an automatic live update of the file list and the sidebar.
This feature will only work if your system supports directory file monitoring. If the workbench plugin cannot setup file monitoring for a directory then it will output a message in the message window. The message has the following form:
Could not setup file monitoring for directory: "exampledir". Error: <some error message>
Styling the sidebar
On linux based systems using GTK3 the workbench sidebar can be styled using CSS. For general information on how to setup CSS with Geany please see the manual under https://www.geany.org/manual/current/index.html#customizing-geany-s-appearance-using-gtk-3-css.
To style the workbench sidebar use the CSS ID "workbench". Here is a small example:
/* Style the label over the treeview. */ #workbench label { color: black; background-color: silver; border-bottom: 2px solid red; font-size: 20pt; } /* Style the treeview: the border-color specifies the color of the treeview lines (if enabled in the workbench settings). */ #workbench treeview { color: black; background-color: linen; border-color: darkviolet; font-size: 12pt; } /* The following changes the text and background color for the selected row in the workbench treeview. */ #workbench treeview:selected { color: white; background-color: red; } /* The following changes the text and background color for a row in the workbench treeview if the user hovers over it with the mouse pointer. */ #workbench treeview:hover { color: white; background-color: orange; }
Known issues
None.
License
The Workbench plugin is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found in the file COPYING included with the source code of this program.
Downloads
The Workbench plugin is part of the combined Geany Plugins release. For more information and downloads, please visit //plugins.geany.org/geany-plugins/
Development Code
Get the code from:
git clone https://github.com/geany/geany-plugins.git
Ideas, questions, patches and bug reports
Please post any ideas, feature requests, questions and bugs in the github issue tracker.
History
This is a short release history showing the major changes:
- 1.09:
- Added option to let git decide which files to display
- 1.08:
- Auto-save project on change
- 1.07:
- Added option to enable or disable tree lines
- 1.06:
- Save workbench settings immediately
- 1.05:
- Added option "Expand on hover"
- 1.04:
- Use simple/old file monitor events only (remove dependency of GLib version 2.46)
- 1.03:
- Support live update
- 1.02:
- Added "Create file here..."/"Create directory here..."
- 1.01:
- Fixed not closed file handles on directory scanning (thanks to techee). Fixes #607.
- 1.00:
- Created plugin