You are not logged in.

#76 2012-08-04 16:59:54

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Also, files copied from qtfm show up as text/uri-list (it copies/cuts them with no problem), that is to be expected too?

Offline

#77 2012-08-04 17:02:13

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

karabaja4 wrote:

Also, files copied from qtfm show up as text/uri-list (it copies/cuts them with no problem), that is to be expected too?

Yes, same thing as in firefox.

It puts the conversions to selections it supports. In this case text/uri-list.
Applications that support text/uri-list, can handle the files copied from qtfm.

The other possible places for file copy/cut actions are "x-special/gnome-copied-files"
"application/x-kde-cutselection", but loliclip prioritizes "text/uri-list" as it seems most DE independant.

Though, those buffers are not shared, so loliclip will store every one of them if the application supports the conversion for it.
Eg, if you copy image in dwb (dunno if this works in firefox) and do 'loliclip -b text/html' you get html code for the image.

Last edited by Cloudef (2012-08-04 17:04:04)

Offline

#78 2012-08-04 17:10:36

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Great, thanks smile

Offline

#79 2012-08-04 17:34:06

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

I'll give it few days, before I'll mark it 'works well' and upload to AUR.

Offline

#80 2012-08-05 19:52:08

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Uploaded the current version to AUR.
Has been working without issues since yesterday.

Offline

#81 2012-08-05 21:07:37

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

I found another small problem, when I do

echo "abc" | loliclip -c

qtfm freezes for 5 seconds, like in that copy/paste bug a while back.

Offline

#82 2012-08-05 21:40:09

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

New version @ git.
--out/-o is now deprecated, use loliclip -p/s/c without stdin or additional arguments to get contents from clipboard. With argument or stdin the data gets upload to selection instead.

--binary/-b switch now takes input data. For example:

loliclip -b image/png < lolcat.png

Something remotely neat could be done now, for example ranger users could add file copy support from ranger to some other file manager by uploading data to text/uri-list.


karabaja4 wrote:

I found another small problem, when I do

echo "abc" | loliclip -c

qtfm freezes for 5 seconds, like in that copy/paste bug a while back.

Thanks, I'll check it out.

Last edited by Cloudef (2012-08-05 21:42:40)

Offline

#83 2012-08-05 21:58:10

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

@karabaja4
I noticed I sent some bad atoms to qtfm.
Could you try again with the latest one from git?

I also noticed that qtfm for some reason spawns repeatetly target requests to loliclip while it's running.

Last edited by Cloudef (2012-08-05 21:58:31)

Offline

#84 2012-08-05 23:18:06

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Example of how to copy image to clipboard from sxiv:

# Add to config.h of sxiv
{ true, XK_c, it_shell_cmd, (arg_t)"loliclip -b image/png < \"$SXIV_IMG\"" },

Even though, it stores it in image/png. At least sxiv itself and gimp will open the file fine in any file format you copy to the buffer for some reason (even animated gifs work).

Add files to text/uri-list copy buffer:

echo "file:///home/user/README\nfile:///home/user/video.mkv" | loliclip -b text/uri-list

This works at least with qtfm which is the only graphical fm I have installed for testing atm.
It should be possible to integrate this with ranger for example I think.

You can also have your own custom buffer, by adding new special selection to loliclip's config.h,
you can access it through -b switch like usual.

Last edited by Cloudef (2012-08-05 23:24:59)

Offline

#85 2012-08-06 14:52:25

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Here's something strange, this:

loliclip -p -o

now returns usage instead of primary selection?

BTW, before this became broken, I used to push primary into clipboard with this:

loliclip -p -o | loliclip -c

is that a good way?

Offline

#86 2012-08-06 14:55:00

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

P.S. qtfm doesn't freeze anymore.

Offline

#87 2012-08-06 15:14:31

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

@karabaja4

--out/-o is now deprecated, use loliclip -p/s/c without stdin or additional arguments to get contents from clipboard. With argument or stdin the data gets upload to selection instead.

so, do:

loliclip -p | loliclip -c

Instead. I think I've forgot to change this in lolictrl btw.
I'll fix it asap (lolictrl -s[psc] is broken atm)

Last edited by Cloudef (2012-08-06 15:17:09)

Offline

#88 2012-08-07 22:49:18

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

New stuff @ git. The main event loop got quite big changes again so stuff might break, tell me if anything is wrong.
Fixed some bugs regarding to setting new clipboard data.
And there is still one annyoining issue that is propably going to be harder to solve.

Some good things are there as well, like requesting targets before copying, which potentially causes better behaviour
within X enviroiment.

if you call eg,

loliclip -b image/png < image.png; loliclip -b text/uri-list "image.png"

those two setters are going to fight for their place as clipboard.

Maybe adding additional option like --wait would workaround this. It would wait until the selection has been acquired.
Noticed this when I was about to add file copy to sxiv as well, atm I workaround it by doing:

"loliclip -b text/uri-list \"$SXIV_IMG\"; sleep 0.15; loliclip -b image/png < \"$SXIV_IMG\""

Offline

#89 2012-08-07 23:59:12

webspider
Member
Registered: 2012-07-19
Posts: 27

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

I've tested it out now and everything seems to work. Thanks for fixing stuff so quickly! Now I only have to edit the default colors of the menu from lolictrl...

Last edited by webspider (2012-08-08 00:26:42)

Offline

#90 2012-08-08 07:44:31

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

webspider wrote:

I've tested it out now and everything seems to work. Thanks for fixing stuff so quickly! Now I only have to edit the default colors of the menu from lolictrl...

You can edit the DMENU= line in lolictrl script, and makepkg -csif --skipinteg to compile without md5 checks.
However better method is to create wrapper script for dmenu so all the dmenu applications have same look, example:
https://github.com/Cloudef/dotfiles-ng/ … /bin/dmenu

Offline

#91 2012-08-08 15:05:41

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Newest loliclip from git seems to do alot more in the background than the version from AUR - or it just writes out more stuff?

-!- Start of PRIMARY copy
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- End of PRIMARY copy
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- [0] 0x1a4
-!- [1] 0x1a1
-!- [2] 0x1f
-!- [3] 0x1a2
-!- [4] 0x122
-!- [5] 0x123
-!- Ask for: 0x1f
-!- 1 valid targets for PRIMARY
-!- FLUSH
-!- SECONDARY [0]
-!- LOOP
-!- NON INCR [0x1f]
-!- ASK FOR 0x1f
-!- FLUSH
-!- NON INCR [0x1f]
-!- FLUSH
-!- CLIPBOARD [0]
-!- LOOP
^C-!- 2097 [/home/igor/Downloads/PKGBUILDS/loliclip/src/loliclip.c :: sigint]: SIGINT
-!- JUST DO IT
-!- PRIMARY [0]
-!- Targets request for PRIMARY
-!- BLOCK
-!- Stopping loliclip
-!- Clearing ownership for SECONDARY
-!- Clearing ownership for CLIPBOARD

it loops like this when I select something to primary.

BTW, one thing I noticed, this:

loliclip -p | loliclip -c

now takes a second or so to execute. The AUR version does it near-instant.

Last edited by karabaja4 (2012-08-08 15:10:18)

Offline

#92 2012-08-08 15:18:49

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Newest loliclip from git seems to do alot more in the background than the version from AUR - or it just writes out more stuff?

Loliclip always does more stuff for PRIMARY when it doesn't own it.
It should not still eat much CPU time though, and it starts blocking again when primary is owned.

loliclip -p | loliclip -c

Funny, this seems to work for me fine. I'll investigate.
Oh btw, is this with DEBUG=1? Those commands won't fork with debug (so I can see the messages they output).

Last edited by Cloudef (2012-08-08 15:20:44)

Offline

#93 2012-08-08 16:24:00

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Cloudef wrote:

Funny, this seems to work for me fine. I'll investigate.
Oh btw, is this with DEBUG=1? Those commands won't fork with debug (so I can see the messages they output).

Yeah, sorry, my mistake.

With DEBUG=0 it works fine.

Offline

#94 2012-08-08 17:02:21

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

@karabaja4, I noticed some issues with it anyways.
I've fixed this on git now smile

Keep up, the feedback is valuable.

I've added --wait option as well. It's now possible to do this for sxiv in example.

"loliclip -bw text/uri-list \"$SXIV_IMG\"; loliclip -bw image/png < \"$SXIV_IMG\""

(image data gets copied to image/png, and file information to text/uri-list for filemanagers)

Those selections won't fight with each other now since it blocks until loliclip daemon takes ownership of the selection.
I don't suggest using the wait switch however if you aren't running the daemon or the specific clipboard doesn't have OWN_IMMEDIATLY option (PRIMARY in default configuration).
It just merely waits until someone steals the ownership of the selection, and when daemon isn't going to do that, it just sits there until some random application does.

I've also added warning to loliclip.c about the code itself.
X clipboard doesn't seem to be really designed for what loliclip does and it's full of hacks and workarounds for limitations or lack of information I can't get about selections.
But yeah, it all works sort of at least.

Last edited by Cloudef (2012-08-08 17:28:17)

Offline

#95 2012-08-08 18:13:42

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Cloudef wrote:

I've also added warning to loliclip.c about the code itself.
X clipboard doesn't seem to be really designed for what loliclip does and it's full of hacks and workarounds for limitations or lack of information I can't get about selections.
But yeah, it all works sort of at least.

X clipboards are and always have been a complete mess, so your work on this is outstanding. loliclip is currently the only clipboard manager I know of that successfully patches things up.

Thanks alot for this and keep up the good work smile

Offline

#96 2012-08-11 09:35:16

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

You could consider uploading latest git to AUR, it seems stable enough to me smile

Offline

#97 2012-08-11 09:40:46

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

karabaja4 wrote:

You could consider uploading latest git to AUR, it seems stable enough to me smile

Was about to do this yesterday, but forgot. Done.

Offline

#98 2012-08-13 19:29:52

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

I noticed this few times in /var/log/messages.log when I killed X, it's not really an issue but I just though I'll leave it here:

Aug 13 23:24:44 localhost kernel: [ 7937.668381] loliclip[759]: segfault at 0 ip 0000000000402179 sp 00007fff051517f0 error 4 in loliclip[400000+7000]

seems loliclip segfaults when killing X, but I cannot reproduce it on purpose. It happens very rarely.

Last edited by karabaja4 (2012-08-13 19:31:06)

Offline

#99 2012-08-13 19:57:22

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

karabaja4 wrote:

I noticed this few times in /var/log/messages.log when I killed X, it's not really an issue but I just though I'll leave it here:

Yeah, the loliclip has been never really designed or tested for using beetwen X session kills.
It's impressive that it doesn't even crash each time. I just start it in xinitrc and kill after wm session in the same file.

Though I guess it would not be too hard to add checks for X connection and quit silently.

Offline

#100 2012-08-14 09:02:06

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: xcmenu - lightweight clipboard manager for X (formerly loliclip)

Cloudef wrote:

Though I guess it would not be too hard to add checks for X connection and quit silently.

Constant checks if X is running sounds like it could take alot of CPU time... I don't think it would be a good idea.

Offline

Board footer

Powered by FluxBB