cdown / clipmenu

Clipboard management using dmenu
MIT License
1.11k stars 90 forks source link

Add new clipcli to seperate clipboard management from dmenu #162

Closed simonhughxyz closed 5 months ago

simonhughxyz commented 3 years ago

So this is my improved solution to a a problem I solved in #161

I have added a new script called clipcli which handles the clipboard management. It has 2 commands

So you can build your own scripts using clipcli list | fzf | clipcli get

I think this is a better solution because I believe that the clipboard management should be independent of whatever menu of fuzzy finder you use.

I have converted clipmenu to use the new script but kept the cli of clipmenu the same for backwards compatibility, but I think it may be a good idea to depreciate it and introduce separate scripts for dmenu, fzf, rofi etc

This would allow people to build their own scripts more easily, as a possible suggestion you could have a new dir in this repo or another repo with user scrips people can publish.

This was made in a bit of a rush, so I might have missed some things.

nick87720z commented 2 years ago

My appologies - did not look commits before writing what I did before. Finally - what's really missing, but could be there.

I thought, clipcli takes commands from stdin coninuously, but it's not. Imho, persistant daemon would be useful, moreover it's shell script, whose runing creates significant overhead.

Also - the most effective way could be if actual job was done by clipmenud, providing named pipe to control itself (enable/disable commands could also use this interface). In this case there would be no possible race from different cli accessing cache - clipmenud would do everything.

++ In later case all ui, including clipmenu, could talk to clipmenud cirectly, with clipcli being just one of them.

cdown commented 5 months ago

clipmenu is now in C, so closing since this applies to the old bash version. Thanks for your work on this, though!