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

Sylvain Viart sylvain at opensource-expert.com
Wed Sep 29 08:33:25 CEST 2021


Hi,

I'm trying to figure out the purpose of max-menu-items vs the 
max-texts-in-history?

I'm modifying the code of clipman to handle Secure Item, this fork 
https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin 
<https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin>
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 
behavior.
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: ./clipman_cli.sh 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?

Regards,
Sylvain.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20210929/67a275df/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hopfjccgoakaiigf.png
Type: image/png
Size: 32793 bytes
Desc: not available
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20210929/67a275df/attachment-0001.png>


More information about the Xfce4-dev mailing list