You are not logged in.

#101 2012-08-14 15:43:11

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

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

karabaja4 wrote:
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.

It would not need constant, just for the inner loops like INCR retival. There is already check for X connection in main loop, I don't know how reliable it is.
That check is executed whenever loliclip enters busy loop (lost ownership for one of the selections) or there is new xcb event (select interrupts).

There is though some small inter busyloops that don't have checks at all though.
But it's really highlikely it would segfault there if your daemon has just sat idle.

I guess I could find the reason if I poked it a bit with gdb or something, but I have more important things right now.

Offline

#102 2012-09-07 03:05:08

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

I found a bug, pasting any kind of plain text to Libreoffice Writer opens some strange Sections window. Without loliclip it works fine.


pie!

Offline

#103 2012-09-07 11:08:21

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

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

karabaja4 wrote:

I found a bug, pasting any kind of plain text to Libreoffice Writer opens some strange Sections window. Without loliclip it works fine.

I moved recently and don't have internet yet.
I'll check it out when I have one.

Offline

#104 2012-09-13 21:26:16

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

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

I found a bug, pasting any kind of plain text to Libreoffice Writer opens some strange Sections window. Without loliclip it works fine.

I investigated, and this is actually caused by loliclip's feature of saving selections.
When loliclip holds multiple selections (html data, text, image, uri) libre office seems to choose randomly the "best" one of it. Which makes sense since applications mostly don't expect cached selection data.

I'll see, if I can make any nice workaround for this.
If not, I might just add command line option to serve only certain data temporarily (eg. text)
or make it behave like it should until told otherwise.

This is currently already possible compile time if you set CLIPBOARD_CLEAR_SELECTIONS flag to clipboards in config.h, but it's not possible runtime.

I'll try to get workaround that would allow me to choose the prioritory for client for which selection it should choose over another. This way I could just offer the selections by their copy date, and libre office would take the latest one, then all the functionality such as remembering the last file copy or pasting image from history to gimp would not be lost.

Last edited by Cloudef (2012-09-13 21:32:16)

Offline

#105 2012-10-04 18:25:34

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

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

Few bugs fixed in the 2.1-3 that were reported @ IRC

Offline

#106 2012-10-20 22:01:40

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

I'm having this bug/problem I can't seem to reproduce step by step but I'll try to explain it the best I can.

I'm writing a Gmail mail in my browser and I want to paste something, like a link. I copy the link, and try to paste into my mail writing area, but the link doesn't get pasted, instead of it the text I copied before the link gets pasted. And I can't paste the new text without killing loliclip, copying the link and pasting it.

As I said it seems to happen on certain conditions, I'll write back if I figure out how to reproduce it correctly.

Last edited by karabaja4 (2012-10-20 22:01:59)


pie!

Offline

#107 2012-10-21 09:24:43

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

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

That happened to me few days ago in Google docs, but I blamed it on dwb.

I also have a small request. Can you modify lolictrl so it reads .dmenurc?

Offline

#108 2012-10-21 09:29:59

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

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

karabaja4 wrote:

As I said it seems to happen on certain conditions, I'll write back if I figure out how to reproduce it correctly.

I'll investigate this.

Šaran wrote:

Also have a small request. Can you modify lolictrl so it reads .dmenurc?

Sure.

Offline

#109 2012-10-21 10:22:10

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

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

I've fixed few bugs and added so lolictrl uses $HOME/.dmenurc if such exists (@ git).
I could not reproduce the gmail url issue. I'm using dwb as well.

I found a bug, pasting any kind of plain text to Libreoffice Writer opens some strange Sections window. Without loliclip it works fine.

About this issue, I've explained it in detail earlier in quite lenghty post. However, I haven't given any status info on this. I've looked into detail if I could prioritize the selections to application, but it seems that this isn't possible without any hack workarounds. However, if you add CLIPBOARD_CLEAR_SELECTIONS bitflag to REGISTER_CLIPBOARD("CLIPBOARD", "PRIMARY", 150, ...) line, loliclip should act more how X applications expect clipboard to work.
You will lose the feature where loliclip remembers your last image and file selections, since those are reset on each new copy, but should make applications that have problems behave better hopefully.

In future, if possible with applications that give issues. Could you try testing with the CLIPBOARD_CLEAR_SELECTIONS bitflag as well. I might consider making it default.
But personally, I like the current loliclip behaviour myself especially since I don't seem to have any applications on daily use that give much trouble (expect for blender's python editor).

diff --git a/loliclip/config.h b/loliclip/config.h
index e216363..8fbbd30 100644
--- a/loliclip/config.h
+++ b/loliclip/config.h
@@ -54,7 +54,8 @@ clipdata clipboards[] = {
    REGISTER_CLIPBOARD("CLIPBOARD", "PRIMARY", 150,
          CLIPBOARD_TRIM_WHITESPACE_NO_MULTILINE  |
          CLIPBOARD_TRIM_TRAILING_NEWLINE |
-         CLIPBOARD_OWN_IMMEDIATLY),
+         CLIPBOARD_OWN_IMMEDIATLY |
+         CLIPBOARD_CLEAR_SELECTIONS),
 };
 
 /* registered special selections and their settings

Last edited by Cloudef (2012-10-21 10:23:36)

Offline

#110 2012-10-21 10:29:30

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

Thanks. I'll try to figure out how to reproduce the link issue, I'll report here when I figure it out.

P.S. I don't use dmenu but I'm curious, what exacly does loliclip read out of dmenurc?


pie!

Offline

#111 2012-10-21 10:36:47

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

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

Thanks for modified lolictrl, but it isn't working like it should if there is .dmenurc.

tZnlueA

Offline

#112 2012-10-21 10:37:24

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

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

karabaja4 wrote:

P.S. I don't use dmenu but I'm curious, what exacly does loliclip read out of dmenurc?

It just sources the $HOME/.dmenurc which should contain variable DMENU with dmenu command and it's arguments.

ex. DMENU='dmenu -i -l 15'

Thanks for modified lolictrl, but it isn't working like it should if there is .dmenurc.

Actually it's working. I assume you mean that you don't have multiline selection? You should have -l 15 in your .dmenurc.
Maybe I should add loliclip specific variable to .dmenurc?

Last edited by Cloudef (2012-10-21 10:46:18)

Offline

#113 2012-10-21 10:43:06

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

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

Oh, I see. Please do, because -l 15 messes up with my one-line dmenus.

Offline

#114 2012-10-21 10:52:05

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

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

Šaran wrote:

Oh, I see. Please do, because -l 15 messes up with my one-line dmenus.

Pushed, LOLICTRL_DMENU is the relevant variable.
Should do manpage sometime as well..

Offline

#115 2012-10-21 10:55:10

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

Ok, I figured out the bug.

1. Start loliclip.
2. Open Firefox and copy some pure text (no links or images).
3. Close Firefox.
4. Open a GTK editor (I used gcw) and copy some text like "aaaaaaaaaaa...".
6. Close the GTK editor.
7. Open Firefox, go to Gmail, click compose mail, and paste into the mail text area. The text that gets pasted is the text from step 2, where it should be text from step 4.


pie!

Offline

#116 2012-10-21 11:01:44

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

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

Works great now, thanks!

I couldn't reproduce bug following karabaja's steps, it pastes text from Geany just fine.

Offline

#117 2012-10-21 11:02:07

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

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

karabaja4 wrote:

1. Start loliclip.
2. Open Firefox and copy some pure text (no links or images).
3. Close Firefox.
4. Open a GTK editor (I used gcw) and copy some text like "aaaaaaaaaaa...".
6. Close the GTK editor.
7. Open Firefox, go to Gmail, click compose mail, and paste into the mail text area. The text that gets pasted is the text from step 2, where it should be text from step 4.

Seems to work here. Though, I have a clue.. Can you try with the CLEAR_SELECTIONS bitflag?

Offline

#118 2012-10-21 11:08:44

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

With

CLIPBOARD_OWN_IMMEDIATLY | CLIPBOARD_CLEAR_SELECTIONS

it works fine.

I don't get why you can't reproduce it using my steps, it works for me every time.

Are you sure you closed the Firefox/editor after each copy and that you started loliclip just before the experiment? Obviously you must also *not* be using CLIPBOARD_CLEAR_SELECTIONS.

Last edited by karabaja4 (2012-10-21 11:34:50)


pie!

Offline

#119 2012-10-21 12:01:46

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

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

Are you sure you closed the Firefox/editor after each copy and that you started loliclip just before the experiment?

Yes, I followed exactly the same steps. But since CLEAR_SELECTIONS help, it's propably some old selection you had in loliclip's memory that made ghost appearance.
I think you should killall loliclip before taking the steps. Anyways. I think I'll make CLEAR_SELECTIONS the default both in git and aur then in near future, if there isn't any problems.

Offline

#120 2012-10-21 12:15:31

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

Cloudef wrote:

Are you sure you closed the Firefox/editor after each copy and that you started loliclip just before the experiment?

Yes, I followed exactly the same steps. But since CLEAR_SELECTIONS help, it's propably some old selection you had in loliclip's memory that made ghost appearance.
I think you should killall loliclip before taking the steps. Anyways. I think I'll make CLEAR_SELECTIONS the default both in git and aur then in near future, if there isn't any problems.

Very weird. I did kill loliclip before the experiment, that was implied by step 1. Let's try to be more concrete in reproducing the steps.

1. Kill all running loliclip processes.
2. Delete .local/share/loliclip/
3. Start loliclip.
4. Open Firefox, go to bbs.archlinux.org, copy this text below newbie corner subforum (not this one, the one on the forum website).

Beginners' subforum for general Arch issues. Please consult the excellent Arch wiki and web before posting. Also try the forum search function at the upper left.

5. Close Firefox.
6. Open gcw, write "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" (don't paste this or anything, write with your keyboard), copy it.
7. Close gcw.
8. Open Firefox, go to Gmail, compose new mail, paste in mail contents area.

Last edited by karabaja4 (2012-10-21 12:34:49)


pie!

Offline

#121 2012-10-21 12:24:01

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

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

Offline

#122 2012-10-21 12:25:31

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

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

I reproduced it. It pastes text from webpage even if I select aaaa in lolictrl.
It will paste new copy selection from eg. dwb with ctrl+v or context menu, but when it happened in dwb/google docs, only way to paste new text was shift+insert.

Last edited by Šaran (2012-10-21 12:28:23)

Offline

#123 2012-10-21 12:26:20

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

I really don't get it... it seems impossible. Why would it work differently on two machines, there must be some other factors at work here...


pie!

Offline

#124 2012-10-21 12:27:25

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 848

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

Šaran wrote:

I reproduced it. It pastes text from webpage even if I select aaaa in lolictrl.
But when it happened in dwb/google docs, only way to paste new text was shift+insert.

Can you say what did you do different from the first time when you weren't able to reproduce it?


pie!

Offline

#125 2012-10-21 12:28:55

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

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

I have deleted .local/share/loliclip.

Offline

Board footer

Powered by FluxBB