For most things, I really like Scribus. It’s a marvelous program that is easy to use and extremely powerful. With that said, there is one design decision that drives me absolutely nuts: the use of top-level windows for tool palettes.
I could go on (at length) about why this bothers me. (If I were to do so, I might talk about how the palette windows block the view of my work, or the way in which they clutter up the desktop and make it difficult to have more than one program open at a time.)
But, since a picture is worth a thousand words, I’m not going to do that. I’ll simply show you what working on a complicated document in Scribus can turn into.
As you can see, it isn’t pretty. There’s superfluous windows everywhere! And because the display palettes require the vast majority of the desktop, the important stuff (your content) is relegated to a tiny parcel of the screen.
Now, my point in this post isn’t to beat up on the Scribus developers. They’re well aware that top-level window palettes are not the best way to show a lot of information on-screen. After talking with one of them yesterday, I was told that there are plans to re-work the UI and fix a number of the more obvious issues. These enhancements will be in version 1.5 of the software. (All I can say is: Go Team!)
Unfortunately, future plans do not fix current annoyances. Nor am I content to wait for a fix. I’m just not that patient. Thus, I’ve been researching different ways to solve the Palette Problem, and, it turns out that there is a very elegant solution already used in other graphics programs. This is to use dockable/floating widgets.
In many respects, dock widgets work just like the top-level windows that Scribus uses now. They can hold complex layouts, options and tool palettes. You can arrange them on the desktop as you see fit. There is, however, one important distinction. Instead of requiring their own space, you can also “dock” them to the main window.
When docked, they will appropriately re-size, and you can even “stack” them on top of one another. Using dock-widgets, you can transform the mess above into the much more pleasing layout below.
All the same tools and options are available, they’re just organized and accessible. It’s a much better system. Moreover, if you don’t need a particular palette (such as the Scrapbook or Outline), it can easily be hidden but still remain accessible.
Now, you might be tempted to think that making such a magical transformation is difficult. It is, after all, a major change. But were to you subscribe to such a supposition, you would be wrong. Transforming the Scribus GUI isn’t difficult in the least. It simply requires that you download and run a couple of Python scripts. In the remainder of this post, I’ll describe how to leave Palette Hell behind.
Downloads and Installation
All of the magic happens through the Scripter plug-in, and four custom scripts (one written by a guru, three hacked together by me). Scripter is included in the scribus-ng package available from most distribution repositories. I have tested these with Scribus 1.3.5 and Scribus 1.3.8 on Ubuntu and can testify that they work great.
DockWidget and Workspace Scripts. This zip archive has all of the scripts needed: DockWidget.py, SaveWorkspace.py, LoadWorkspace.py and Scribus-Startup.py
- PyQt. For Linux users, installing PyQt is easy. (For Mac users, it is slightly more involved.)
After you download the archive, extract it to a folder somewhere on your computer. Be sure to keep all four scripts inside the same folder, otherwise they will not work. Next, change your Scribus “Scripts” path to point at this folder.
The paths options are available under the “General Preferences” (File > Preferences > General).
Once you have copied the scripts to the appropriate location, there is one setting that you need to change prior to using them. The scripts create a simple text file called “WindowSetttings.conf” that stores the location of the dock widgets. You will need to specify a path where you would like this to file to be stored. For example, I store the file in my AppData folder:
You will need to change the path in both “SaveWorkspace.py” and “LoadWorkspace.py”. Make sure that the two match!
After you have installed and configured the python files, you are ready to use them. As I said earlier, there are four scripts in total to handle all of your dock widget needs:
- DockWidgets.py, which converts the top level window objects to dock widgets. By default, it places these widgets on the right hand of the Window.
- SaveWorkspace.py, which can be used to save your widget configuration.
- LoadWorkspace.py, used to load your previously saved workspace.
- Scribus_Startup.py, which can be used to load a previously saved workspace when Scribus first opens.
All of the scripts are run from the “Scripts > Execute Script” menu. Note: When using them, it is important to run the code as an “Extension Script.” If you don’t, they will cause Scribus to freeze.
This is the order that the scripts should be run:
- First, run DockWidgets.py. The first time you run this script, it will load all of the dock widgets into the right hand pane. You can then reorder the widgets to your liking.
- Next, run SaveWorkspace.py. This will save the layout so that you can retrieve it later.
- You can then load your saved layout again by using LoadWorkspace.py.
Unfortunately, the changes made by DockWidgets.py are not permanent. If you exit Scribus, you will be back in Palette Hell. This is why the fourth script (Scribus_Startup.py) was included.
Scribus (theoretically) includes the ability to run a user-defined script on a start-up. (I wasn’t actually able to get this to work, but others apparently have.) Scribus_Startup.py runs DockWidgets.py and LoadWorkspace.py for you. If you set it as your startup script, you will never have to worry about Palette Hell ever again.
To set it as a startup script, open the Scripter preferences (File > Preferences > Scripter) and type in the path to the script (or select it from the file browser). Just make sure that Scribus_Startup.py is in the same directory as DockWidgets.py and LoadWorkspace.py.