[Thunar-dev] how to tell thunar never to increase space between icons?

Bruno Dantas thunar at dantas.airpost.net
Tue Mar 14 13:40:19 CET 2017


Markus, you are a wizard! Thank you so much. I will try your patches
ASAP and will report back.

On 03/14/2017 08:09 AM, Markus wrote:
> I wrote patches for this a while back. I'll attach them to this mail,
> maybe they'll prove useful for you. I can't exactly remember which
> version I wrote them against but I think it should be the 4.12's Thunar
> already. Here's a short overview (I'm citing my notes from when I wrote
> those patches):
> 
> thunar_fixed_width_final.patch
> 
>     This patch addresses the issue of varying horizontal spacing in icon
>     view by using a fixed width (= maximum width) for the columns of the
>     grid layout.
>     The patch introduces the following xfconf variable:
> 
>         misc-fixed-item-width: toggles the fixed item width on (TRUE) or
>         off (FALSE); default: TRUE
> 
>     The patch only affects icon view and the new behavior only applies
>     to views with text below items.
> 
> 
> thunar_truncate_final.patch
> 
>     The appended patch addresses the issue of huge filename labels by
>     adding filename truncation using ellipsis insertion and introduces 3
>     new xfconf values:
> 
>         icon-view-text-lines: maximum amount of lines for filenames in
>         icon view (default: 4)
> 
>         compact-view-text-width: maximum pixel width for filenames in
>         compact view (default: 300)
> 
>         misc-truncate-filenames: boolean toggling the new
>         truncate/ellipsize behavior for filenames (default: TRUE)
> 
>     I chose to not put the ellipsis at the end of the filenames as many
>     other file managers do it, but in the center. This will keep the
>     file extension readable in most cases which I find quite handy.
>     However if you deem this unsuitable, feel free to replace the
>     occurences of "PANGO_ELLIPSIZE_MIDDLE" with "PANGO_ELLIPSIZE_END"
>     which will result in the ellipsis being at the end.
> 
> _______________________________
> 
> The first patch is essentially what you are looking for. I added a
> second as a bonus since it complements the first one beautifully by
> limiting the size of item labels. This guarantees fixed horizontal
> spacing as well as limited vertical spacing when using text below icons.
> The truncation should still apply to text besides icons as well. Use the
> xfconf editor to set the introduced settings values.
> Be aware that I wrote those patches a long time ago. I currently can't
> check whether they are still working but they should point you into the
> right direction at least!
> 
> Cheers!
> 
> Markus.
>> This is a cosmetic issue but it's driving me bonkers.
>>
>> I only use Thunar with the option to "View as Icons". I'd like the spacing between icons in Thunar to be constant, but Thunar insists on increasing the spacing between icons when long filenames are detected (e.g., when I press Control+H in my home folder and hidden files with long names show up).
>>
>> A user perplexed by this same issue documented it here, with screenshots: https://bbs.archlinux.org/viewtopic.php?id=199121
>>
>> If I put something like this in my ~/.gtkrc-2.0 to increase the baseline/initial distance between icons...
>>
>> style "thunar-spaced-out-icons"
>> {
>>   ThunarIconView::column-spacing = 70
>>   ThunarIconView::row-spacing = 70
>> }
>> class "ThunarIconView" style "thunar-spaced-out-icons"
>>
>> ...Thunar increases the distance between icons even more when long file names are detected.
>>
>> Is there a setting that tells Thunar to NOT change the distance between icons? If there is no such setting, I'd like to recompile Thunar without this "feature". I grepped the source code for "column-spacing" and didn't find an obvious culprit, so the offending function must change a variable of some other name. Please help.
>> _______________________________________________
>> Thunar-dev mailing list
>> Thunar-dev at xfce.org
>> https://mail.xfce.org/mailman/listinfo/thunar-dev
> 
> 
> 
> _______________________________________________
> Thunar-dev mailing list
> Thunar-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/thunar-dev
> 


More information about the Thunar-dev mailing list