Caja is a great file-manager, but one unfortunate limitation is that you can’t customise the toolbar in the Preferences dialogue. However, you can in fact add new buttons, and remove unwanted ones, as I’ve illustrated in a bunch of tutorials.
While I’ve shown you how to add all sorts of super-useful buttons, like Copy/Cut/Paste, Delete, Create New Folder, Empty Trash, and Open New Window/Tab (click here for the full list of toolbar buttons you can add to Caja), here are the sundry button options – certainly not must-have buttons, but there if you want them. (Rename could be a useful button for many, but there’s a reason it’s here, so read below).
I’ve separated the buttons into their own sections, with the code for each there, so first read below on how to add buttons to Caja’s toolbar, and you can paste the appropriate code into the config file.
How to Add Toolbar Buttons to Caja
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 button ends up. For example, if you add the code for your custom button after the entry for the Home button, that’s where it will end up; if you add it after all the default buttons, it 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.
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 from the section(s) below into the empty paragraph beneath it, making sure to preserve the indent. For example, if you wanted to add the button between Home and Computer, you would hit Enter at the end of the line for Home, then paste the line of code.
Now just choose which button(s) you want to add, copy the code from below, and put them in the position on the toolbar that you desire. Once you’ve added your custom button(s), 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 button(s) will be there and ready to use!
Caja Preferences Button
Most of us wouldn’t have much use for a button to open Caja’s Preferences (Edit > Preferences), but if you’re someone who could use this, then the code is:
<toolitem name="Preferences" action="Preferences"/>
Go to Templates Folder Button
Another button most of us wouldn’t have a use for opens the Templates folder, which is where the templates for File > Create Document (and the sub-menu in the context-menu) reside, but it’s available for those who want it. The code is:
<toolitem name="Go to Templates" action="Go to Templates"/>
Backgrounds and Emblems Button
A potentially useful button for some of you is the Backgrounds and Emblems… button – maybe not so much for changing the folder background, but if you’re big on using emblems, it could be handy. But it has a major drawback: it’s a text-only button, and you can’t change the label, so it takes up a lot of toolbar real estate! However, if you’re got room to spare, and want to add this button, the code is:
<toolitem name="Backgrounds and Emblems" action="Backgrounds and Emblems"/>
Rename File/Folder Button
While renaming a file or folder is as easy as right-clicking it and choosing Rename… – or, even easier, hitting the F4 key – you can in fact add a button for it to the toolbar.
However, unlike with any other button – including the largest text-only button for Backgrounds and Emblems – something really strange happens when adding this button: the spacing between all buttons on the toolbar increases dramatically. I can’t get my head around this – no matter if you place it in between existing buttons, or plonk it on the right end of the toolbar, that spacing you can see in the picture above occurs.
It’s for this reason I didn’t create a dedicated tutorial for this button, and placed it at the end of this guide for the sundry buttons. It could be a handy button to have, but it comes at a cost!
However, since this could be a Caja bug that gets fixed at some point, or for some of you is a must-have button worth the widely-spaced toolbar, I’ll include it here. The code to add is:
<toolitem name="Rename" action="Rename"/>
Conclusion
So there you have it. While these are hardly essential for the vast majority of us, they’re available for those who want them, and this completes the list of buttons you can add to Caja’s toolbar. Don’t forget to check out the full list of buttons – some are so handy that you’ll be amazed you managed to live without them!
For info on how to Add or Remove Separators, Reorder Existing Buttons, and Remove Unwanted Buttons, check out this guide!
☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻
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!