clipmap 1.6 max-texts-in-history vs max-menu-items?

Sylvain Viart sylvain at
Wed Sep 29 08:33:25 CEST 2021


I'm trying to figure out the purpose of max-menu-items vs the 

I'm modifying the code of clipman to handle Secure Item, this fork 
I'm planing to submit a merge request for future version of clipman, as 
my use of the PoC is satisfying.

So during my journey in the code, it brings me to extensively modifying 
the way items are stored in memory, still not altering the existing 
I disabled saving history to disk which is obviously not compatible with 
secret non-disclosure.

So the memory data structure in my fork has been changed to a GList 
double linked list + I'm crafting a circular Indexes array to handle my
newly introduced index / ID on the stored item. So they can be delete 
any item from history with an external cli by index: ./ del 12

The goal here was to avoid secret disclosure.

I decided to keep indexes in a circular buffer of the same size of the 
history (max-texts-in-history).
The indexes are kept to low ID values because I use them in the preview 
of Secure Item: "­čöÉ SECURE %2d *********", item->id
My history size in memory is generally of 40 or 50 items, and I 
generally handle at most 4 or 5 Secure Item in the history at the same time.
Some Secure Item are ephemeral so are going out quite quickly. Keeping 
ID low also helps human to figure out which secret is the one hidden in 
the history.

I'm actually finalizing my circular buffer code and handling history 
size change enlarge / shrink the history.

But I'm discovering the distinct behavior or those two max values: 
max-texts-in-history  / max-menu-items

To what I understand:

  * max-menu-items is a visual limitation in the popup menu
  * max-texts-in-history is the actual history size in memory (may be
    also on disk, I didn't explore this part, as it was not involved in
    my changes)

in clipman 1.6 the max-texts-in-history is set with this visual interface:

Which is greyed as I disabled it in my use case.

So what is exactly the purpose of max-texts-in-history?
Should I use this value for my in memory history size or should I use a 
different size matching max-menu-items?


Sylvain Viart - GNU/Linux Sysadmin/Developer/DevOps - France

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hopfjccgoakaiigf.png
Type: image/png
Size: 32793 bytes
Desc: not available
URL: <>

More information about the Xfce4-dev mailing list