Caja – like all modern Linux file managers – lets you bookmark your favourite locations, which you can then quickly access via the Bookmarks menu, or under the Bookmarks section of the sidebar. While most people bookmark the occasional folder and leave it at that (after all, who wants to sift through 40 bookmarks?), others use this to be even more productive. For example, if you’re in the middle of a project that requires you opening the same 6 folders quite often, it makes sense to bookmark them, even if temporarily – once done, you can easily delete the bookmarks by right-clicking them in the sidebar and choosing Remove.
While you can bookmark the folder you’re in via Bookmarks > +Add Bookmark – or hit Ctrl+D – some of you might find it rather handy to have an Add Bookmark button in the toolbar.
But one unfortunate limitation in Caja is that you can’t customise the toolbar in the Preferences dialogue. 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 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.
Add “Add Bookmark” Button
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 one 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 right at the end of the toolbar, but you can add it wherever you please.
<toolitem name="Add Bookmark" action="Add Bookmark"/>
Once you’ve added your custom button, 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 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