You are not logged in.
I'd like to change which buttons show up here and their location (like for any other toolbar in any other app), but I can't find a setting for this. There's nothing obvious in Thunar's options or menus and right-clicking on the toolbar doesn't give me anything either.
Offline
Hello and welcome.
As a general rule, the thunar toolbar is not editable. However, depending on what you mean by "change which buttons show up here and their location", you might have a few css options.
Change from symbolic to regular icons:
.thunar > grid > toolbar * { -gtk-icon-style: regular; }
Change the size of thunar toolbar icons:
.thunar > grid > toolbar * { -gtk-icon-transform: scale(0.9); }
Hide the buttons:
.thunar #forward image { -gtk-icon-transform: scale(0); }
.thunar #back image { -gtk-icon-transform: scale(0); }
.thunar #open-parent image { -gtk-icon-transform: scale(0); }
.thunar #open-home image { -gtk-icon-transform: scale(0); }
*note: these widget names appear to have been removed in the 4.16.x version of thunar, so they won't work on newer versions.
Tweak the horizontal positioning of the icons:
.thunar #forward image { padding-top: 3px; }
.thunar #back image { padding-top: 3px; }
.thunar #location-toolbar { margin: 0; padding: 0; margin-left: 25px; }
.thunar #location-toolbar entry { margin: 4px; border: 0; }
.thunar #location-toolbar box { margin-left: 25px; }
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
As a general rule, the thunar toolbar is not editable.
...*sigh* I had a feeling this might be the case.
*note: these widget names appear to have been removed in the 4.16.x version of thunar, so they won't work on newer versions.
Yay.
The "home" and "parent" buttons are kind of a waste of space given that the sidebar and path arrows are right next to them, if nothing else I at least wanted to turn these off. Do I have any other options besides replacing the entire file manager subsystem?
What level of CSS is in use here? Can I do tricks using full attribute selectors like *:nth-child(3) or *[foo*="bar"] are we stuck with CSS v0.01 or something?
Last edited by mykai (2021-08-15 02:43:44)
Offline
Yes, it does support nth-child. How about something like this to hide the home and up buttons, and shift over the entry widget:
.thunar toolbar toolbutton:nth-child(4) image { -gtk-icon-transform: scale(0); }
.thunar toolbar toolbutton:nth-child(4) button:hover { background-color: transparent; }
.thunar toolbar toolbutton:nth-child(3) image { -gtk-icon-transform: scale(0); }
.thunar toolbar toolbutton:nth-child(3) button:hover { background-color: transparent; }
.thunar toolbar toolitem box { margin-left: -75px; }
...adjust the "-75" to suit the positioning of the entry widget.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
OK thanks, that's good to hear.
Where exactly do I put these CSS overrides? Is there some XFCE extension I need to install or a hidden control panel option or something?
Also: is there an easy way for an end user to discover the DOM layout and attributes for this kind of thing? Does XFCE offer some kind of "inspect element" mode for apps like how web browsers offer it for pages? Can I launch Thunar from a terminal with like "--dump-xml-tree" or anything like that? In other words, do I have any option besides downloading the Thunar source code and trying to decipher it.
Last edited by mykai (2021-08-15 22:21:28)
Offline
Where exactly do I put these CSS overrides? Is there some XFCE extension I need to install or a hidden control panel option or something?
User-based tweaks should go into ~/.config/gtk-3.0/gtk.css
Also: is there an easy way for an end user to discover the DOM layout and attributes for this kind of thing? Does XFCE offer some kind of "inspect element" mode for apps like how web browsers offer it for pages? Can I launch Thunar from a terminal with like "--dump-xml-tree" or anything like that? In other words, do I have any option besides downloading the Thunar source code and trying to decipher it.
The GTK Inspector. Run thunar like this:
thunar -q && GTK_DEBUG=interactive thunar
Some other posts that might be helpful:
https://forum.xfce.org/viewtopic.php?id=14491
https://forum.xfce.org/viewtopic.php?id=13329
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Perfect, thank you so much. I'll have to figure out how to install that and get it working.
Offline
[ Generated in 0.013 seconds, 10 queries executed - Memory usage: 548.3 KiB (Peak: 549.14 KiB) ]