Caja is a great file-manager, but one unfortunate limitation is that you can’t customise the toolbar in the Preferences dialogue. And one pair of buttons many would find invaluable are those for Undo and Redo, but they’re not part of the default toolbar. However, you can in fact add new buttons, and remove unwanted ones, and I’ll show you how.
It comes down to specifying toolitems in the config file caja-navigation-window-ui.xml, and wherever you paste the code will determine where the buttons end up. For example, if you add the code for your custom buttons after the entry for the Home button, that’s where they will end up; if you add them after all the default buttons, they will end up on the right end of the toolbar. So you can add your buttons where you want, reorder them as you please, and even get rid of unwanted ones.
Adding Undo and Redo Buttons
First off, open the file for editing with the following command:
pluma admin:///usr/share/caja/ui/caja-navigation-window-ui.xml
The second half of the file deals with the toolbar, so locate the button you want to put your custom ones after. Hit Enter at the end of that line, and paste the code below into the empty paragraph beneath it, making sure to preserve the indent. For this example, I’m adding the code after the Computer button, but you can add it wherever you please.
<toolitem name="Undo" action="Undo"/>
<toolitem name="Redo" action="Redo"/>
Once you’ve added your custom buttons, save the file, then reload Caja (either by manually closing all windows, or running caja -q in the terminal, then opening Caja again). Your new toolbar buttons will be there and ready to use!
For info on how to Add or Remove Separators, Reorder Existing Buttons, and Remove Unwanted Buttons, check out this guide!
See also: Full List of Available Caja Toolbar Buttons
☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻
The tutorial above is TOTALLY FREE, and I hope you found it useful! But if this information really made your day, because it rescued you from hours of headache, or allowed you to accomplish something you thought was impossible, then please consider making a donation via PayPal, to buy me a donut, beer, or pizza for my time and effort! Many thanks in advance!
Leave a comment