<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi,<br>
<br>
I'm trying to figure out the purpose of max-menu-items vs the
max-texts-in-history?<br>
<br>
I'm modifying the code of clipman to handle Secure Item, this fork <a
moz-do-not-send="true"
href="https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin">https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin</a><br>
I'm planing to submit a merge request for future version of clipman,
as my use of the PoC is satisfying.<br>
<br>
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 behavior.<br>
I disabled saving history to disk which is obviously not compatible
with secret non-disclosure.<br>
<br>
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 <br>
newly introduced index / ID on the stored item. So they can be
delete any item from history with an external cli by index:
./clipman_cli.sh del 12<br>
<br>
The goal here was to avoid secret disclosure.<br>
<br>
I decided to keep indexes in a circular buffer of the same size of
the history (max-texts-in-history).<br>
The indexes are kept to low ID values because I use them in the
preview of Secure Item: "🔐 SECURE %2d *********", item->id<br>
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.<br>
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.<br>
<br>
I'm actually finalizing my circular buffer code and handling history
size change enlarge / shrink the history.<br>
<br>
But I'm discovering the distinct behavior or those two max values:
max-texts-in-history / max-menu-items<br>
<br>
To what I understand:<br>
<ul>
<li>max-menu-items is a visual limitation in the popup menu</li>
<li>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)<br>
</li>
</ul>
<br>
in clipman 1.6 the max-texts-in-history is set with this visual
interface:<br>
<br>
<img src="cid:part2.D480F5A9.FC497D1B@opensource-expert.com" alt=""><br>
<br>
Which is greyed as I disabled it in my use case.<br>
<br>
So what is exactly the purpose of max-texts-in-history? <br>
Should I use this value for my in memory history size or should I
use a different size matching max-menu-items?<br>
<br>
Regards,<br>
Sylvain.<br>
<pre class="moz-signature" cols="72">--
Sylvain Viart - GNU/Linux Sysadmin/Developer/DevOps - France</pre>
</body>
</html>