You are not logged in.

#151 2012-10-21 16:28:10

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

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

Šaran wrote:

My config.h isn't modified and it works with CLEAR_SELECTIONS.

Can you compile loliclip with the DEBUG variable set to 1, run the loliclip on terminal, reproduce the bug and pastebin the output somewhere. Thanks.

Last edited by Cloudef (2012-10-21 16:28:24)

Offline

#152 2012-10-21 16:30:00

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

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

I managed to reproduce it too with Geany. Output of the line:

~ >>> for i in $(loliclip -h | grep -o "text/.*"); do loliclip -b "$i"; echo -e "\n--$i--"; done

--text/uri-list--

--text/plain--

--text/richtext--
ÿþ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.
--text/html--

(I copied aaaaaaaaaaaaaaaa... in Geany and it pastes aaaaaaaaaaaaaaaa... everywhere else except in Gmail but that line from above doesn't list it).

EDIT: debug output coming soon.

Last edited by karabaja4 (2012-10-21 16:35:27)


pie!

Offline

#153 2012-10-21 16:38:05

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

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

Output of loliclip &> lolilog without CLEAR_SELECTIONS.
http://ompldr.org/vZnlzaw

After pasting I have selected aaaaaaaaaaaaaaa in lolictrl and pasted again.

Offline

#154 2012-10-21 16:47:57

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

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

Since, I still can't reproduce this.. I take shot in the dark.
Can you give me output of the latest git again. I added some verbose to myself.

Offline

#155 2012-10-21 17:08:48

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

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

Could it be that Geany is using some different selection type?


pie!

Offline

#156 2012-10-21 17:21:20

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

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

It works with 2.4-4! Thank you! smile

http://ompldr.org/vZnl0YQ

Offline

#157 2012-10-21 18:17:21

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

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

It works with 2.4-4! Thank you!

Great to know! My code was just broken smile

Offline

#158 2012-10-22 18:23:43

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

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

Can I use this new reset bit feature to avoid the libreoffice paste issue and if so, how?


pie!

Offline

#159 2012-10-22 19:58:03

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

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

You could put the reset bit to every selection.. But that would give same effect as CLEAR_SELECTIONS flag.
Putting images and text/ stuff (expect from text/uri-list, I don't think libreoffice uses it) to same data index, could work.
Not sure though.

Offline

#160 2012-10-22 21:49:32

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

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

Heh. Too bad. As you wrote before, maybe it would be a good idea to make CLEAR_SELECTIONS default, so unsuspecting new users aren't scared away by strange behaviour (just IMHO).


pie!

Offline

#161 2012-10-23 14:41:26

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

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

karabaja4 wrote:

Heh. Too bad. As you wrote before, maybe it would be a good idea to make CLEAR_SELECTIONS default, so unsuspecting new users aren't scared away by strange behaviour (just IMHO).

Done.

Offline

#162 2013-03-12 22:08:23

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

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

Hey Cloudef,

sorry to bother you, but if and when you have free time... could you check why loliclip doesn't play nice with suckless st terminal?

Basically anything you highlight (select) gets unselected very quickly inside the terminal, sometimes the selection doesn't even start because it is cancelled too quickly.

Thanks!

P.S: This is the st terminal package: https://aur.archlinux.org/packages/st/

Last edited by karabaja4 (2013-03-12 22:11:11)


pie!

Offline

#163 2013-03-12 22:21:16

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

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

It's propably related to the way PRIMARY selection is queried..
There might be no easy solution for this.

For now it might be possible to workaround it by commenting out line 51 in config.h (REGISTER_CLIPBOARD("PRIMARY" ...)
Anyways, I'll take a look when I've got time.

Offline

#164 2013-03-12 22:36:39

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

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

Cloudef wrote:

For now it might be possible to workaround it by commenting out line 51 in config.h (REGISTER_CLIPBOARD("PRIMARY" ...)
Anyways, I'll take a look when I've got time.

Commenting out line 51 didn't help. Anyway, it's just a minor annoyance, no need to rack your brain over this.

loliclip rocks smile


pie!

Offline

#165 2013-03-12 22:42:22

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

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

Commenting out line 51 didn't help. Anyway, it's just a minor annoyance, no need to rack your brain over this.

I see. I'll try to check it out tomorrow.

loliclip rocks

Thanks, it's something I use daily as well.

Offline

#166 2013-03-13 16:29:50

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

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

It seems when you select stuff in st, it also copies the the stuff to CLIPBOARD, and since loliclip by default postprocess immediatly everything that goes to CLIPBOARD, it needs to grab the ownership of the selection which as side effect causes X to unselect the text in whichever application had the selection before.

Offline

#167 2013-03-13 17:03:18

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

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

Cloudef wrote:

It seems when you select stuff in st, it also copies the the stuff to CLIPBOARD, and since loliclip by default postprocess immediatly everything that goes to CLIPBOARD, it needs to grab the ownership of the selection which as side effect causes X to unselect the text in whichever application had the selection before.

st copies selection into CLIPBOARD? lol. I'll try to workaround this in st code.

Thanks.


pie!

Offline

#168 2013-03-13 17:30:53

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

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

Fixed smile Simple replacing "CLIPBOARD" with "PRIMARY" did the trick.


pie!

Offline

#169 2013-03-13 18:08:35

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

Wanna mention this upstream? I use st too and frankly, I don't really like this behavior (fixed it with a sed line in the PKGBUILD).

Last edited by Army (2013-03-13 18:08:59)

Offline

#170 2013-03-19 19:36:50

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

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

Hey Cloudef,

a problem again with 2.4-7 to 2.4-8 upgrade smile This commit:

https://github.com/Cloudef/PKGBUILDS/co … 69527d2c8e

caused a problem when running loliclip in the background using a shortcut (Openbox).

I have this script.sh

#!/bin/bash

loliclip -p | loliclip -c
aplay /usr/share/etracer/sounds/fish_pickup1.wav

binded on Super-C. loliclip does nothing when the command is run (and the sound is played).

I also tested a bit. This works:

echo test | loliclip -c

but this doesn't:

loliclip -c > hello.txt

The weird thing is, when piping is ran from the command prompt (terminal) everything works like it should.

Cheers!


pie!

Offline

#171 2013-03-20 07:56:30

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

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

Seems like the isatty is not good for checking this case.
I'll propably just add seperate command switch for input/output for simplicity sake.

Atm, my GPU broke, so I'm waiting for new one. Will take a while.

Offline

#172 2013-03-20 21:52:08

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

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

Cloudef wrote:

Seems like the isatty is not good for checking this case.
I'll propably just add seperate command switch for input/output for simplicity sake.

Atm, my GPU broke, so I'm waiting for new one. Will take a while.

Can you please explain, what is the purpose of isatty command? As I can read from your comments,  it blocks the piping of data if the pipe is open, is that limitation there just for robustness?

Because if it is and doesn't really change anything, I don't think it's worth it... new people will probably assume loliclip isn't working and discard it.


pie!

Offline

#173 2013-03-21 07:12:21

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

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

karabaja4 wrote:

Can you please explain, what is the purpose of isatty command? As I can read from your comments,  it blocks the piping of data if the pipe is open, is that limitation there just for robustness?

Because if it is and doesn't really change anything, I don't think it's worth it... new people will probably assume loliclip isn't working and discard it.

I tried to preserve similar functionality as xsel. They used isatty, but in this case it won't work since there is no tty when forking and piping.
But looking back again. Even xsel has seperate commands for output/input.

The added isatty there is related to github issue reported few days back. (When pipe has no data, it dumps the output to stdout).

Offline

#174 2013-04-05 20:48:20

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

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

karabaja4, I've added --pipe/-i switch to the git. This tells loliclip to always wait input from pipe and ignore what isatty tells. Also, instead of loliclip -p | loliclip -c, I suggest using lolictrl -spc.
That way you syncing from primary to clipboard is quarnteed to work in future as well.

I'll update loliclip on aur, if no other regression is found.

Offline

#175 2013-04-05 21:43:17

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

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

Thanks.

I've been looking at the code and I've been trying to figure this out:

-      if (!isatty(fileno(stdin))) return 1;
+      if (!isatty(fileno(stdin)) || PIPE_MODE) return 1;

It's not exactly clear to me how this works.

Before, if isatty() would return false (we are not in terminal), the function would return 1 and do nothing.

Now, if isatty() returns false (we are not in terminal) or we are using PIPE_MODE switch the function will return 1 and do nothing.

I guess this would seem more logical:

if (!isatty(fileno(stdin)) && !PIPE_MODE) return 1;

Please if you would explain... it could be that I'm too tired and talking stupid... I haven't tried loliclip yet though, I will as soon as I have the chance.


pie!

Offline

Board footer

Powered by FluxBB