You are not logged in.
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
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)
Offline
Output of loliclip &> lolilog without CLEAR_SELECTIONS.
http://ompldr.org/vZnlzaw
After pasting I have selected aaaaaaaaaaaaaaa in lolictrl and pasted again.
Offline
Could it be that Geany is using some different selection type?
Offline
It works with 2.4-4! Thank you!
Offline
Can I use this new reset bit feature to avoid the libreoffice paste issue and if so, how?
Offline
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
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).
Offline
Offline
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)
Offline
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
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
Offline
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
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
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.
Offline
Fixed Simple replacing "CLIPBOARD" with "PRIMARY" did the trick.
Offline
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
Hey Cloudef,
a problem again with 2.4-7 to 2.4-8 upgrade 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!
Offline
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
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.
Offline
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
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
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.
Offline